SVN r716
SVN-Revision: r716
This commit is contained in:
@@ -57,6 +57,10 @@ namespace Lskj.PubBill
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private bool _isExcPrint;
|
private bool _isExcPrint;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 是否选择关联下发
|
||||||
|
/// </summary>
|
||||||
|
private bool _isCheck;
|
||||||
|
/// <summary>
|
||||||
/// 主打印Sql
|
/// 主打印Sql
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string _mainPrintSql;
|
private string _mainPrintSql;
|
||||||
@@ -2919,9 +2923,9 @@ namespace Lskj.PubBill
|
|||||||
DataRow dataRow = this.gcMain.GetViewFocusedDataRow();
|
DataRow dataRow = this.gcMain.GetViewFocusedDataRow();
|
||||||
GridControlEx gridControl = xtraTabPage.Tag as GridControlEx;
|
GridControlEx gridControl = xtraTabPage.Tag as GridControlEx;
|
||||||
GridDetailModel Detailmodel = gridControl.Tag as GridDetailModel;
|
GridDetailModel Detailmodel = gridControl.Tag as GridDetailModel;
|
||||||
Detailmodel.DetailSql = this.ControlObj.ReplaceControlValue(Detailmodel.DetailSql);
|
string DetailSql = this.ControlObj.ReplaceControlValue(Detailmodel.DetailSql);
|
||||||
Detailmodel.DetailSql = ReplaceHelper.ReplaceRowParam(dataRow, Detailmodel.DetailSql);
|
DetailSql = ReplaceHelper.ReplaceRowParam(dataRow, Detailmodel.DetailSql);
|
||||||
gridControl.SetGridViewDataSource(MainImpl.GetDataTableResult(Detailmodel.DetailSql));
|
gridControl.SetGridViewDataSource(MainImpl.GetDataTableResult(DetailSql));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5981,6 +5985,7 @@ namespace Lskj.PubBill
|
|||||||
unioValue = !string.IsNullOrEmpty(model.UnionParentField) && this.ControlObj.FindControl(model.UnionParentField) != null ? this.ControlObj.GetControlValue(model.UnionParentField) : unioValue;
|
unioValue = !string.IsNullOrEmpty(model.UnionParentField) && this.ControlObj.FindControl(model.UnionParentField) != null ? this.ControlObj.GetControlValue(model.UnionParentField) : unioValue;
|
||||||
}
|
}
|
||||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||||
|
sqlValue = this.ControlObj.ReplaceControlValue(sqlValue);//后替换主表内容
|
||||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||||
{
|
{
|
||||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, unioValue);
|
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, unioValue);
|
||||||
@@ -8479,4 +8484,34 @@ namespace Lskj.PubBill
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cond">The cond.</param>
|
/// <param name="cond">The cond.</param>
|
||||||
/// <param name="dataRow">The data row.</param>
|
/// <param name="dataRow">The data row.</param>
|
||||||
/// <returns><c>true</c> if X
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
|
private bool ValidateCond(string cond, DataRow dataRow)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
string condition = cond;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(cond)) return true;//如果值是空格或者空行,默认正确
|
||||||
|
cond = ReplaceHelper.ReplaceRowParam(dataRow, cond);
|
||||||
|
if (cond.StartsWith("@") || cond.StartsWith("!"))
|
||||||
|
{
|
||||||
|
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
|
||||||
|
}
|
||||||
|
else if (dataRow == null)
|
||||||
|
{
|
||||||
|
result = ReplaceHelper.EvalCond(cond);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = ReplaceHelper.ReplaceRowParamCond(dataRow, cond);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user