• <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="數據開始時間" DisWidth="150">
                
            <Field>databtime</Field> 
                
            <Type>string</Type> 
                
            <Visible>true</Visible> 
            </Column>
            <Column DisTitle="數據結束時間" 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="是否存在風險" 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)  編輯 收藏 引用

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

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            色妞色综合久久夜夜| 狠狠综合久久综合88亚洲 | 精品国产乱码久久久久软件| 久久国产精品一区| 伊人久久亚洲综合影院| 国产亚洲色婷婷久久99精品| 久久91精品综合国产首页| 精品国产乱码久久久久久呢| 一本久久a久久精品综合夜夜| 欧美国产精品久久高清| 韩国无遮挡三级久久| 久久久久久久久久久精品尤物| 国产精品久久久久久福利漫画 | 日产精品久久久久久久| 91精品国产91久久久久久蜜臀| 久久亚洲AV成人无码软件| 精品久久人人爽天天玩人人妻| 欧美大香线蕉线伊人久久| 四虎影视久久久免费观看| 国产精品九九久久免费视频| 久久国产精品77777| 亚洲?V乱码久久精品蜜桃| 99久久精品国产一区二区| 国产精品欧美久久久天天影视| 亚洲级αV无码毛片久久精品 | 久久久久国产精品熟女影院| 久久综合亚洲鲁鲁五月天| 久久久久国色AV免费观看| 国产午夜精品理论片久久| 亚洲天堂久久精品| 18岁日韩内射颜射午夜久久成人| 成人国内精品久久久久影院| 久久婷婷五月综合97色一本一本| 久久精品国产亚洲AV香蕉| 日批日出水久久亚洲精品tv| 亚洲国产成人久久综合碰| 久久精品综合网| 老色鬼久久亚洲AV综合| 久久水蜜桃亚洲av无码精品麻豆| 九九精品99久久久香蕉| 久久99精品国产99久久|