SVN r754
SVN-Revision: r754
This commit is contained in:
@@ -618,6 +618,19 @@ namespace Lskj.Control
|
||||
if (model.IsUnionleft&& leftrow!=null)//为空状态下若明细关联左侧则去替换数据源
|
||||
{
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
|
||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||
{
|
||||
string Conditions = string.Empty;
|
||||
//是左侧选中行,并且没有替换字段,则使用主表选中行
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, Conditions);
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.UnionCond))
|
||||
{
|
||||
string UnionCond = ReplaceHelper.ReplaceRowParam(leftrow, model.UnionCond);
|
||||
sqlValue += UnionCond;
|
||||
}
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(leftrow, sqlValue);
|
||||
this.tcButtom.SetGridDataSource(tabPage, MainImpl.GetDataTableResult(sqlValue));
|
||||
return;
|
||||
@@ -853,7 +866,7 @@ 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;
|
||||
if (model.IsUnionleft)
|
||||
if (model.IsUnionleft&& _leftGridSearchObj!=null)
|
||||
{
|
||||
DataRow leftrow = _leftGridSearchObj.MainGridEx.GetViewFocusedDataRow();
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(leftrow, sqlValue);
|
||||
|
||||
Reference in New Issue
Block a user