• <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 天書 閱讀(457) 評論(0)  編輯 收藏 引用

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



            <2010年4月>
            28293031123
            45678910
            11121314151617
            18192021222324
            2526272829301
            2345678

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            伊人久久大香线蕉综合5g| 久久综合色老色| 99久久国产精品免费一区二区 | 亚洲国产小视频精品久久久三级| 国产综合免费精品久久久| 亚洲国产天堂久久久久久| 97久久天天综合色天天综合色hd| 一级做a爰片久久毛片16| 国产香蕉久久精品综合网| 久久w5ww成w人免费| 久久久久亚洲AV成人网人人网站 | 久久精品国产99国产精偷| 四虎影视久久久免费观看| 99久久er这里只有精品18| 久久午夜福利电影| 久久九九青青国产精品| 精品综合久久久久久97| 久久久网中文字幕| 国产精品久久久久jk制服| 久久五月精品中文字幕| 精品久久久久久久久中文字幕| 欧美成人免费观看久久| 久久精品无码一区二区三区日韩 | 久久综合亚洲色HEZYO社区| 99久久婷婷国产综合精品草原| 久久综合狠狠综合久久| 久久久久久国产精品美女| 伊人久久大香线焦综合四虎| 99久久人妻无码精品系列蜜桃| 亚洲午夜福利精品久久| 国产成人久久久精品二区三区| 久久99精品久久久久久hb无码 | 97久久天天综合色天天综合色hd| 精品久久久久久中文字幕大豆网| 久久久久久国产a免费观看不卡| 久久er热视频在这里精品| 久久精品国产99久久无毒不卡| 伊人久久精品无码二区麻豆| 亚洲精品无码久久久久去q| 久久天天躁狠狠躁夜夜2020一| 模特私拍国产精品久久|