SVN r924
SVN-Revision: r924
This commit is contained in:
@@ -52,6 +52,10 @@ namespace Lskj.Control
|
||||
private bool _working = false;
|
||||
private List<string> _queryQueue = new List<string>();
|
||||
/// <summary>
|
||||
/// 是否点击弹出框中的行
|
||||
/// </summary>
|
||||
private bool PopupBoxSelection = false;
|
||||
/// <summary>
|
||||
/// 显示值字段
|
||||
/// </summary>
|
||||
public string TextField
|
||||
@@ -236,7 +240,8 @@ namespace Lskj.Control
|
||||
if (this.Model != null && (this.Model.FieldType == ControlType.LabAutoGridValue || this.Model.FieldType == ControlType.LabAutoGridValueParam))
|
||||
{
|
||||
// 存在名称并且没有value值则
|
||||
if (control != null && !string.IsNullOrEmpty(control.EditText) && (string.IsNullOrEmpty(_value) || !control.EditText.Equals(this._textVlaue)))
|
||||
//PopupBoxSelection为ture时代表在弹出框中选中行,就不根据当前输入值判断了(可能输入一半查询到后就直接选中,或者输入123,选中1234,但是control.EditText值还是123导致出错)
|
||||
if (control != null && !string.IsNullOrEmpty(control.EditText) && (string.IsNullOrEmpty(_value) || !control.EditText.Equals(this._textVlaue))&& !PopupBoxSelection)
|
||||
{
|
||||
if (this.DataSource != null && this.DataSource is DataTable)
|
||||
{
|
||||
@@ -761,6 +766,8 @@ namespace Lskj.Control
|
||||
}
|
||||
return maxWidth;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 实际值发生改变触发
|
||||
/// </summary>
|
||||
@@ -770,6 +777,7 @@ namespace Lskj.Control
|
||||
{
|
||||
try
|
||||
{
|
||||
this.PopupBoxSelection = true;
|
||||
GridView gridView = sender as GridView;
|
||||
DataRow rowItem = gridView.GetFocusedDataRow();
|
||||
if (rowItem != null && rowItem.Table.Columns.Contains(ValueMember))
|
||||
@@ -782,6 +790,10 @@ namespace Lskj.Control
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.PopupBoxSelection = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -797,40 +809,4 @@ namespace Lskj.Control
|
||||
{
|
||||
this.EditValue = rowItem[ValueMember] + "";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:释放时清理数据源</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-03-16 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
private void OnLabelAutoGridLook_Disposed(object sender, EventArgs e)
|
||||
{
|
||||
if (this.DataSourceTable != null)
|
||||
{
|
||||
this.DataSourceTable.Clear();
|
||||
this.DataSourceTable.Dispose();
|
||||
}
|
||||
if (this.DataSource != null)
|
||||
{
|
||||
this.DataSource = null;
|
||||
}
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user