SVN r747
SVN-Revision: r747
This commit is contained in:
@@ -71,7 +71,6 @@ namespace Lskj.Control
|
||||
/// 底部多标签表格数据
|
||||
/// </summary>
|
||||
public List<GridDetailModel> GridDetailList;
|
||||
|
||||
/// <summary>
|
||||
/// 左边查询条件
|
||||
/// </summary>
|
||||
@@ -383,7 +382,7 @@ namespace Lskj.Control
|
||||
//this.ModuleGridObj.GridControlObj.GridView.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(OnGridViewFocusedRowChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -480,7 +479,7 @@ namespace Lskj.Control
|
||||
else
|
||||
{
|
||||
DataRow rowItem = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
|
||||
string mainModuleCode = (rowItem[SysModel.MainModuleCodeField] + "").ToLower();
|
||||
string mainModuleCode = (rowItem[SysModel.MainModuleCodeField] + "").ToLower();
|
||||
//mainModuleCode = String.Empty;
|
||||
this.TabObj.TabPages.Clear();
|
||||
//if (string.IsNullOrWhiteSpace(mainModuleCode)) return;
|
||||
@@ -612,16 +611,25 @@ namespace Lskj.Control
|
||||
/// <param name="gridControl">The grid control.</param>
|
||||
protected void SetTabPageDataSource(XtraTabPage tabPage, bool isNull = false)
|
||||
{
|
||||
GridDetailModel model = this.tcButtom.GetGridDetailModel(tabPage);
|
||||
if (isNull)
|
||||
{
|
||||
DataRow leftrow = _leftGridSearchObj!=null?_leftGridSearchObj.MainGridEx.GetViewFocusedDataRow():null;
|
||||
if (model.IsUnionleft&& leftrow!=null)//为空状态下若明细关联左侧则去替换数据源
|
||||
{
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(leftrow, sqlValue);
|
||||
this.tcButtom.SetGridDataSource(tabPage, MainImpl.GetDataTableResult(sqlValue));
|
||||
return;
|
||||
}
|
||||
this.tcButtom.SetGridDataSource(tabPage, new DataTable());
|
||||
return;
|
||||
}
|
||||
GridDetailModel model = this.tcButtom.GetGridDetailModel(tabPage);
|
||||
|
||||
DataRow rowItem = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
|
||||
if (!string.IsNullOrEmpty(SysModel.PageVisbleCond) )
|
||||
if (!string.IsNullOrEmpty(SysModel.PageVisbleCond))
|
||||
{
|
||||
string condSql= ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(SysModel.PageVisbleCond));
|
||||
string condSql = ReplaceHelper.ReplaceRowParam(rowItem, ReplaceHelper.ReplaceUserInfo(SysModel.PageVisbleCond));
|
||||
// 形如 "1,2,3" 的返回值
|
||||
string numberList = MainImpl.GetResult(condSql) + "";
|
||||
|
||||
@@ -630,7 +638,7 @@ namespace Lskj.Control
|
||||
string[] idArr = numberList.Split(new[] { ',' },
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (!string.IsNullOrEmpty(numberList)&&!idArr.Contains(orderIdStr))
|
||||
if (!string.IsNullOrEmpty(numberList) && !idArr.Contains(orderIdStr))
|
||||
{
|
||||
tabPage.PageVisible = false;
|
||||
return; // 不包含当前 orderid,直接退出
|
||||
@@ -641,7 +649,7 @@ namespace Lskj.Control
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (IsDynamicDetailType)
|
||||
{
|
||||
//string mainModuleCode = model.ParentModuleCode;
|
||||
@@ -769,7 +777,7 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
if (moduleGridEx != null)
|
||||
if (moduleGridEx != null)
|
||||
{
|
||||
moduleGridEx.ParentButtonState(rowItem);
|
||||
moduleGridEx.SelectTheSpecifiedRow();
|
||||
@@ -845,9 +853,15 @@ namespace Lskj.Control
|
||||
{
|
||||
string fieldName = !string.IsNullOrEmpty(model.UnionParentField) && rowItem.Table.Columns.Contains(model.UnionParentField) ? model.UnionParentField : ModuleGridObj.ParmaryKey;
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
|
||||
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
if (model.IsUnionleft)
|
||||
{
|
||||
DataRow leftrow = _leftGridSearchObj.MainGridEx.GetViewFocusedDataRow();
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(leftrow, sqlValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
}
|
||||
DataRow row = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
|
||||
if (row != null && isLeft)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user