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

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