예제 #1
0
 public void AddFieldCR(string fieldName)
 {
     if (!Children.Any(F => F.GetType().Equals(typeof(QAddDUIFieldCR)) && ((QAddDUIFieldCR)F).FieldName == fieldName))
     {
         QAddDUIFieldCR cr = AddNewChild <QAddDUIFieldCR>();
         cr.FieldName = fieldName;
     }
 }
예제 #2
0
 public override void CopyState(object source)
 {
     if (source is QAddDUIFieldCR)
     {
         QAddDUIFieldCR cr  = (QAddDUIFieldCR)source;
         XmlDocument    doc = new XmlDocument();
         doc.LoadXml(cr.Serialize());
         Deserialize(doc.DocumentElement);
     }
 }
예제 #3
0
        public override object Clone()
        {
            QAddDUIFieldCR retval = new QAddDUIFieldCR()
            {
                FieldName = this.fieldName,
                Parent    = this.Parent
            };

            foreach (QChangeRequest child in this.Children)
            {
                retval.Children.Add((QChangeRequest)child.Clone());
            }
            return(retval);
        }
예제 #4
0
 public override void Modify()
 {
     foreach (QPoolField field in poolFields)
     {
         var children = ChangeRequest.Children.Where(C => C.GetType() == typeof(QAddDUIFieldCR) &&
                                                     ((QAddDUIFieldCR)C).FieldName == field.FieldName &&
                                                     ((QAddDUIFieldCR)C).InstallationCode == installationCode).ToList();
         if (children == null || children.Count == 0)
         {
             // add child
             QAddDUIFieldCR newchild = ChangeRequest.AddNewChild <QAddDUIFieldCR>();
             newchild.FieldName = field.FieldName;
         }
     }
 }