SVN-Revision: r949
This commit is contained in:
cyf
2025-08-14 08:47:36 +00:00
parent 648ff1099d
commit 18b823a11e
6 changed files with 135 additions and 68 deletions
@@ -24,6 +24,11 @@ namespace Lskj.Control
{ {
public partial class AutoGridLookUp : TextEdit public partial class AutoGridLookUp : TextEdit
{ {
/// <summary>
/// 只查询名称
/// </summary>
public bool OnlyQueryName = false;
/// <summary> /// <summary>
/// 是否能直接弹出框 /// 是否能直接弹出框
/// </summary> /// </summary>
@@ -529,11 +534,22 @@ namespace Lskj.Control
{ {
string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' "; string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]")); sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]"));
if (OnlyQueryName)
{
sql = "select top 500 * from ({0}) temp where {1} like '%{2}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, TextMember, (searchText + "").Replace("[", "[[]"));
}
} }
else else
{ {
string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' or dbo.P_getpy({2}) like '%{3}%' "; string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' or dbo.P_getpy({2}) like '%{3}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]")); sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]"));
if (OnlyQueryName)
{
sql = "select top 500 * from ({0}) temp where {1} like '%{2}%' or dbo.P_getpy({1}) like '%{2}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, replace ? SourceSQL.Replace("#", "") : SourceSQL, TextMember, (searchText + "").Replace("[", "[[]"));
}
} }
if (Model != null && !string.IsNullOrEmpty(Model.AddOrderByCond)) if (Model != null && !string.IsNullOrEmpty(Model.AddOrderByCond))
{ {
@@ -1454,12 +1470,23 @@ namespace Lskj.Control
{ {
string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' "; string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]")); sqlValue = string.Format(sql + remarkCond + AddConditions, SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]"));
if (OnlyQueryName)
{
sql = "select top 500 * from ({0}) temp where {1} like '%{2}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, SourceSQL, TextMember, (searchText + "").Replace("[", "[[]"));
}
} }
else else
{ {
string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' or dbo.P_getpy({2}) like '%{3}%' "; string sql = "select top 500 * from ({0}) temp where {1} like '%{3}%' or {2} like '%{3}%' or dbo.P_getpy({2}) like '%{3}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions, SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]")); sqlValue = string.Format(sql + remarkCond + AddConditions, SourceSQL, ValueField, TextMember, (searchText + "").Replace("[", "[[]"));
if (OnlyQueryName)
{
sql = "select top 500 * from ({0}) temp where {1} like '%{2}%' or dbo.P_getpy({1}) like '%{2}%' ";
sqlValue = string.Format(sql + remarkCond + AddConditions,SourceSQL, TextMember, (searchText + "").Replace("[", "[[]"));
}
} }
if (Model != null && !string.IsNullOrEmpty(Model.AddOrderByCond)) if (Model != null && !string.IsNullOrEmpty(Model.AddOrderByCond))
{ {
+6
View File
@@ -716,6 +716,8 @@ namespace Lskj.MiniBlink
} }
} }
protected override void OnMouseUp(MouseEventArgs e) protected override void OnMouseUp(MouseEventArgs e)
{
try
{ {
base.OnMouseUp(e); base.OnMouseUp(e);
uint msg = 0; uint msg = 0;
@@ -745,6 +747,10 @@ namespace Lskj.MiniBlink
//} //}
} }
} }
catch (Exception)
{
}
}
protected override void OnMouseMove(MouseEventArgs e) protected override void OnMouseMove(MouseEventArgs e)
{ {
//base.OnMouseMove(e); //base.OnMouseMove(e);
+15 -8
View File
@@ -133,9 +133,10 @@ namespace Lskj.Control
hasBoolean = true; hasBoolean = true;
} }
GridColumnModel model = col.Tag as GridColumnModel; GridColumnModel model = col.Tag as GridColumnModel;
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId)) if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)))
{ {
StoreValueList.Add(col.FieldName); StoreValueList.Add(col.FieldName);
hasBoolean = true;
} }
} }
@@ -454,9 +455,10 @@ namespace Lskj.Control
} }
GridColumnModel model = col.Tag as GridColumnModel; GridColumnModel model = col.Tag as GridColumnModel;
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId)) if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)))
{ {
StoreValueList.Add(col.FieldName); StoreValueList.Add(col.FieldName);
hasBoolean = true;
} }
} }
@@ -618,9 +620,11 @@ namespace Lskj.Control
if (gridColumn.Tag is GridColumnModel) if (gridColumn.Tag is GridColumnModel)
{ {
GridColumnModel model = gridColumn.Tag as GridColumnModel; GridColumnModel model = gridColumn.Tag as GridColumnModel;
//|| model.FieldType == ControlType.LabSelectReturnId
if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
model.FieldType == ControlType.LabMultiSelectValueParam ) && row[col.ColumnName].ToString().Contains(",")) model.FieldType == ControlType.LabMultiSelectValueParam) && row[col.ColumnName].ToString().Contains(",") ||
(model.FieldType == ControlType.LabSelectReturnId && !model.IsRadio) ||
(model.FieldType == ControlType.LabSelectReturnIdNew && !model.IsRadio && model.ModuleFrameDisplayText))
{ {
string[] cellText = row[col.ColumnName].ToString().Split(','); string[] cellText = row[col.ColumnName].ToString().Split(',');
fieldValue = string.Empty; fieldValue = string.Empty;
@@ -746,6 +750,7 @@ namespace Lskj.Control
{ {
for (int i = 1; i < this.gridView1.Columns.Count; i++) for (int i = 1; i < this.gridView1.Columns.Count; i++)
{ {
string columnName = this.gridView1.Columns[i].FieldName; string columnName = this.gridView1.Columns[i].FieldName;
GridSummaryItem gsi = gridView.Columns[columnName].SummaryItem; GridSummaryItem gsi = gridView.Columns[columnName].SummaryItem;
if (gsi.SummaryType != DevExpress.Data.SummaryItemType.None) //gsi.SummaryValue!=null&& !string.IsNullOrEmpty(gsi.SummaryValue.ToString()) if (gsi.SummaryType != DevExpress.Data.SummaryItemType.None) //gsi.SummaryValue!=null&& !string.IsNullOrEmpty(gsi.SummaryValue.ToString())
@@ -764,6 +769,8 @@ namespace Lskj.Control
} }
} }
} }
} }
} }
@@ -968,14 +975,14 @@ namespace Lskj.Control
} }
} }
else if (model.FieldType == ControlType.LabSelectReturnId) else if (model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew&& model.ModuleFrameDisplayText))
{ {
string sqlValue = model.SqlSource; string sqlValue = model.SqlSource;
if (model.IsRadio&& !string.IsNullOrWhiteSpace(model.addModuleld)) if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld))|| model.FieldType == ControlType.LabSelectReturnIdNew)
{ {
//单选模式数据源为模块sql //单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld); DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"]+""; sqlValue = modelRow["SQL"] + "";
} }
DataTable dataTable = Business.Impl.BaseImpl.GetDataTableResult(sqlValue); DataTable dataTable = Business.Impl.BaseImpl.GetDataTableResult(sqlValue);
Dictionary<string, string> translationDict = new Dictionary<string, string>(); Dictionary<string, string> translationDict = new Dictionary<string, string>();
+10 -6
View File
@@ -277,15 +277,16 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValueNew|| model.FieldType == ControlType.LabMultiSelectValueNew||
model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue|| model.FieldType == ControlType.LabAutoGridValue||
model.FieldType == ControlType.LabSelectReturnId model.FieldType == ControlType.LabSelectReturnId||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
) )
{ {
string sqlValue = model.SqlSource; string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId) if (model.FieldType == ControlType.LabSelectReturnId|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText))
{ {
if (model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld))|| model.FieldType == ControlType.LabSelectReturnIdNew)
{ {
//单选模式数据源为模块sql //单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld); DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"] + ""; sqlValue = modelRow["SQL"] + "";
} }
@@ -326,7 +327,9 @@ namespace Lskj.Control
{ {
string selWhere = "1=1"; string selWhere = "1=1";
DataTable table = this.ValueGridColumnTable[model]; DataTable table = this.ValueGridColumnTable[model];
if (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabMultiSelectValueParam) if (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabMultiSelectValueParam
||(model.FieldType == ControlType.LabSelectReturnId && !model.IsRadio)
||(model.FieldType == ControlType.LabSelectReturnIdNew && !model.IsRadio && model.ModuleFrameDisplayText))
{ {
string[] splitString = text.Split(','); string[] splitString = text.Split(',');
string nemValue = string.Empty; string nemValue = string.Empty;
@@ -480,7 +483,8 @@ namespace Lskj.Control
model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValue ||
model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue|| model.FieldType == ControlType.LabAutoGridValue||
model.FieldType == ControlType.LabSelectReturnId model.FieldType == ControlType.LabSelectReturnId||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
)) ))
{ {
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + ""); string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
+44 -26
View File
@@ -1964,7 +1964,9 @@ namespace Lskj.Control.Model
string selWhere = "1=1"; string selWhere = "1=1";
DataTable table = ValueGridColumnTable[model]; DataTable table = ValueGridColumnTable[model];
if (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabMultiSelectValueParam) if (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || model.FieldType == ControlType.LabMultiSelectValueParam
|| (model.FieldType == ControlType.LabSelectReturnId && !model.IsRadio)
|| (model.FieldType == ControlType.LabSelectReturnIdNew && !model.IsRadio && model.ModuleFrameDisplayText))
{ {
string[] splitString = text.Split(','); string[] splitString = text.Split(',');
string nemValue = string.Empty; string nemValue = string.Empty;
@@ -2181,7 +2183,7 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabDateTime || model.FieldType == ControlType.LabDateTime ||
model.FieldType == ControlType.LabDateTimeShort || model.FieldType == ControlType.LabDateTimeShort ||
model.FieldType == ControlType.LabTime || model.FieldType == ControlType.LabTime ||
model.FieldType == ControlType.LabShortTime)&& (cell == null || cell.CellType == CellType.Blank||string.IsNullOrWhiteSpace(cell+""))) model.FieldType == ControlType.LabShortTime)&& (cell == null&&cell.StringCellValue!=null && cell.CellType == CellType.Blank && string.IsNullOrWhiteSpace(cell+"")))
{ {
//日期框如果值是空,就直接跳过。赋空值("")会报错 //日期框如果值是空,就直接跳过。赋空值("")会报错
continue; continue;
@@ -2240,20 +2242,21 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue || model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam || model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnId
||(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
)) ))
{ {
bool isEmpty = model.CanNull; bool isEmpty = model.CanNull;
string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport); string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport);
if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || // if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(",")) //model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
{ // {
string[] cellText = cell.ToString().Split(','); // string[] cellText = cell.ToString().Split(',');
foreach (string cellValue in cellText) // foreach (string cellValue in cellText)
{ // {
fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ','; // fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
} // }
fieldValue = fieldValue.TrimEnd(','); // fieldValue = fieldValue.TrimEnd(',');
} // }
if (string.IsNullOrEmpty(fieldValue)) if (string.IsNullOrEmpty(fieldValue))
{ {
if (isEmpty) if (isEmpty)
@@ -2585,20 +2588,21 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue || model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam || model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
)) ))
{ {
bool isEmpty = model.CanNull; bool isEmpty = model.CanNull;
string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport); string fieldValue = GetValueByImportText(dataRow, col.FieldName, cell + "", isBillImport);
if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew || // if ((model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValueNew ||
model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(",")) //model.FieldType == ControlType.LabMultiSelectValueParam) && cell.ToString().Contains(","))
{ // {
string[] cellText = cell.ToString().Split(','); // string[] cellText = cell.ToString().Split(',');
foreach (string cellValue in cellText) // foreach (string cellValue in cellText)
{ // {
fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ','; // fieldValue += GetValueByImportText(dataRow, col.FieldName, cellValue, isBillImport) + ',';
} // }
fieldValue = fieldValue.TrimEnd(','); // fieldValue = fieldValue.TrimEnd(',');
} // }
if (string.IsNullOrEmpty(fieldValue)) if (string.IsNullOrEmpty(fieldValue))
{ {
if (isEmpty) if (isEmpty)
@@ -3009,7 +3013,8 @@ namespace Lskj.Control.Model
model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabMultiSelectValue ||
model.FieldType == ControlType.LabMultiSelectValueParam || model.FieldType == ControlType.LabMultiSelectValueParam ||
model.FieldType == ControlType.LabAutoGridValue || model.FieldType == ControlType.LabAutoGridValue ||
model.FieldType == ControlType.LabSelectReturnId model.FieldType == ControlType.LabSelectReturnId||
(model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
)) ))
{ {
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + ""); string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
@@ -3417,14 +3422,15 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue || model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam || model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
) )
{ {
string sqlValue = model.SqlSource; string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId) if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew)
{ {
if (model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) ||model.FieldType == ControlType.LabSelectReturnIdNew)
{ {
//单选模式数据源为模块sql //单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld); DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"] + ""; sqlValue = modelRow["SQL"] + "";
} }
@@ -3491,9 +3497,21 @@ namespace Lskj.Control.Model
|| model.FieldType == ControlType.LabAutoGridValue || model.FieldType == ControlType.LabAutoGridValue
|| model.FieldType == ControlType.LabAutoGridValueParam || model.FieldType == ControlType.LabAutoGridValueParam
|| model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnId
|| (model.FieldType == ControlType.LabSelectReturnIdNew && model.ModuleFrameDisplayText)
) )
{ {
string sqlValue = model.SqlSource; string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId || model.FieldType == ControlType.LabSelectReturnIdNew)
{
if ((model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld)) || model.FieldType == ControlType.LabSelectReturnIdNew)
{
//单选模式数据源为模块sql 新版模块选中返回id固定位模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"] + "";
}
}
if (sqlValue.Contains(" #")) if (sqlValue.Contains(" #"))
{ {
//sqlValue = sqlValue.Replace("#", ""); //sqlValue = sqlValue.Replace("#", "");
+6 -1
View File
@@ -93,7 +93,6 @@ namespace Lskj.Control
this.TreeListObj.CustomDrawNodeIndicator += TreeListObj_CustomDrawNodeIndicator;//显示行号 this.TreeListObj.CustomDrawNodeIndicator += TreeListObj_CustomDrawNodeIndicator;//显示行号
this.gcMain.CellValueChanged += GcMain_CellValueChanged; this.gcMain.CellValueChanged += GcMain_CellValueChanged;
this.gcMain.NodesReloaded += OnNodesReloaded; this.gcMain.NodesReloaded += OnNodesReloaded;
this.gcMain.ColumnFilterChanged += TreeList1_ColumnFilterChanged; this.gcMain.ColumnFilterChanged += TreeList1_ColumnFilterChanged;
@@ -1134,6 +1133,12 @@ namespace Lskj.Control
btnEdit.SeparatorChar = ','; btnEdit.SeparatorChar = ',';
btnEdit.ValueMember = model.FieldType == ControlType.LabSelectReturnIdNew ? model.ValueMember : model.TextMember; btnEdit.ValueMember = model.FieldType == ControlType.LabSelectReturnIdNew ? model.ValueMember : model.TextMember;
//btnEdit.DataSource = MainImpl.GetDataTableResult(model.SqlSource); //btnEdit.DataSource = MainImpl.GetDataTableResult(model.SqlSource);
if (model.ModuleFrameDisplayText)
{
DataTable dataTable = MainImpl.GetDataTableResult(modelLookUp.SysModel.MenuSql);
btnEdit.DataSource = dataTable;
}
btnEdit.Buttons[0].Visible = false; // 不能移除,移除后事件不起作用. btnEdit.Buttons[0].Visible = false; // 不能移除,移除后事件不起作用.
btnEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis) }); btnEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis) });