#region "绑定填充comobox控件"
public class MyComboBoxControl
{
#region "自定义字段"
private string tIndexFieldName;
private string tValueFieldName;
private System.Collections.ArrayList tSourceArray;
private System.Windows.Forms.ComboBox tComboBox;
private System.Data.DataTable tSourceDataTable;
private string tError="";
private string[] tOtherField;
#endregion
#region "自定义属性"
///
///填充时可能发生的错误信息
///
public string error
{
get
{
return tError;
}
}
///
/// Combo控件可以绑定的数据表
///
public System.Data.DataTable SoureDataTable
{
get
{
return tSourceDataTable;
}
set
{
tSourceDataTable=value;
}
}
///
/// 保存数据的数组集合,将做为combo的数据源
///
public System.Collections.ArrayList SoureArray
{
get
{
return tSourceArray;
}
set
{
tSourceArray=value;
}
}
///
///数据源表提供的索引字段名称
///
public string IndexFieldName
{
get
{
return tIndexFieldName;
}
set
{
tIndexFieldName=value;
}
}
///