Exemplo n.º 1
0
 private void LoadFieldAttrs(XmlNode Node, TFieldAttrItems AttrItems, String KeyFields)
 {
     TFieldAttrItem FAI;
     int I;
     XmlNode AttrNode;
     for (I = 0; I < Node.ChildNodes.Count; I++)
     {
         AttrNode = Node.ChildNodes[I];
         FAI = new TFieldAttrItem();
         FAI.DataField = AttrNode.Attributes["DataField"].Value;
         FAI.Description = AttrNode.Attributes["Description"].Value;
         FAI.IsKey = AttrNode.Attributes["IsKey"].Value == "1";
         FAI.CheckNull = AttrNode.Attributes["CheckNull"].Value == "1";
         FAI.IsRelationKey = AttrNode.Attributes["IsRelationKey"].Value == "1"; //IsKeyField(KeyFields, FAI.DataField);
         FAI.ParentRelationField = AttrNode.Attributes["ParentRelationField"].Value;
         AttrItems.Add(FAI);
     }
 }
Exemplo n.º 2
0
 private void SetColumns(ColumnItems aColumnItems, TFieldAttrItems FieldAttrItems, Boolean ParentField)
 {
     aColumnItems.Clear();
     for (int num1 = 0; num1 < FieldAttrItems.Count; num1++)
     {
         TFieldAttrItem item2 = FieldAttrItems[num1] as TFieldAttrItem;
         if (item2.ParentRelationField != null && item2.ParentRelationField != "")
         {
             ColumnItem item1 = new ColumnItem();
             if (ParentField)
             {
                 item1.FieldName = item2.ParentRelationField;
                 item1.Name = item2.ParentRelationField;
             }
             else
             {
                 item1.FieldName = item2.DataField;
                 item1.Name = item2.DataField;
             }
             aColumnItems.Add(item1);
         }
     }
 }
Exemplo n.º 3
0
 public TWCFDatasetItem()
 {
     FFieldAttrItems = new TFieldAttrItems(this);
 }