SVN-Revision: r258
This commit is contained in:
cyf
2025-02-08 06:34:46 +00:00
parent e910b8b55b
commit e776f3bd62
21 changed files with 2607 additions and 393 deletions
+2 -42
View File
@@ -57,6 +57,7 @@ namespace Lskj.Control
InitializeComponent();
}
/// <summary>
/// <para>说明:设置控件显示文本</para>
/// <para>创建人:龚宇超</para>
@@ -255,45 +256,4 @@ namespace Lskj.Control
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="dataSource">数据源</param>
public void SetDataSource(DataTable dataSource)
{
try
{
foreach (DataRow item in dataSource.Rows)
{
ComboBoxModel model = new ComboBoxModel
{
ValueMember = ValueField,
DisplayMember = TextField,
RowItem = item
};
this._sources.Add(model);
this.txtEdit.Properties.Items.Add(model);
}
}
catch (Exception)
{
}
}
}
class ComboBoxModel
{
public string ValueMember;
public string DisplayMember;
public DataRow RowItem;
public override string ToString()
{
return this.RowItem[DisplayMember] + "";
}
}
}
/// <para>版本: