• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 124,  comments - 29,  trackbacks - 0
            <?xml version="1.0" encoding="GB2312"?>
            <Head>
            <Column DisTitle="報表名" DisWidth="150">
              
            <Field>tableCName</Field> 
              
            <Type>string</Type>
              
            <Visible>true</Visible>
            </Column>
            <Column DisTitle="表英文名" DisWidth="0">
              
            <Field>tableEName</Field> 
              
            <Type>string</Type> 
              
            <Visible>false</Visible>
            </Column>
            <Column DisTitle="數(shù)據(jù)開始時間" DisWidth="150">
                
            <Field>databtime</Field> 
                
            <Type>string</Type> 
                
            <Visible>true</Visible> 
            </Column>
            <Column DisTitle="數(shù)據(jù)結(jié)束時間" DisWidth="150">
                
            <Field>dataetime</Field> 
                
            <Type>string</Type> 
                
            <Visible>true</Visible> 
            </Column>
            <Column DisTitle="匯總是否成功" DisWidth="300">
              
            <Field>collectSuccess</Field> 
              
            <Type>string</Type> 
              
            <Visible>true</Visible>
            </Column>
            <Column DisTitle="是否存在風(fēng)險" DisWidth="100">
              
            <Field>containDanger</Field> 
              
            <Type>string</Type> 
              
            <Visible>true</Visible>
            </Column>
            <Column DisTitle="表描述" DisWidth="300">
              
            <Field>discription</Field> 
              
            <Type>string</Type> 
              
            <Visible>true</Visible>
            </Column>
            </Head>
                public static List<MyColumn> GetColumnInfo(string fileName, string Node)
                    {
                        
            try
                        {
                            
            string xmlFile = String.Format("{0}\\{1}", System.Windows.Forms.Application.StartupPath, fileName);

                            XmlDocument xmldoc 
            = new XmlDocument();
                            xmldoc.Load(xmlFile);
                            
            if (xmldoc != null)
                            {
                                XmlNode colnode 
            = xmldoc.SelectSingleNode(Node);
                                
            if (colnode != null)
                                {
                                    List
            <MyColumn> cols = new List<MyColumn>();
                                    
            foreach (XmlNode headnode in colnode.ChildNodes)
                                    {
                                        MyColumn col 
            = new MyColumn();
                                        col.Caption 
            = headnode.Attributes["DisTitle"].Value;
                                        col.Width 
            = Convert.ToInt32(headnode.Attributes["DisWidth"].Value);
                                        col.FieldName 
            = headnode.SelectSingleNode("Field").InnerText;
                                        col.Visible 
            = Convert.ToBoolean(headnode.SelectSingleNode("Visible").InnerText);


                                        
            string type = headnode.SelectSingleNode("Type").InnerText;

                                        
            if (String.Compare(type, "int"true== 0 || String.Compare(type, "long"true== 0 || String.Compare(type, "short"true== 0)
                                        {
                                            col.colType 
            = Type.GetType("System.Int64");
                                        }
                                        
            else if (String.Compare(type, "double"true== 0)
                                        {
                                            col.colType 
            = Type.GetType("System.Double");
                                        }
                                        
            else
                                        {
                                            col.colType 
            = Type.GetType("System.String");
                                        }
                                        cols.Add(col);
                                    }

                                    
            return cols;
                                }
                            }
                            
            return null;
                        }
                        
            catch(Exception ex)
                        {
                            MessageBox.Show(ex.Message 
            + ex.StackTrace);
                            
            return null;
                        }
                    }
            posted on 2010-04-23 12:00 天書 閱讀(463) 評論(0)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理



            <2013年11月>
            272829303112
            3456789
            10111213141516
            17181920212223
            24252627282930
            1234567

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久精品成人免费观看97| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 久久亚洲sm情趣捆绑调教 | 蜜臀久久99精品久久久久久| 国产成人综合久久精品尤物| 精品国产青草久久久久福利 | 国产精品久久久久久久午夜片| 69久久精品无码一区二区| 高清免费久久午夜精品| 日本免费久久久久久久网站| 国产成人精品久久亚洲| 久久亚洲av无码精品浪潮| 久久久噜噜噜久久中文字幕色伊伊| 亚洲va国产va天堂va久久| AAA级久久久精品无码片| 亚洲精品高清久久| 日韩美女18网站久久精品| 久久久久亚洲av成人网人人软件 | 亚洲一区精品伊人久久伊人| 久久99国产精品久久99小说| 日韩乱码人妻无码中文字幕久久| 国产精品视频久久| 亚洲第一永久AV网站久久精品男人的天堂AV | 欧美牲交A欧牲交aⅴ久久| 久久99国产精一区二区三区| 久久WWW免费人成—看片| 久久亚洲AV无码精品色午夜麻豆| 97热久久免费频精品99| 一极黄色视频久久网站| 国产产无码乱码精品久久鸭| 久久久久国产精品嫩草影院 | 久久精品国产亚洲av麻豆色欲| 香蕉久久夜色精品国产小说| 久久精品国产亚洲AV蜜臀色欲| 99re久久精品国产首页2020| 久久精品一区二区三区AV| 国产A级毛片久久久精品毛片| 97久久婷婷五月综合色d啪蜜芽| 国产亚洲色婷婷久久99精品91| 久久久久亚洲av无码专区导航| 久久久久久亚洲精品不卡 |