Пример #1
0
 public void GetKeyColumn(XmlNode xnP ,PdmKey mKey)
 {
     XmlElement xe = (XmlElement)xnP;
     XmlNodeList nodeList = xe.ChildNodes;
     foreach (XmlNode node in nodeList)
     {
         ColumnInfo ci = new ColumnInfo();
         ci.ColumnId = ((XmlElement)node).GetAttribute("Ref");
         mKey.AddColumn(ci);
     }
 }
Пример #2
0
 private PdmKey GetKey(XmlNode xnKey)
 {
     PdmKey mKey = new PdmKey();
     XmlElement xe = (XmlElement)xnKey;
     mKey.KeyId = xe.GetAttribute("Id");
     XmlNodeList xnKProperty = xe.ChildNodes;
     foreach (XmlNode xnP in xnKProperty)
     {
         switch (xnP.Name)
         {
             case "a:ObjectID": mKey.ObjectID = xnP.InnerText;
                 break;
             case "a:Name": mKey.Name = xnP.InnerText;
                 break;
             case "a:Code": mKey.Code = xnP.InnerText;
                 break;
             case "a:CreationDate": mKey.CreationDate = Convert.ToInt32(xnP.InnerText);
                 break;
             case "a:Creator": mKey.Creator = xnP.InnerText;
                 break;
             case "a:ModificationDate": mKey.ModificationDate = Convert.ToInt32(xnP.InnerText);
                 break;
             case "a:Modifier": mKey.Modifier = xnP.InnerText;
                 break;
             //还差 <c:Key.Columns>
             case "c:Key.Columns": GetKeyColumn(xnP, mKey);
                 break;
         }
     }
     return mKey;
 }
Пример #3
0
 private PdmKey GetPrimary(XmlNode xnKey)
 {
     PdmKey mKey = new PdmKey();
     XmlElement xe = (XmlElement)xnKey;
     mKey.KeyId = xe.GetAttribute("Ref");
     return mKey;
 }
Пример #4
0
 public void AddKey(PdmKey mKey)
 {
     if (keys == null)
         keys = new List<PdmKey>();
     keys.Add(mKey);
 }