Esempio n. 1
0
        private void BuildFiels()
        {
            ControlFieldSet ds    = GetTestData();
            int             count = ds._ControlFieldSet.Count;

            for (int i = 0; i < count; i++)
            {
                if (ds._ControlFieldSet[i].ControlType.Trim() == "1") // Text
                {
                    charField field = new charField();
                    field._Type      = ControlType.Text;
                    field.ControlID  = ds._ControlFieldSet[i].ID.Trim();
                    field.FieldName  = ds._ControlFieldSet[i].FieldName.Trim();
                    field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
                    this.fields.Add(field);
                }
                else if (ds._ControlFieldSet[i].ControlType.Trim() == "2") // Text
                {
                    comboBoxField field = new comboBoxField();
                    field._Type      = ControlType.ComboBox;
                    field.ControlID  = ds._ControlFieldSet[i].ID.Trim();
                    field.FieldName  = ds._ControlFieldSet[i].FieldName.Trim();
                    field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
                    this.fields.Add(field);
                }
                else if (ds._ControlFieldSet[i].ControlType.Trim() == "3") // 时间控件
                {
                    timeField field = new timeField();
                    field._Type      = ControlType.TimeBox;
                    field.ControlID  = ds._ControlFieldSet[i].ID.Trim();
                    field.FieldName  = ds._ControlFieldSet[i].FieldName.Trim();
                    field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
                    this.fields.Add(field);
                }
                else if (ds._ControlFieldSet[i].ControlType.Trim() == "4") // 数字控件
                {
                    NumericField field = new NumericField();
                    field._Type      = ControlType.NumericEdit;
                    field.ControlID  = ds._ControlFieldSet[i].ID.Trim();
                    field.FieldName  = ds._ControlFieldSet[i].FieldName.Trim();
                    field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
                    this.fields.Add(field);
                }
            }
        }
Esempio n. 2
0
 private void BuildFiels()
 {
     ControlFieldSet ds = GetTestData();
     int count = ds._ControlFieldSet.Count;
     for (int i = 0; i < count; i++)
     {
         if (ds._ControlFieldSet[i].ControlType.Trim() == "1") // Text
         {
             charField field = new charField();
             field._Type = ControlType.Text;
             field.ControlID = ds._ControlFieldSet[i].ID.Trim();
             field.FieldName = ds._ControlFieldSet[i].FieldName.Trim();
             field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
             this.fields.Add(field);
         }
         else if (ds._ControlFieldSet[i].ControlType.Trim() == "2") // Text
         {
             comboBoxField field = new comboBoxField();
             field._Type = ControlType.ComboBox;
             field.ControlID = ds._ControlFieldSet[i].ID.Trim();
             field.FieldName = ds._ControlFieldSet[i].FieldName.Trim();
             field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
             this.fields.Add(field);
         }
         else if (ds._ControlFieldSet[i].ControlType.Trim() == "3") // 时间控件
         {
             timeField field = new timeField();
             field._Type = ControlType.TimeBox;
             field.ControlID = ds._ControlFieldSet[i].ID.Trim();
             field.FieldName = ds._ControlFieldSet[i].FieldName.Trim();
             field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
             this.fields.Add(field);
         }
         else if (ds._ControlFieldSet[i].ControlType.Trim() == "4") // 数字控件
         {
             NumericField field = new NumericField();
             field._Type = ControlType.NumericEdit;
             field.ControlID = ds._ControlFieldSet[i].ID.Trim();
             field.FieldName = ds._ControlFieldSet[i].FieldName.Trim();
             field.FieldTable = ds._ControlFieldSet[i].TableName.Trim();
             this.fields.Add(field);
         }
     }
 }