SVN r325
SVN-Revision: r325
This commit is contained in:
@@ -1371,8 +1371,8 @@ namespace Lskj.Control
|
||||
{
|
||||
foreach (GridColumnModel item in mControlList)
|
||||
{
|
||||
string ColId = string.Format("{0}^{1}", item.Id + "", this.CustomColumKey);// item.Id + "";
|
||||
DataTable dataTable = BaseImpl.GetDataTableResult(item.SqlSource);
|
||||
if (ControlType.IsNotLoadData(item.FieldType)) continue;
|
||||
DataTable dataTable = BaseImpl.GetDataTableResult(item.SqlSource);
|
||||
Application.DoEvents();
|
||||
|
||||
if (!item.Visible) continue;
|
||||
@@ -2173,7 +2173,7 @@ namespace Lskj.Control
|
||||
public override void SetGridViewDataSource(DataTable table, bool selectRowHandler = true)
|
||||
{
|
||||
lastNodeIndex = 0;
|
||||
if(selectRowHandler) lastNodeIndex = this.TreeListObj.GetVisibleIndexByNode(this.TreeListObj.FocusedNode);
|
||||
if (selectRowHandler) lastNodeIndex = this.TreeListObj.GetVisibleIndexByNode(this.TreeListObj.FocusedNode);
|
||||
GetTreeExpanded();
|
||||
this.gcMain.ClearNodes();
|
||||
this.gcMain.DataSource = table;
|
||||
@@ -2192,7 +2192,7 @@ namespace Lskj.Control
|
||||
GetTreeExpanded();
|
||||
this.gcMain.DataSource = dataSet.Tables[0];
|
||||
|
||||
|
||||
|
||||
return dataSet.Tables[0] != null ? dataSet.Tables[0].Rows.Count : 0;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -2614,7 +2614,9 @@ namespace Lskj.Control
|
||||
DialogResult result = modelLookUp.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
TreeListObj.ShowEditor();
|
||||
btnEdit.EditValue = modelLookUp.EditValue;
|
||||
TreeListObj.PostEditor();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2654,12 +2656,28 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
modelLookUp.NewSourceSQL = ReplaceHelper.ReplaceRowParam(this.GetViewFocusedDataRow(), SourceSQL);
|
||||
//modelLookUp.DataSource = BaseImpl.GetDataTableResult(modelLookUp.SourceSQL);
|
||||
modelLookUp.AddModuleResult = model.addModuleResult;
|
||||
modelLookUp.InitControls(modelLookUp.UnionModuleCodel);
|
||||
DialogResult result = modelLookUp.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
TreeListObj.ShowEditor();
|
||||
btnEdit.EditValue = modelLookUp.EditValue;
|
||||
TreeListObj.PostEditor();
|
||||
string[] resultFields = model.addModuleResult.Trim().Split(',');
|
||||
DataRow focusedRow = this.GetViewFocusedDataRow();
|
||||
if (focusedRow != null)
|
||||
{
|
||||
foreach (string resultKey in modelLookUp.ModuleResultDic.Keys)
|
||||
{
|
||||
string resultValue = modelLookUp.ModuleResultDic[resultKey];
|
||||
if (focusedRow.Table.Columns.Contains(resultKey))
|
||||
{
|
||||
focusedRow[resultKey] = resultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user