Ejemplo n.º 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);
        }
 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;
        }