SVN r722
SVN-Revision: r722
This commit is contained in:
@@ -3350,25 +3350,6 @@ namespace Lskj.PubBill
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tb_buttom.TabControlObj.TabPages.Count > 0)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < this.tb_buttom.TabControlObj.TabPages.Count; i++)
|
|
||||||
{
|
|
||||||
XtraTabPage page = this.tb_buttom.TabControlObj.TabPages[i];
|
|
||||||
if (i == 0) continue;
|
|
||||||
if (rowItem != null && page != null)
|
|
||||||
{
|
|
||||||
this.SetTabPageDataSource(page, rowItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//foreach (XtraTabPage AttachPage in this.tb_buttom.TabControlObj.TabPages)
|
|
||||||
//{
|
|
||||||
// GridDetailModel model = tb_buttom.GetGridDetailModel(AttachPage);
|
|
||||||
// if (model == null) continue;
|
|
||||||
// string sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, model.DetailSql);
|
|
||||||
// this.tb_buttom.SetGridDataSource(AttachPage, sqlValue);
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
DataTable table = null;
|
DataTable table = null;
|
||||||
if (unionModel.ModelObj.sourceDetailType == "1")
|
if (unionModel.ModelObj.sourceDetailType == "1")
|
||||||
{
|
{
|
||||||
@@ -3399,6 +3380,26 @@ namespace Lskj.PubBill
|
|||||||
// 加载单据信息
|
// 加载单据信息
|
||||||
this.SetBillStatus(BillImpl.GetDataRowResult(masterSql));
|
this.SetBillStatus(BillImpl.GetDataRowResult(masterSql));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tb_buttom.TabControlObj.TabPages.Count > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.tb_buttom.TabControlObj.TabPages.Count; i++)
|
||||||
|
{
|
||||||
|
XtraTabPage page = this.tb_buttom.TabControlObj.TabPages[i];
|
||||||
|
if (i == 0) continue;
|
||||||
|
if (rowItem != null && page != null)
|
||||||
|
{
|
||||||
|
this.SetTabPageDataSource(page, rowItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//foreach (XtraTabPage AttachPage in this.tb_buttom.TabControlObj.TabPages)
|
||||||
|
//{
|
||||||
|
// GridDetailModel model = tb_buttom.GetGridDetailModel(AttachPage);
|
||||||
|
// if (model == null) continue;
|
||||||
|
// string sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, model.DetailSql);
|
||||||
|
// this.tb_buttom.SetGridDataSource(AttachPage, sqlValue);
|
||||||
|
//}
|
||||||
|
}
|
||||||
DataTable gridTable = (this.gcMain.GridControl.DataSource as DataTable).TrimDeleteRows();
|
DataTable gridTable = (this.gcMain.GridControl.DataSource as DataTable).TrimDeleteRows();
|
||||||
gridTable.OrderBy(this.BillModel.DetailOrderField);
|
gridTable.OrderBy(this.BillModel.DetailOrderField);
|
||||||
}
|
}
|
||||||
@@ -8485,4 +8486,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