Exemple #1
0
 public void AddColumnCR(string columnName)
 {
     if (!Children.Any(F => F.GetType().Equals(typeof(QAddColumnToViewCR)) && ((QAddColumnToViewCR)F).ColumnName == columnName))
     {
         QAddColumnToViewCR cr = AddNewChild <QAddColumnToViewCR>();
         cr.ColumnName = columnName;
     }
 }
Exemple #2
0
 public override void CopyState(object source)
 {
     if (source is QAddColumnToViewCR)
     {
         QAddColumnToViewCR cr  = (QAddColumnToViewCR)source;
         XmlDocument        doc = new XmlDocument();
         doc.LoadXml(cr.Serialize());
         Deserialize(doc.DocumentElement);
     }
 }
 public override void Modify()
 {
     foreach (QPoolField field in poolFields)
     {
         var children = ChangeRequest.Children.Where(C => C.GetType() == typeof(QAddColumnToViewCR) && ((QAddColumnToViewCR)C).ColumnName == field.FieldName).ToList();
         if (children == null || children.Count == 0)
         {
             // add child
             QAddColumnToViewCR newchild = ChangeRequest.AddNewChild <QAddColumnToViewCR>();
             newchild.ColumnName = field.FieldName;
         }
     }
 }
Exemple #4
0
        public override object Clone()
        {
            QAddColumnToViewCR retval = new QAddColumnToViewCR()
            {
                ColumnName = this.columnName,
                Parent     = this.Parent
            };

            foreach (QChangeRequest child in this.Children)
            {
                retval.Children.Add((QChangeRequest)child.Clone());
            }
            return(retval);
        }