Beispiel #1
0
 public void AddKey(PdmKey mKey)
 {
     if (keys == null)
     {
         keys = new List <PdmKey>();
     }
     keys.Add(mKey);
 }
        private void InitKeyColumns(XmlNode xnKeyColumns, PdmKey Key)
        {
            XmlElement  xe          = (XmlElement)xnKeyColumns;
            XmlNodeList xnKProperty = xe.ChildNodes;

            foreach (XmlNode xnP in xnKProperty)
            {
                string theRef = ((XmlElement)xnP).GetAttribute("Ref");
                Key.AddColumnObjCode(theRef);
            }
        }
        private PdmKey GetKey(XmlNode xnKey, TableInfo OwnerTable)
        {
            PdmKey     mKey = new PdmKey(OwnerTable);
            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 = String2DateTime(xnP.InnerText);
                    break;

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

                case "a:ModificationDate":
                    mKey.ModificationDate = String2DateTime(xnP.InnerText);
                    break;

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

                case "c:Key.Columns":
                    InitKeyColumns(xnP, mKey);
                    break;
                }
            }
            return(mKey);
        }