SVN-Revision: r431
This commit is contained in:
cyf
2025-04-02 08:39:39 +00:00
parent d69b0a7c1e
commit ad17816f5c
10 changed files with 230 additions and 67 deletions
@@ -785,6 +785,10 @@ namespace Lskj.Control
} }
} }
} }
// 隐藏分组面板
this.bandedGridView.OptionsView.ShowGroupPanel = false;
// 展开所有分组
this.bandedGridView.OptionsBehavior.AutoExpandAllGroups = true;//展开所有分组
} }
foreach (BandedGridColumn col in this.bandedGridView.Columns) foreach (BandedGridColumn col in this.bandedGridView.Columns)
{ {
+1 -1
View File
@@ -85,7 +85,7 @@ namespace Lskj.Control
this.lblFP.Text = "0"; this.lblFP.Text = "0";
} }
this.gcMain.GridControl.DataSource = null; this.gcMain.GridControl.DataSource = null;
this.SearchObj.SearchLastGrid(); this.SearchObj.SearchGrid();//为啥取上一次?
if (this.FpOtherRows != null && this.FpOtherRows.Length > 0) if (this.FpOtherRows != null && this.FpOtherRows.Length > 0)
{ {
DataTable table = this.gcMain.GridControl.DataSource as DataTable; DataTable table = this.gcMain.GridControl.DataSource as DataTable;
+32 -37
View File
@@ -109,7 +109,7 @@ namespace Lskj.Control
BandedGridView gridView = bandGridControlEx.GridView as BandedGridView; BandedGridView gridView = bandGridControlEx.GridView as BandedGridView;
BandedGridControlEx NewBandedGridControlEx = new BandedGridControlEx(); BandedGridControlEx NewBandedGridControlEx = new BandedGridControlEx();
BandedGridView gridView2 = NewBandedGridControlEx.GridView as BandedGridView; BandedGridView gridView2 = NewBandedGridControlEx.GridView as BandedGridView;
gridView2.Columns.Clear();//默认有2个列
List<string> boolList = new List<string>(); List<string> boolList = new List<string>();
List<string> datetimeList = new List<string>(); List<string> datetimeList = new List<string>();
List<string> visibleList = new List<string>(); List<string> visibleList = new List<string>();
@@ -364,7 +364,6 @@ namespace Lskj.Control
{ {
gridView2.OptionsView.ShowFooter = true; gridView2.OptionsView.ShowFooter = true;
firstColumn.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] { new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, firstColumn.FieldName.ToString(), "合计: {0:#,###}行") }); firstColumn.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] { new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, firstColumn.FieldName.ToString(), "合计: {0:#,###}行") });
if (SystemInfo.Instance.GroupSpecialMode) if (SystemInfo.Instance.GroupSpecialMode)
{ {
//gridView2.GroupSummary.Add(new DevExpress.XtraGrid.GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Count, firstColumn.FieldName.ToString(), firstColumn, "合计: {0:#,###}行")); //gridView2.GroupSummary.Add(new DevExpress.XtraGrid.GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Count, firstColumn.FieldName.ToString(), firstColumn, "合计: {0:#,###}行"));
@@ -454,7 +453,8 @@ 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.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam))
if (model != null && (model.FieldType == ControlType.LabMultiSelectValue || model.FieldType == ControlType.LabTreeLookValue || model.FieldType == ControlType.LabMultiSelectValueParam)|| model.FieldType == ControlType.LabSelectReturnId)
{ {
StoreValueList.Add(col.FieldName); StoreValueList.Add(col.FieldName);
} }
@@ -515,6 +515,10 @@ namespace Lskj.Control
{ {
newCol.DataType = typeof(DateTime); newCol.DataType = typeof(DateTime);
} }
if (StoreValueList.Contains(col.ColumnName))
{
newCol.DataType = typeof(String);
}
dtTable.Columns.Add(newCol); dtTable.Columns.Add(newCol);
} }
} }
@@ -610,7 +614,7 @@ 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 || if ((model.FieldType == ControlType.LabMultiSelectValue ||
model.FieldType == ControlType.LabMultiSelectValueParam ) && row[col.ColumnName].ToString().Contains(",")) model.FieldType == ControlType.LabMultiSelectValueParam ) && row[col.ColumnName].ToString().Contains(","))
{ {
@@ -959,6 +963,29 @@ namespace Lskj.Control
} }
} }
else if (model.FieldType == ControlType.LabSelectReturnId)
{
string sqlValue = model.SqlSource;
if (model.IsRadio&& !string.IsNullOrWhiteSpace(model.addModuleld))
{
//单选模式数据源为模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"]+"";
}
DataTable dataTable = Business.Impl.BaseImpl.GetDataTableResult(sqlValue);
Dictionary<string, string> translationDict = new Dictionary<string, string>();
foreach (DataRow item in dataTable.Rows)
{
string key = item[model.ValueMember].ToString();
string value = item[model.TextMember].ToString();
if (!translationDict.ContainsKey(key))
{
translationDict.Add(key, value);
}
}
ValueGridColumnTable.Add(model, translationDict);
}
} }
} }
} }
@@ -979,36 +1006,4 @@ namespace Lskj.Control
/// <para>修改人:</para> /// <para>修改人:</para>
/// <para>修改日期:</para> /// <para>修改日期:</para>
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0.0.3</para> /// <para>版
/// </summary>
/// <param name="control">The control.</param>
/// <returns>DataTable.</returns>
public string GetValueByImportText(GridColumnModel model, string text, bool isBillImport = false)
{
string value = text;
Dictionary<string, string> translationDict = null;
if (ValueGridColumnTable.TryGetValue(model, out translationDict))
{
if (translationDict != null && translationDict.Count > 0)
{
if (translationDict.TryGetValue(text, out string translatedValue))
{
value = translatedValue;
}
else
{
value = text;
}
}
else
{
value = "";
}
}
return value;
}
}
}
+15 -2
View File
@@ -275,10 +275,21 @@ namespace Lskj.Control
model.FieldType == ControlType.LabAutoCompleteValueParam || model.FieldType == ControlType.LabAutoCompleteValueParam ||
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
) )
{ {
string sqlValue = model.SqlSource; string sqlValue = model.SqlSource;
if (model.FieldType == ControlType.LabSelectReturnId)
{
if (model.IsRadio && !string.IsNullOrWhiteSpace(model.addModuleld))
{
//单选模式数据源为模块sql
DataRow modelRow = Business.Impl.MainImpl.GetSystemdllTab(model.addModuleld);
sqlValue = modelRow["SQL"] + "";
}
}
if (sqlValue.Contains(" #")) if (sqlValue.Contains(" #"))
{ {
//sqlValue = sqlValue.Replace("#", ""); //sqlValue = sqlValue.Replace("#", "");
@@ -457,7 +468,9 @@ namespace Lskj.Control
model.FieldType == ControlType.LabAutoCompleteValueParam || model.FieldType == ControlType.LabAutoCompleteValueParam ||
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
))
{ {
string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + ""); string fieldValue = GetValueByImportText(dr, gc.FieldName, dr[gc.FieldName] + "");
if (!string.IsNullOrEmpty(fieldValue)) if (!string.IsNullOrEmpty(fieldValue))
+61 -7
View File
@@ -361,6 +361,10 @@ namespace Lskj.Control
/// </summary> /// </summary>
public bool DisableFieldSources; public bool DisableFieldSources;
/// <summary> /// <summary>
/// 表格重新赋值数据源时,更新的列
/// </summary>
public string UpdateColumns;
/// <summary>
/// 聚合多表头控件 /// 聚合多表头控件
/// </summary> /// </summary>
public BandedGridControlEx CustomGroupBandEx; public BandedGridControlEx CustomGroupBandEx;
@@ -1168,12 +1172,13 @@ namespace Lskj.Control
this.mTimer.Dispose(); this.mTimer.Dispose();
} }
} }
private void SetColumnsSource(bool isResfush = false) private void SetColumnsSource(bool UpdateColumnRefresh = false)
{ {
foreach (GridColumnModel item in mControlList) foreach (GridColumnModel item in mControlList)
{ {
if (this.DisableFieldSources && item.isVislble) continue; if (this.DisableFieldSources && item.isVislble) continue;
if (ControlType.IsNotLoadData(item.FieldType)) continue; if (ControlType.IsNotLoadData(item.FieldType)) continue;
if (UpdateColumnRefresh && !string.IsNullOrWhiteSpace(UpdateColumns) &&!UpdateColumns.Split(',').Contains(item.FieldName)) continue;
if (!string.IsNullOrWhiteSpace(item.SqlSource)) if (!string.IsNullOrWhiteSpace(item.SqlSource))
{ {
DataTable dataTable = new DataTable(); DataTable dataTable = new DataTable();
@@ -1669,8 +1674,9 @@ namespace Lskj.Control
} }
} }
} }
this.ClearImage();
this.GridControl.DataSource = table; this.GridControl.DataSource = table;
this.AdjustIndicatorWidthSmart();
//modifyThePosition.Clear(); //modifyThePosition.Clear();
this.SetAutoColumns(); this.SetAutoColumns();
if (selectRowHandler) if (selectRowHandler)
@@ -1752,8 +1758,10 @@ namespace Lskj.Control
dt.Columns.Add("RightMenuBtnEdit"); dt.Columns.Add("RightMenuBtnEdit");
} }
this.GridControl.DataSource = dt;
this.ClearImage();
this.GridControl.DataSource = dt;
this.AdjustIndicatorWidthSmart();
//modifyThePosition.Clear(); //modifyThePosition.Clear();
// 动态列处理 // 动态列处理
this.SetAutoColumns(); this.SetAutoColumns();
@@ -2200,6 +2208,10 @@ namespace Lskj.Control
} }
} }
} }
// 隐藏分组面板
this.gridView.OptionsView.ShowGroupPanel = false;
// 展开所有分组
this.gridView.OptionsBehavior.AutoExpandAllGroups = true;//展开所有分组
} }
} }
foreach (GridColumn col in this.gridView.Columns) foreach (GridColumn col in this.gridView.Columns)
@@ -4493,6 +4505,29 @@ namespace Lskj.Control
} }
} }
/// <summary>
/// 设置序号列宽度
/// </summary>
public void AdjustIndicatorWidthSmart()
{
try
{
int rowCount = this.gridView.RowCount;
if (rowCount == 0) return;
// 计算数字部分宽度
int numberWidth = (int)(rowCount.ToString().Length * 7.5) + 16;
// 设置最终宽度(取较大值,并在40-80px之间)
this.gridView.IndicatorWidth = Math.Max(40, Math.Min(80, numberWidth));
}
catch (Exception ex)
{
}
}
/// <summary> /// <summary>
/// <para>说明:拖拽列</para> /// <para>说明:拖拽列</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
@@ -7573,12 +7608,12 @@ namespace Lskj.Control
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0</para> /// <para>版本:1.0</para>
/// </summary> /// </summary>
/// <param name="sender">The sender.</param> /// <param name="UpdateColumnRefresh">判断是否只刷新UpdateColumn中配置的列的数据源</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> public void RefreshDataSource(bool UpdateColumnRefresh=false)
public void RefreshDataSource()
{ {
this.mLoading = false; this.mLoading = false;
SetColumnsSource(true); mControlSourceDic.Clear();
SetColumnsSource(UpdateColumnRefresh);
} }
/// <summary> /// <summary>
@@ -7885,6 +7920,25 @@ namespace Lskj.Control
} }
} }
/// <summary>
/// 清空url图片列缓存
/// </summary>
private void ClearImage()
{
GridColumnCollection gridColumns = this.GridView.Columns;
foreach (GridColumn col in gridColumns)
{
GridColumnModel model = col.Tag as GridColumnModel;
if (model!=null&&model.FieldType == ControlType.LabPicUrl)
{
model.LabPicUrlImages = new Hashtable();
}
}
}
#region #region
/// <summary> /// <summary>
/// <para>说明:自身表格的拖拽类</para> /// <para>说明:自身表格的拖拽类</para>
+26 -2
View File
@@ -204,7 +204,7 @@ namespace Lskj.Control.Model
/// </summary> /// </summary>
public const int LabComboxValueParam = 35; public const int LabComboxValueParam = 35;
/// <summary> /// <summary>
/// 下拉列表框(带参数) 保存Value值,显示Text值 /// 下拉列表框(带参数) 保存Text值,显示Text值
/// </summary> /// </summary>
public const int LabComboxTextParam = 36; public const int LabComboxTextParam = 36;
/// <summary> /// <summary>
@@ -514,4 +514,28 @@ namespace Lskj.Control.Model
} }
/// <summary> /// <summary>
/// 不需要根据数据源sql获取数据源的控件
/// </summary>
/// <param name="fieldType"></param>
/// <returns></returns>
public static bool IsNotLoadData(int fieldType)
{
return fieldType == LabText ||
fieldType == LabDate ||
fieldType == LabDateTime ||
fieldType == LabDateTimeShort ||
fieldType == LabTime ||
fieldType == LabShortTime ||
fieldType == LabTextInt ||
fieldType == LabPassWordValue ||
fieldType == LabRemark ||
fieldType == LabMemoEdit ||
fieldType == LabWWW ||
fieldType == LabQQ ||
fieldType == LabPhone ||
fieldType == LabSelectReturnIdNew ||
fieldType == LabSelectReturnTextNew ||
fieldType == LabApiBtuton;
}
}
}
+42 -1
View File
@@ -3064,6 +3064,11 @@ namespace Lskj.Control.Model
{ {
if (this._mainGridEx != null) if (this._mainGridEx != null)
{ {
if (!string.IsNullOrWhiteSpace(this._mainGridEx.UpdateColumns))
{
this._mainGridEx.RefreshDataSource(true);
}
if (string.IsNullOrWhiteSpace(this._mainGridEx.LastSearchSql)) if (string.IsNullOrWhiteSpace(this._mainGridEx.LastSearchSql))
{ {
this.SearchGrid(); this.SearchGrid();
@@ -3072,12 +3077,15 @@ namespace Lskj.Control.Model
{ {
// 上一次查询 // 上一次查询
int oldRowHandle = GetFocusedRowHandle(); int oldRowHandle = GetFocusedRowHandle();
//int oldTopRowHandle = GetTopRowHandle();
if (_mainGridEx.IsHandleCreated) if (_mainGridEx.IsHandleCreated)
{ {
// 窗口加载完成搜索,采用异步加载 // 窗口加载完成搜索,采用异步加载
_mainGridEx.Invoke((EventHandler)delegate _mainGridEx.Invoke((EventHandler)delegate
{ {
//this._mainGridEx.GridView.BeginUpdate();
this.GridRowCount = this._mainGridEx.SetGridViewDataSource(MainImpl.GetAdapterResult(this._mainGridEx.LastSearchSql)); this.GridRowCount = this._mainGridEx.SetGridViewDataSource(MainImpl.GetAdapterResult(this._mainGridEx.LastSearchSql));
//this._mainGridEx.GridView.EndUpdate();
}); });
} }
else else
@@ -3092,6 +3100,7 @@ namespace Lskj.Control.Model
} }
SetFocusedRowHandle(oldRowHandle); SetFocusedRowHandle(oldRowHandle);
//SetTopRowHandle(oldTopRowHandle);
} }
} }
@@ -3104,7 +3113,6 @@ namespace Lskj.Control.Model
string Message = ErrorMessage.PromptErrorMessage(ex); string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message); MessageUtil.Show(Message, ex.Message);
} }
} }
/// <summary> /// <summary>
/// <para>说明:查询数据</para> /// <para>说明:查询数据</para>
@@ -4461,6 +4469,23 @@ namespace Lskj.Control.Model
} }
return oldRowHandle; return oldRowHandle;
} }
/// <summary>
/// 获取上一次顶部可见行
/// </summary>
/// <returns></returns>
private int GetTopRowHandle()
{
int oldRowHandle = 0;
if (_gridControl != null)
{
if (_gridControl.MainView is GridView)
{
oldRowHandle = (_gridControl.MainView as GridView).GetVisibleRowHandle((_gridControl.MainView as GridView).TopRowIndex);
}
}
return oldRowHandle;
}
/// <summary> /// <summary>
/// <para>说明:设置选中行</para> /// <para>说明:设置选中行</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
@@ -4489,6 +4514,22 @@ namespace Lskj.Control.Model
} }
} }
} }
/// <summary>
/// 设置顶部行位置(执行上一次sql刷新后,移动滚动条和上一次保持一致)
/// </summary>
/// <param name="rowHandle"></param>
private void SetTopRowHandle(int rowHandle)
{
if (_gridControl != null)
{
if (_gridControl.MainView is GridView)
{
if (rowHandle > 0) (_gridControl.MainView as GridView).TopRowIndex = rowHandle;
}
}
}
/// <summary> /// <summary>
/// <para>说明:设置查询条件</para> /// <para>说明:设置查询条件</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
+19 -1
View File
@@ -139,6 +139,8 @@ namespace Lskj.Control
public TreeListNode treeListNode; public TreeListNode treeListNode;
public ModuleEx() public ModuleEx()
{ {
InitializeComponent(); InitializeComponent();
@@ -1524,4 +1526,20 @@ namespace Lskj.Control
using (BinaryReader r = new BinaryReader(fs)) using (BinaryReader r = new BinaryReader(fs))
{ {
byte[] buffer = r.ReadBytes((int)fs.Length); byte[] buffer = r.ReadBytes((int)fs.Length);
int Result = BaseModuleImpl.SaveImage(this.SysModel.MenuTable, _labPicName, this.SysModel.ParmaryKey, this._currentRow[this.SysModel.ParmaryK int Result = BaseModuleImpl.SaveImage(this.SysModel.MenuTable, _labPicName, this.SysModel.ParmaryKey, this._currentRow[this.SysModel.ParmaryKey] + "", buffer);
MessageUtil.Show(Result > 0 ? ResourceKeys.SaveSuccess : ResourceKeys.SaveFault);
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 判断是否是selete开头(可以处理sql前方有注释和空格的情况)
+16 -3
View File
@@ -1571,6 +1571,12 @@ namespace Lskj.Control
MessageUtil.Show("请查询后添加!"); MessageUtil.Show("请查询后添加!");
return; return;
} }
if (!SysModel.CanEdit)
{
MessageUtil.Show("表格不可编辑,增加失败");
return;
}
if (!(dt.Columns.Contains(ERPInfo.Instance.isAddRows))) if (!(dt.Columns.Contains(ERPInfo.Instance.isAddRows)))
{ {
dt.Columns.Add(ERPInfo.Instance.isAddRows, typeof(String)); dt.Columns.Add(ERPInfo.Instance.isAddRows, typeof(String));
@@ -3266,6 +3272,7 @@ namespace Lskj.Control
this.SysModel = sysModel; this.SysModel = sysModel;
this.Model = model; this.Model = model;
this.gcMain.DisableFieldSources = this.SysModel.DisableFieldSources; this.gcMain.DisableFieldSources = this.SysModel.DisableFieldSources;
this.gcMain.UpdateColumns = this.SysModel.UpdateColumns;
//if (this.Model is DynamicModuleDetailModelInfo) //if (this.Model is DynamicModuleDetailModelInfo)
//{ //{
// DynamicModuleDetailModelInfo dynamic = this.Model as DynamicModuleDetailModelInfo; // DynamicModuleDetailModelInfo dynamic = this.Model as DynamicModuleDetailModelInfo;
@@ -4076,10 +4083,7 @@ namespace Lskj.Control
{ {
if (this.GridControlObj.CustomGroupBandEx != null)//保存前若存在虚拟多表头则反写修改 if (this.GridControlObj.CustomGroupBandEx != null)//保存前若存在虚拟多表头则反写修改
{ {
this.GridControlObj.callbackUpdData(); this.GridControlObj.callbackUpdData();
} }
int dataNumber = (this.GridControlObj.GridView.GetGridViewFilteredAndSortedDataToDataTable() as DataTable).Rows.Count; int dataNumber = (this.GridControlObj.GridView.GetGridViewFilteredAndSortedDataToDataTable() as DataTable).Rows.Count;
@@ -4743,6 +4747,15 @@ namespace Lskj.Control
{ {
this.SearchObj.SearchGrid(sourceTable); this.SearchObj.SearchGrid(sourceTable);
} }
if (this.SysModel.RecordRowUponExit)
{
string Handle = IniHelper.Read(string.Format("RecordRowUponExit_{0}", this.Model.ModuleCode));
if (!string.IsNullOrWhiteSpace(Handle) && int.Parse(Handle) > 0)
{
this.gcMain.GridView.SelectRowHandler(int.Parse(Handle));
}
}
} }
} }
} }
+12 -11
View File
@@ -522,7 +522,7 @@ namespace Lskj.Control
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0</para> /// <para>版本:1.0</para>
/// </summary> /// </summary>
private void SetUpdateData() private void SetUpdateData(bool FirstLoading= true)
{ {
//外面表格搜索条件赋值 //外面表格搜索条件赋值
if (!string.IsNullOrWhiteSpace(SearchObject) && SavaState) if (!string.IsNullOrWhiteSpace(SearchObject) && SavaState)
@@ -535,13 +535,7 @@ namespace Lskj.Control
} }
} }
if (!string.IsNullOrWhiteSpace(this.ControlSql))
{
DataRow rowItem = BaseImpl.GetDataRowResult(this.ControlSql);
this.ControlObj.CurrentData = rowItem;
this.ControlObj.SetAllControlValue(rowItem);
this.ControlObj.SyncLocalModel();
}
if (!string.IsNullOrWhiteSpace(this.PrimaryValue)) if (!string.IsNullOrWhiteSpace(this.PrimaryValue))
{ {
// 修改默认赋值 // 修改默认赋值
@@ -564,7 +558,14 @@ namespace Lskj.Control
{ {
this.ControlObj.SetControlValue(UnionKey, UnionValue); this.ControlObj.SetControlValue(UnionKey, UnionValue);
} }
//不如不是初始化时进入,就不加载配置数据源sql(添加或者修改后,执行赋值sql会导致保存的数据被覆盖)
if (!string.IsNullOrWhiteSpace(this.ControlSql)&& FirstLoading)
{
DataRow rowItem = BaseImpl.GetDataRowResult(this.ControlSql);
this.ControlObj.CurrentData = rowItem;
this.ControlObj.SetAllControlValue(rowItem);
this.ControlObj.SyncLocalModel();
}
this.ControlObj.CanExecControl = true; this.ControlObj.CanExecControl = true;
} }
/// <summary> /// <summary>
@@ -1244,7 +1245,7 @@ namespace Lskj.Control
} }
else else
{ {
SetUpdateData();//重新加载数据 SetUpdateData(false);//重新加载数据
} }
return true; return true;
} }
@@ -1274,7 +1275,7 @@ namespace Lskj.Control
} }
else else
{ {
SetUpdateData();//重新加载数据 SetUpdateData(false);//重新加载数据
btnApply.Enabled = btnCopyNew.Enabled = btnAttach.Enabled = true; btnApply.Enabled = btnCopyNew.Enabled = btnAttach.Enabled = true;
} }
return true; return true;