Пример #1
0
 //初始化"c:Columns"的节点
 private void InitColumns(XmlNode xnColumns, PdmTable pTable)
 {
     foreach (XmlNode xnColumn in xnColumns)
     {
         pTable.AddColumn(GetColumn(xnColumn));
     }
 }
Пример #2
0
 //初始化c:Keys"的节点
 private void InitKeys(XmlNode xnKeys, PdmTable pTable)
 {
     foreach (XmlNode xnKey in xnKeys)
     {
         pTable.AddKey(GetKey(xnKey));
     }
 }
Пример #3
0
        //初始化"o:Table"的节点
        private PdmTable GetTable(XmlNode xnTable)
        {
            PdmTable   mTable = new PdmTable();
            XmlElement xe     = (XmlElement)xnTable;

            mTable.TableId = xe.GetAttribute("Id");
            XmlNodeList xnTProperty = xe.ChildNodes;

            foreach (XmlNode xnP in xnTProperty)
            {
                switch (xnP.Name)
                {
                case "a:ObjectID": mTable.ObjectID = xnP.InnerText;
                    break;

                case "a:Name": mTable.Name = xnP.InnerText;
                    break;

                case "a:Code": mTable.Code = xnP.InnerText;
                    break;

                case "a:CreationDate": mTable.CreationDate = Convert.ToInt32(xnP.InnerText);
                    break;

                case "a:Creator": mTable.Creator = xnP.InnerText;
                    break;

                case "a:ModificationDate": mTable.ModificationDate = Convert.ToInt32(xnP.InnerText);
                    break;

                case "a:Modifier": mTable.Modifier = xnP.InnerText;
                    break;

                case "a:Comment": mTable.Comment = xnP.InnerText;
                    break;

                case "a:PhysicalOptions": mTable.PhysicalOptions = xnP.InnerText;
                    break;

                case "c:Columns": InitColumns(xnP, mTable);
                    break;

                case "c:Keys": InitKeys(xnP, mTable);
                    break;
                }
            }
            return(mTable);
        }