コード例 #1
0
ファイル: PdmTable.cs プロジェクト: yangyue1943/song
 public void AddKey(PdmKey mKey)
 {
     if (keys == null)
     {
         keys = new List <PdmKey>();
     }
     keys.Add(mKey);
 }
コード例 #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>
                }
            }
            return(mKey);
        }