• <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

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            色综合久久综精品| 国产精品嫩草影院久久| 欧美亚洲国产精品久久| 久久久久国产精品熟女影院| 国产亚洲精品自在久久| 国产午夜精品久久久久九九| 国内高清久久久久久| 热久久这里只有精品| 国产精品久久久久久久人人看 | 久久精品中文字幕一区| 亚洲狠狠综合久久| 国产激情久久久久影院老熟女免费| 久久国产乱子伦精品免费午夜| 一本一本久久A久久综合精品| 国产高潮国产高潮久久久91| 久久妇女高潮几次MBA| 国产精品青草久久久久福利99| 久久久久久久人妻无码中文字幕爆| 久久亚洲电影| 久久青青草原精品国产不卡| 一本久久久久久久| 99久久国产主播综合精品| 久久久久免费看成人影片| 欧美国产成人久久精品| 亚洲精品无码久久毛片| 欧美日韩精品久久久免费观看| 国产成人精品久久综合| 久久精品草草草| 久久精品人人做人人爽电影| 91精品国产综合久久婷婷| 日日噜噜夜夜狠狠久久丁香五月| 久久久国产亚洲精品| 久久亚洲国产精品成人AV秋霞| 欧美午夜A∨大片久久| 中文精品久久久久人妻| 久久综合亚洲色HEZYO社区 | 欧美久久亚洲精品| 热久久视久久精品18| 77777亚洲午夜久久多人| 国产亚洲欧美精品久久久| 青青青青久久精品国产|