private void availableDataItems_SelectedValueChanged(object sender, Controls.SEComboSelector2.OnSelectedValueChangedEventArgs e) { FieldProvideAttribute itemAttr = (FieldProvideAttribute)e.Value; IField dataItem = DataBaseProvide.Current.FieldFactory.CreateInstance(itemAttr); this.DataItemEntity.Field = dataItem; if (dataItem.AllowMaxLength) { this.txtLength.DropDownStyle = ComboBoxStyle.DropDown; } else { this.txtLength.DropDownStyle = ComboBoxStyle.Simple; } this.txtLength.Text = dataItem.Length.ToString(); this.txtLength.Enabled = dataItem.LengthEnable; this.txtDecimalDigits.Enabled = dataItem.DecimalDigitsEnable; this.txtDecimalDigits.Maximum = dataItem.DecimalDigitsMax; this.txtDecimalDigits.Minimum = dataItem.DecimalDigitsMin; this.txtDecimalDigits.Value = dataItem.Length.DecimalDigits; }
public IField CreateInstance(FieldProvideAttribute attribute) { return(_fields.CreateInstance(attribute)); }