提交当前本机整理版本
This commit is contained in:
@@ -1843,35 +1843,8 @@ namespace Lskj.PubBillNewDrag
|
||||
unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null
|
||||
? new DataTable() : BillImpl.GetDataTableResult(ReplaceHelper.ReplaceRowParam(rowItem, unionModel.ModelObj.DetailSql));
|
||||
|
||||
//if (BillModel.drgFinishHide == "1"&& RemoveRowitem.Count>0)
|
||||
//{
|
||||
// DataTable finishHideTb = unionModel.GridDetailControlObj.GridControl.DataSourceTable();
|
||||
// if (BillModel.IsBillDetailCheck == 1)
|
||||
// {
|
||||
// DataTable RemoveRowitemTable = RemoveRowitem.CopyToDataTable();
|
||||
// if(RemoveRowitemTable.Columns.Contains("_check")) RemoveRowitemTable.Columns.Remove("_check");
|
||||
// //差集
|
||||
// IEnumerable<DataRow> QCJ = finishHideTb.Select().AsEnumerable().Except(RemoveRowitemTable.Select().AsEnumerable(), DataRowComparer.Default);
|
||||
// try {
|
||||
// DataTable jg = QCJ.CopyToDataTable();
|
||||
// unionModel.GridDetailControlObj.GridControl.DataSource = jg;
|
||||
// }
|
||||
// catch (System.InvalidOperationException ex) //如果差集为null,就回进当前报错
|
||||
// {
|
||||
// unionModel.GridDetailControlObj.GridControl.DataSource = null;
|
||||
// }
|
||||
|
||||
// }
|
||||
// else {
|
||||
// //差集
|
||||
// IEnumerable<DataRow> QCJ = finishHideTb.Select().AsEnumerable().Except(RemoveRowitem.AsEnumerable(), DataRowComparer.Default);
|
||||
// DataTable jg = QCJ.CopyToDataTable();
|
||||
// unionModel.GridDetailControlObj.GridControl.DataSource = jg;
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
DataTable table = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
|
||||
DataTable table = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
|
||||
if (table != null && !table.Columns.Contains("_check"))
|
||||
{
|
||||
table.Columns.Add("_check", typeof(bool));
|
||||
@@ -1894,8 +1867,25 @@ namespace Lskj.PubBillNewDrag
|
||||
// if (finishHideTb.Select().Contains(drItem)) finishHideTb.Rows.Remove(drItem);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
if (tb_buttom.TabControlObj.TabPages.Count > 0)
|
||||
{
|
||||
DataRow rowItem = unionModel.GridControlObj.GridView.GetFocusedDataRow();
|
||||
if (unionModel.ModelObj.SourceType == 3 || unionModel.ModelObj.SourceType == 4)
|
||||
{
|
||||
rowItem = unionModel.TreeGridControlObj.GetViewFocusedDataRow();
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -3621,12 +3611,22 @@ namespace Lskj.PubBillNewDrag
|
||||
{
|
||||
string fieldName = !string.IsNullOrEmpty(model.UnionParentField) && rowItem.Table.Columns.Contains(model.UnionParentField) ? model.UnionParentField : BillModel.PrimaryKey;
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
|
||||
string unioValue = string.Empty;
|
||||
unioValue = rowItem.Table.Columns.Contains(fieldName) ? rowItem[fieldName] + "" : string.Empty;
|
||||
if (this.ControlObj != null && string.IsNullOrEmpty(unioValue))
|
||||
{
|
||||
unioValue = !string.IsNullOrEmpty(model.UnionParentField) && this.ControlObj.FindControl(model.UnionParentField) != null ? this.ControlObj.GetControlValue(model.UnionParentField) : unioValue;
|
||||
}
|
||||
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
|
||||
|
||||
sqlValue = this.ControlObj.ReplaceControlValue(sqlValue);//后替换主表内容
|
||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||
{
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, rowItem[fieldName] + "");
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, unioValue);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.UnionCond))
|
||||
{
|
||||
string UnionCond = ReplaceHelper.ReplaceRowParam(rowItem, model.UnionCond);
|
||||
sqlValue += UnionCond;
|
||||
}
|
||||
return sqlValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user