CSFrameworkV6试用版开发指南 - DataBinder 类使用
DataBinder类使用方法
C# 全选
//缓存数据
var data = DataDictCache.Cache.CustomerAttribute;
//绑定LookupEdit组件的数据源
DataBinder.BindingLookupEditDataSource(txt_Attr, data, nameof(dt_CustomerAttribute.NativeName), nameof(dt_CustomerAttribute.AttributeCode));
//绑定CheckedListBoxSource组件的数据源
DataBinder.BindingCheckedListBoxSource(txtAttributeCodes, data, nameof(dt_CustomerAttribute.NativeName), nameof(dt_CustomerAttribute.AttributeCode));
DataBinder 类提供的公共方法
命名空间:CSFrameworkV6.Library.CommonClass.DataBinder
C# 全选
namespace CSFrameworkV6.Library.CommonClass
{
public class DataBinder
{
public DataBinder();
public static void AddEmptyRow<T>(IList list) where T : class, new();
public static void BindingCheckedComboBoxSource(CheckedComboBoxEdit edit, object dataSource, string displayMember, string valueMember);
public static void BindingCheckEdit(CheckEdit edit, object dataSource, string bindField);
public static void BindingCheckedListBoxSource(CheckedListBoxControl edit, object dataSource, string displayMember, string valueMember);
public static void BindingComboEditDataSource(RepositoryItemComboBox edit, IList dataSource, string bindField);
public static void BindingComboEditItems(ComboBoxEdit edit, IList dataSource, string bindField);
public static void BindingControl(Control ctl, object dataSource, string bindField, string propertyName = "EditValue");
public static void BindingEditorPanel(Control editorPanel, object dataSource);
public static void BindingImageEdit(PictureEdit edit, object dataSource, string bindField);
public static void BindingLookupEditDataSource(LookUpEdit edit, object dataSource, string displayMember, string valueMember);
public static void BindingLookupEditDataSource(RepositoryItemLookUpEdit edit, object dataSource, string displayMember, string valueMember);
public static void BindingRadioEditItems(RadioGroup edit, IList dataSource, string displayMember, string valueMember);
public static void BindingTextEdit(BaseEdit edit, object dataSource, string bindField);
public static void BindingTextEditAmount(TextEdit edit, object dataSource, string bindField);
public static void BindingTextEditDateTime(TimeEdit edit, object dataSource, string bindField);
public static void BindingTextEditDateTime(DateEdit edit, object dataSource, string bindField);
public static void CurrencyStringToDecimal(object sender, ConvertEventArgs cevent);
public static void DateStringToDate(object sender, ConvertEventArgs cevent);
public static void DateToDateString(object sender, ConvertEventArgs cevent);
public static void DecimalToCurrencyString(object sender, ConvertEventArgs cevent);
public static void OnDateEditValueChange(object sender, EventArgs e);
public static void SetControlAccessable(Control container, bool value);
public static void SetControlAccessableByProp(Control control, bool value);
public static void SetControlAccessableCycle(Control container, bool value);
public static void SetControlEnable(Control container, bool value);
public static void SetEditorBindingValue(Control bindingControl, object value, bool setEditorValue);
public static void SetEditorBindingValue(Control bindingControl, object value);
public static void SetEditorEnable(TextEdit editor, bool enable, bool setBackgroundColor);
}
}
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
CSFrameworkV6 C/S框架网