SVN-Revision: r817
This commit is contained in:
cyf
2025-07-01 09:32:39 +00:00
parent fd1c1b8a3f
commit b3a87d0b11
5 changed files with 817 additions and 186 deletions
+560 -184
View File
@@ -1095,13 +1095,13 @@ namespace Lskj.PubBill
else if (this.BillModel.DetailTreeTable) else if (this.BillModel.DetailTreeTable)
{ {
(this.gcMain as TreeGridControlEx).SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridViewRightCallBack, this.ControlObj, (this.gcMain as TreeGridControlEx).MenuStrip); (this.gcMain as TreeGridControlEx).SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridViewRightCallBack, this.ControlObj, (this.gcMain as TreeGridControlEx).MenuStrip);
(this.gcMain as TreeGridControlEx).TreeListObj.DoubleClick += new EventHandler(OnGridViewDoubleClick); //(this.gcMain as TreeGridControlEx).TreeListObj.DoubleClick += new EventHandler(OnGridViewDoubleClick);//和下方行单击事件功能一致(TreeListObj_MouseClick),同样的sql会重复执行。先注释 2025-06-30
(this.gcMain as TreeGridControlEx).TreeListObj.ShowingEditor += new CancelEventHandler(OnGridViewShowingEditor); (this.gcMain as TreeGridControlEx).TreeListObj.ShowingEditor += new CancelEventHandler(OnGridViewShowingEditor);
} }
else else
{ {
this.gcMain.SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridViewRightCallBack, this.ControlObj); this.gcMain.SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridViewRightCallBack, this.ControlObj);
this.gcMain.GridView.DoubleClick += new EventHandler(OnGridViewDoubleClick); //this.gcMain.GridView.DoubleClick += new EventHandler(OnGridViewDoubleClick);//和下方行单击事件功能一致(OngcMainRowCellClick),同样的sql会重复执行。先注释 2025-06-30
this.gcMain.GridView.ShowingEditor += new CancelEventHandler(OnGridViewShowingEditor); this.gcMain.GridView.ShowingEditor += new CancelEventHandler(OnGridViewShowingEditor);
} }
@@ -1655,6 +1655,11 @@ namespace Lskj.PubBill
{ {
this.tb_buttom.OnDetailSaveGridCallBack += Tab_OnDetailSaveGridCallBack; this.tb_buttom.OnDetailSaveGridCallBack += Tab_OnDetailSaveGridCallBack;
} }
if (this.BillModel.RefreshSelectedDetail)
{
//配置了只刷新当前页签后,切换页签时刷新
this.tb_buttom.TabControlObj.SelectedPageChanged += TabControlObj_SelectedPageChanged;
}
this.tb_buttom.InitTabPages(attachModels); this.tb_buttom.InitTabPages(attachModels);
this.tb_buttom.OnRightCallback += new EventHandler(OnButtomRightCallBack); this.tb_buttom.OnRightCallback += new EventHandler(OnButtomRightCallBack);
} }
@@ -1682,6 +1687,8 @@ namespace Lskj.PubBill
XtraTabPage tabPage = new XtraTabPage(); XtraTabPage tabPage = new XtraTabPage();
tabPage.Text = model.UserName; tabPage.Text = model.UserName;
#region #region
if (!string.IsNullOrWhiteSpace(model.CodeInputSql) && !string.IsNullOrWhiteSpace(model.CodeInputCaption)) if (!string.IsNullOrWhiteSpace(model.CodeInputSql) && !string.IsNullOrWhiteSpace(model.CodeInputCaption))
{ {
@@ -1742,12 +1749,37 @@ namespace Lskj.PubBill
{ {
dtBaseGridRightMenus = BaseModuleImpl.GetBaseGridRightMenus("BILLSOURCE_" + model.FormKey); dtBaseGridRightMenus = BaseModuleImpl.GetBaseGridRightMenus("BILLSOURCE_" + model.FormKey);
} }
//节点编号
if (!string.IsNullOrWhiteSpace(model.SourceKeyFieldName)) (gridControl as TreeGridControlEx).TreeListObj.KeyFieldName = model.SourceKeyFieldName;
//父节点编号
if (!string.IsNullOrWhiteSpace(model.SourceParentFieldName)) (gridControl as TreeGridControlEx).TreeListObj.ParentFieldName = model.SourceParentFieldName;
gridControl.SetReadOnlyColumns(dtSourceColumns, GridCustomColumnStruct.BillSourceGridView + model.FormKey); gridControl.SetReadOnlyColumns(dtSourceColumns, GridCustomColumnStruct.BillSourceGridView + model.FormKey);
gridControl.SetGridRowColors(dtBaseGridRowColors); gridControl.SetGridRowColors(dtBaseGridRowColors);
gridControl.SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridControlRightCallback); //gridControl.SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridControlRightCallback);
(gridControl as TreeGridControlEx).SetGridRightMenus(dtBaseGridRightMenus, this.SysModel, OnGridControlRightCallback);
unionModel.TreeGridControlObj = gridControl as TreeGridControlEx; unionModel.TreeGridControlObj = gridControl as TreeGridControlEx;
unionModel.TreeGridControlObj.TreeListObj.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(OnTreeListObjFocusedNodeChanged); unionModel.TreeGridControlObj.TreeListObj.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(OnTreeListObjFocusedNodeChanged);
if (model.SourceType == 4)
{
//来源拖拽到主表
if (this.BillModel.DetailTreeTable)
{
TreeGridDragTree treeGridDragTree = new TreeGridDragTree((gridControl as TreeGridControlEx).TreeListObj, (this.gcMain as TreeGridControlEx).TreeListObj);
treeGridDragTree.CanDragParentNode = true;
treeGridDragTree.NeglectingNodes = true;
treeGridDragTree.OnDragComplete += TreeGridDragTree_OnDragComplete;
}
else
{
TreeGridDragGrid treeGridDragGrid = new TreeGridDragGrid((gridControl as TreeGridControlEx).TreeListObj, this.gcMain.GridView);
treeGridDragGrid.OnDragComplete += TreeGridDragGrid_OnDragComplete;
}
}
tabPage.Controls.Add(gridControl); tabPage.Controls.Add(gridControl);
} }
else else
@@ -1817,6 +1849,13 @@ namespace Lskj.PubBill
#region #region
XtraTabPage tabDetail = new XtraTabPage(); XtraTabPage tabDetail = new XtraTabPage();
if (SystemInfo.Instance.GridRowFontSize > 0)
{
//页签大小
FontFamily fontFamily = tabDetail.Appearance.Header.Font.FontFamily;
tabDetail.Appearance.Header.Font = new System.Drawing.Font(fontFamily, SystemInfo.Instance.GridRowFontSize);
}
DataRow[] detailColumns = detailTable.Select("sourceId=" + model.Id); DataRow[] detailColumns = detailTable.Select("sourceId=" + model.Id);
@@ -2075,6 +2114,193 @@ namespace Lskj.PubBill
/// <summary>
/// 单据来源拖拽到主表明细中(树表格拖拽到树表格)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TreeGridDragTree_OnDragComplete(object sender, TreeGridDragTreeGridArgs e)
{
if (e.GridViewSelectRows == null || e.GridViewSelectRows.Length == 0) return;
try
{
if (this.CanAddDetailRow())
{
if (this.BillModel.DisableDragPrompt || MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes)
{
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
TreeListNode focusedNode = e.SourceTreeList.FocusedNode;
var selectedNodes = e.SourceTreeList.Selection;
int i = 0;
foreach (TreeListNode treeNode in e.SourceTreeList.Selection)
{
// 拖动多行,所以明细数据改为动态查询
DataRowView dataRowView = e.SourceTreeList.GetDataRecordByNode(treeNode) as DataRowView;
DataRow rowItem = dataRowView != null ? dataRowView.Row : null;
this.RefreshSourceDetail(tabPage.Tag as BillSourceUnionModel);
DataTable details = BillImpl.GetDataTableResult(ReplaceHelper.ReplaceRowParam(rowItem, unionModel.ModelObj.DetailSql));
if (unionModel.ModelObj.sourceDetailType != "1" && unionModel.GridDetailControlObj.GridView != null && focusedNode == treeNode)
{
//details = unionModel.GridDetailControlObj.GridView.GetGridViewFilteredAndSortedDataToDataTable();
details = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
}
else if (unionModel.ModelObj.sourceDetailType == "1" && unionModel.TreeGridDetailControlObj.TreeListObj != null && focusedNode == treeNode)
{
details = unionModel.TreeGridDetailControlObj.TreeListObj.DataSource as DataTable;
}
//details = GetGridViewFilteredAndSortedDataToDataTable(unionModel.GridDetailControlObj.GridView);
//DataTable details = unionModel.GridDetailControlObj.GridView.DataController.GetAllFilteredAndSortedRows().OfType<DataRow>().CopyToDataTable();
this.ControlObj.SetAllControlValue(rowItem, true);
if (unionModel.ModelObj.CadDragDetail)
{
this.AddMultiRowToGridView(details, unionModel);
if (BillModel.drgFinishHide == "1" && unionModel.GridDetailControlObj != null)
{
var detailRows = details.AsEnumerable().ToList();
foreach (var detailRow in detailRows)
{
if (unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{
unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
}
if (unionModel.GridDetailDetailControlObj != null && unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{
unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
}
}
}
}
//单据为新增状态,根据最后一行的内容设置红蓝单据
if (!this.BillModel.SaveState && e.SourceTreeList.Selection.Count - 1 == i && rowItem.Table.Columns.Contains(this.BillModel.RtagidKey) && this.BillModel.BillFlag != 0 && this.BillModel.BillFlag != 1)
{
if ("0".Equals(rowItem[this.BillModel.RtagidKey] + ""))
{
this.rdBlue.Checked = true;
this.OnBlueStateClick(null, null);
}
if ("1".Equals(rowItem[this.BillModel.RtagidKey] + ""))
{
this.rdRed.Checked = true;
this.OnRedStateClick(null, null);
}
}
i++;
}
if (unionModel.ModelObj.DragAndSave && e.SourceTreeList.Selection.Count == i && i != 0)
{
this.OnBillSaveClick(null, null);
}
}
}
}
catch (Exception ex)
{
LogHelper.Instance.WriteError(ex);
LogUtil.WriteError("单据来源表格拖拽完出错!", ex);
MessageUtil.Show(ResourceKeys.OperFault);
}
}
/// <summary>
/// 单据来源拖拽到主表明细中(树表格拖拽到表格)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TreeGridDragGrid_OnDragComplete(object sender, TreeGridDragGridArgs e)
{
if (e.GridViewSelectRows == null || e.GridViewSelectRows.Length == 0) return;
try
{
if (this.CanAddDetailRow())
{
if (this.BillModel.DisableDragPrompt || MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes)
{
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
int i = 0;
TreeListNode focusedNode = e.TreeListObj.FocusedNode;
var selectedNodes = e.TreeListObj.Selection;
foreach (TreeListNode treeNode in e.TreeListObj.Selection)
{
// 拖动多行,所以明细数据改为动态查询
DataRowView dataRowView = e.TreeListObj.GetDataRecordByNode(treeNode) as DataRowView;
DataRow rowItem = dataRowView != null ? dataRowView.Row : null;
this.RefreshSourceDetail(tabPage.Tag as BillSourceUnionModel);
DataTable details = BillImpl.GetDataTableResult(ReplaceHelper.ReplaceRowParam(rowItem, unionModel.ModelObj.DetailSql));
if (unionModel.ModelObj.sourceDetailType != "1" && unionModel.GridDetailControlObj.GridView != null && focusedNode == treeNode)
{
details = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
}
else if (unionModel.ModelObj.sourceDetailType == "1" && unionModel.TreeGridDetailControlObj.TreeListObj != null && focusedNode == treeNode)
{
details = unionModel.TreeGridDetailControlObj.TreeListObj.DataSource as DataTable;
}
this.ControlObj.SetAllControlValue(rowItem, true);
if (unionModel.ModelObj.CadDragDetail)
{
this.AddMultiRowToGridView(details, unionModel);
if (BillModel.drgFinishHide == "1" && unionModel.GridDetailControlObj != null)
{
var detailRows = details.AsEnumerable().ToList();
foreach (var detailRow in detailRows)
{
if (unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{
unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
}
if (unionModel.GridDetailDetailControlObj != null && unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{
unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
}
}
}
}
//单据为新增状态,根据最后一行的内容设置红蓝单据
if (!this.BillModel.SaveState && e.TreeListObj.Selection.Count - 1 == i && rowItem.Table.Columns.Contains(this.BillModel.RtagidKey) && this.BillModel.BillFlag != 0 && this.BillModel.BillFlag != 1)
{
if ("0".Equals(rowItem[this.BillModel.RtagidKey] + ""))
{
this.rdBlue.Checked = true;
this.OnBlueStateClick(null, null);
}
if ("1".Equals(rowItem[this.BillModel.RtagidKey] + ""))
{
this.rdRed.Checked = true;
this.OnRedStateClick(null, null);
}
}
i++;
}
if (unionModel.ModelObj.DragAndSave && e.TreeListObj.Selection.Count == i && i != 0)
{
this.OnBillSaveClick(null,null);
}
}
}
}
catch (Exception ex)
{
LogHelper.Instance.WriteError(ex);
LogUtil.WriteError("单据来源表格拖拽完出错!", ex);
MessageUtil.Show(ResourceKeys.OperFault);
}
}
/// <summary> /// <summary>
@@ -3330,104 +3556,102 @@ namespace Lskj.PubBill
{ {
WaitForm.ShowForm(); WaitForm.ShowForm();
if (unionModel.ModelObj.SourceType == 3)
{
TreeListNode focusedNode = unionModel.TreeGridControlObj.TreeListObj.FocusedNode;
unionModel.GridDetailControlObj.GridControl.DataSource = focusedNode == null
? new DataTable() : BillImpl.GetDataTableResult(ReplaceHelper.ReplaceNodeParam(focusedNode, unionModel.ModelObj.DetailSql));
if (this._isLoadRightControlValue) DataRow rowItem = unionModel.GridControlObj.GridView.GetFocusedDataRow();
{ //unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null
string masterSql = focusedNode == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceNodeParam(focusedNode, BillModel.MasterSql); // ? new DataTable() : BillImpl.GetDataTableResult(ReplaceHelper.ReplaceRowParam(rowItem, unionModel.ModelObj.DetailSql));
// 加载单据信息 if (unionModel.ModelObj.SourceType == 3 || unionModel.ModelObj.SourceType == 4)
this.SetBillStatus(BillImpl.GetDataRowResult(masterSql)); {
} rowItem = unionModel.TreeGridControlObj.GetViewFocusedDataRow();
}
string DetailSql = unionModel.ModelObj.DetailSql;
DetailSql = ReplaceHelper.ReplaceUserInfo(DetailSql);
DetailSql = ReplaceHelper.ReplaceWhereCond(DetailSql);
DetailSql = ReplaceHelper.ReplaceRowParam(rowItem, DetailSql);
if (unionModel.SearchObj != null)
DetailSql = unionModel.SearchObj.ReplaceParentControlValue(DetailSql);
if (unionModel.ModelObj.sourceDetailType == "1")
{
unionModel.TreeGridDetailControlObj.SetGridViewDataSource(rowItem == null
? new DataTable() : BillImpl.GetDataTableResult(DetailSql));
} }
else else
{ {
DataRow rowItem = unionModel.GridControlObj.GridView.GetFocusedDataRow(); //有复选框的页签在刷新前清空选中行,否则合计在刷新数据源后不会自带改变
//unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null if (unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect && unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelect == true)
// ? new DataTable() : BillImpl.GetDataTableResult(ReplaceHelper.ReplaceRowParam(rowItem, unionModel.ModelObj.DetailSql));
string DetailSql = unionModel.ModelObj.DetailSql;
DetailSql = ReplaceHelper.ReplaceUserInfo(DetailSql);
DetailSql = ReplaceHelper.ReplaceWhereCond(DetailSql);
DetailSql = ReplaceHelper.ReplaceRowParam(rowItem, DetailSql);
if (unionModel.SearchObj != null)
DetailSql = unionModel.SearchObj.ReplaceParentControlValue(DetailSql);
if (unionModel.ModelObj.sourceDetailType == "1")
{ {
unionModel.TreeGridDetailControlObj.SetGridViewDataSource(rowItem == null //int[] selectIndexs = unionModel.GridDetailControlObj.GridView.GetSelectedRows();
? new DataTable() : BillImpl.GetDataTableResult(DetailSql)); unionModel.GridDetailControlObj.GridView.ClearSelection();
}
else
{
//有复选框的页签在刷新前清空选中行,否则合计在刷新数据源后不会自带改变
if (unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect && unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelect == true)
{
//int[] selectIndexs = unionModel.GridDetailControlObj.GridView.GetSelectedRows();
unionModel.GridDetailControlObj.GridView.ClearSelection();
}
unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null
? new DataTable() : BillImpl.GetDataTableResult(DetailSql);
} }
unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null
DataTable table = null; ? new DataTable() : BillImpl.GetDataTableResult(DetailSql);
if (unionModel.ModelObj.sourceDetailType == "1")
{
table = unionModel.TreeGridDetailControlObj.TreeListObj.DataSource as DataTable;
}
else
{
table = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
}
if (table != null && !table.Columns.Contains("_check"))
{
table.Columns.Add("_check", typeof(bool));
foreach (DataRow row in table.Rows)
{
row["_check"] = 0;
}
}
if (table != null)
{
UpdateSummaryData(table);
}
if (unionModel.ModelObj.SourceType == 2 && this._isLoadRightControlValue)
{
string masterSql = rowItem == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceRowParam(rowItem, BillModel.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();
gridTable.OrderBy(this.BillModel.DetailOrderField);
} }
DataTable table = null;
if (unionModel.ModelObj.sourceDetailType == "1")
{
table = unionModel.TreeGridDetailControlObj.TreeListObj.DataSource as DataTable;
}
else
{
table = unionModel.GridDetailControlObj.GridControl.DataSource as DataTable;
}
if (table != null && !table.Columns.Contains("_check"))
{
table.Columns.Add("_check", typeof(bool));
foreach (DataRow row in table.Rows)
{
row["_check"] = 0;
}
}
if (table != null)
{
UpdateSummaryData(table);
}
if (unionModel.ModelObj.SourceType == 2 && this._isLoadRightControlValue)
{
string masterSql = rowItem == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceRowParam(rowItem, BillModel.MasterSql);
// 加载单据信息
this.SetBillStatus(BillImpl.GetDataRowResult(masterSql));
}
else if (unionModel.ModelObj.SourceType == 3 && this._isLoadRightControlValue)
{
//string masterSql = focusedNode == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceNodeParam(focusedNode, BillModel.MasterSql);
string masterSql = rowItem == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceRowParam(rowItem, BillModel.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();
gridTable.OrderBy(this.BillModel.DetailOrderField);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -4480,6 +4704,21 @@ namespace Lskj.PubBill
this.ControlObj.ResetControlValue(); this.ControlObj.ResetControlValue();
} }
} }
if (model.ModelObj.SourceType == 3 && this._isLoadRightControlValue)
{
DataRow rowItem = null;
if (model.GridControlObj.DataRowCount() > 0)
{
DataRow selectRow = model.TreeGridControlObj.GetViewFocusedDataRow(); ;
rowItem = BillImpl.GetDataRowResult(ReplaceHelper.ReplaceRowParam(selectRow, BillModel.MasterSql));
}
// 加载单据信息
this.SetBillStatus(rowItem);
if (rowItem == null)
{
this.ControlObj.ResetControlValue();
}
}
} }
/// <summary> /// <summary>
/// <para>说明:获取单据管理的单据来源标签</para> /// <para>说明:获取单据管理的单据来源标签</para>
@@ -5847,6 +6086,18 @@ namespace Lskj.PubBill
} }
} }
/// <summary>
/// 切换下方附加模块页签时,刷新当前页签
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TabControlObj_SelectedPageChanged(object sender, TabPageChangedEventArgs e)
{
if (this.tb_buttom.TabControlObj.TabPages.Count > 1)
{
SetDetailGridDataSource();
}
}
/// <summary> /// <summary>
/// <para>说明:获取底部多标签数据</para> /// <para>说明:获取底部多标签数据</para>
@@ -5873,12 +6124,20 @@ namespace Lskj.PubBill
i++; i++;
continue; continue;
} }
if (this.BillModel.RefreshSelectedDetail && page != tb_buttom.TabControlObj.SelectedTabPage)
{
continue;
}
if (rowItem != null && page != null) if (rowItem != null && page != null)
{ {
this.SetTabPageDataSource(page, rowItem); this.SetTabPageDataSource(page, rowItem);
} }
} }
} }
/// <summary> /// <summary>
/// <para>说明:设置表格数据</para> /// <para>说明:设置表格数据</para>
/// <para>创建人:龚宇超</para> /// <para>创建人:龚宇超</para>
@@ -6491,12 +6750,10 @@ namespace Lskj.PubBill
if (unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0) if (unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{ {
unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow); unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
//RemoveRowitem.Add(rowItem);
} }
if (unionModel.GridDetailDetailControlObj != null && unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0) if (unionModel.GridDetailDetailControlObj != null && unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(detailRow) >= 0)
{ {
unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow); unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.Remove(detailRow);
//RemoveRowitem.Add(rowItem);
} }
} }
} }
@@ -6520,6 +6777,10 @@ namespace Lskj.PubBill
} }
i++; i++;
} }
if (unionModel.ModelObj.DragAndSave && rows.Length == i && i != 0)
{
this.OnBillSaveClick(null, null);
}
} }
} }
} }
@@ -8472,7 +8733,7 @@ namespace Lskj.PubBill
if (unionModel.ModelObj.CadDragDetail) if (unionModel.ModelObj.CadDragDetail)
{ {
//清空当前主单明细表数据 //清空当前主单明细表数据
((this.gcMain as TreeGridControlEx).TreeListObj.DataSource as DataTable).Clear(); //((this.gcMain as TreeGridControlEx).TreeListObj.DataSource as DataTable).Clear();
(this.gcMain as TreeGridControlEx).TreeListObj.OptionsBehavior.Editable = true; (this.gcMain as TreeGridControlEx).TreeListObj.OptionsBehavior.Editable = true;
this.AddMultiRowToGridView(details, unionModel); this.AddMultiRowToGridView(details, unionModel);
} }
@@ -8493,6 +8754,10 @@ namespace Lskj.PubBill
} }
i++; i++;
} }
if (unionModel.ModelObj.DragAndSave && rows.Length == i && i != 0)
{
this.OnBillSaveClick(null, null);
}
} }
} }
} }
@@ -8622,21 +8887,6 @@ namespace Lskj.PubBill
MessageUtil.Show("扫码长度过长,请重新扫码"); MessageUtil.Show("扫码长度过长,请重新扫码");
return; return;
} }
int Quantity = 0;
FrmAdd frmAdd = new FrmAdd();
if (frmAdd.ShowDialog() == DialogResult.OK)
{
Quantity = frmAdd.Quantity;
}
else
{
textEdit.EditValue = "";
textEdit.Focus();
return;
}
//获取选中行 //获取选中行
DataRow MainRowItem = gcMain.GridView.GetFocusedDataRow(); DataRow MainRowItem = gcMain.GridView.GetFocusedDataRow();
@@ -8644,88 +8894,214 @@ namespace Lskj.PubBill
{ {
MainRowItem = gcMain.GridControl.DataSourceTable().NewRow(); MainRowItem = gcMain.GridControl.DataSourceTable().NewRow();
} }
//获取红蓝单据
string DocumentColor = this.rdBlue.Checked ? "0" : this.rdRed.Checked ? "1" : "";
//数量,默认为1
int Quantity = 1;
/*
A:
B;1
C:sql结果1
this.BillModel.ScanCodeFixedPrefix为条码前缀B
*/
List<string> Parameter = this.BillModel.CodeExecuteParameter.Split(',').ToList(); string Type = string.Empty;
for (int i = 0; i < Parameter.Count; i++) if (!string.IsNullOrWhiteSpace(this.BillModel.ScanCodeFixedPrefix) && inputText.StartsWith(this.BillModel.ScanCodeFixedPrefix))
{ {
string item = Parameter[i]; Type = "B";
if (item.Contains("{DocumentColor}"))
{
string DocumentColor = this.rdBlue.Checked ? "0" : this.rdRed.Checked ? "1" : "";
item = ReplaceHelper.ReplaceParamToValue(item, "{DocumentColor}", DocumentColor);
}
if (item.Contains("{amount}"))
{
item = Quantity + "";
}
//替换单据号
item = ReplaceHelper.ReplaceParamToValue(item, "{" + this.BillModel.PrimaryKey + "}", this.lblOrderNo.Text);
//替换选中行(没有就传空)
item = ReplaceHelper.ReplaceRowParam(MainRowItem, item);
//替换扫码内容
item = ReplaceHelper.ReplaceParamToValue(item, "{value}", inputText);
Parameter[i] = item;
} }
else
List<string> procParams = ReplaceHelper.GetParamFields(this.BillModel.CodeExecuteSql);
List<SqlParameter> sqlParamList = new List<SqlParameter>();
string[] paramStr = procParams[0].Replace("{", "").Replace("}", "").Split(',');
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
//SqlParameter pMaount = new SqlParameter("@maount", SqlDbType.Int);
for (int i = 0; i < paramStr.Length; i++)
{ {
string item = paramStr[i]; string Sql = string.Format("select line_str from wms_ScanCodeLinetab a where modid='{0}' and hl_tig='{1}'", this.SysModel.ModuleCode, DocumentColor);
if (paramStr[i].Equals("@msg", StringComparison.OrdinalIgnoreCase)) Type = SqlHelper.ExecuteScalar(Sql) + "";
if (string.IsNullOrWhiteSpace(Type))
{ {
pMsg.Direction = ParameterDirection.InputOutput; MessageUtil.Show("扫码配置错误,请联系朗速服务人员");
pMsg.Value = Parameter.Count > i ? string.IsNullOrEmpty(Parameter[i]) ? "" : Parameter[i] : ""; return;
sqlParamList.Add(pMsg);
}
else
{
string paramStr1 = paramStr[i];
SqlParameter param = new SqlParameter(string.Format("{0}", paramStr1), SqlDbType.VarChar);
param.Value = Parameter[i];
sqlParamList.Add(param);
} }
} }
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4); switch (Type.ToUpper())
returnValue.Direction = ParameterDirection.ReturnValue; {
int result; case "A":
sqlParamList.Add(returnValue);
try FrmAdd frmAdd = new FrmAdd();
{ if (frmAdd.ShowDialog() == DialogResult.OK)
result = MainImpl.ExecProcedure(this.BillModel.CodeExecuteSql.Replace(procParams[0], "").Trim(), sqlParamList.ToArray());
}
catch (SqlException sex)
{
string Message = ErrorMessage.PromptErrorMessage(sex);
MessageUtil.Show(Message, sex.Message);
return;
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
return;
}
int rValue = Convert.ToInt32(returnValue.Value);
string varchar = pMsg.Value + "";
switch (rValue)
{
case 1:
if (string.IsNullOrWhiteSpace(varchar))
{ {
//刷新当前单据 Quantity = frmAdd.Quantity;
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}'", BillModel.MasterTable, BillModel.PrimaryKey, this.lblOrderNo.Text)));
} }
else else
{ {
//刷新返回的单据号 textEdit.EditValue = "";
this.lblOrderNo.Text = varchar; textEdit.Focus();
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2} return;
}
this.ExecuteWcanningSQL(MainRowItem, Quantity + "", DocumentColor, inputText);
break;
case "B":
this.ExecuteWcanningSQL(MainRowItem, Quantity + "", DocumentColor, inputText);
break;
case "C":
if (!string.IsNullOrWhiteSpace(this.BillModel.ScanCodeModuleCode))
{
//根据传入的模块号获取模块信息
DataRow modelRow = MainImpl.GetSystemdllTab(this.BillModel.ScanCodeModuleCode);//获取模块信息
if (modelRow == null)
{
MessageUtil.Show("模块编号[" + this.BillModel.ScanCodeModuleCode + "],配置错误!\r\n该模块信息未找到!");
return;
}
if (modelRow.Table.Columns.Contains("countSql") && !string.IsNullOrWhiteSpace(modelRow["countSql"] + ""))
{
string sql = modelRow["countSql"] + "";
sql = ReplaceHelper.ReplaceUserInfo(sql);
sql = ReplaceHelper.ReplaceParamToValue(sql, "{value}", inputText);
string num = SqlHelper.ExecuteScalar(sql) + "";
num = this.IsNumberic(num) ? num : "0";
if (int.Parse(num) == 0)
{
MessageUtil.Show("未检测到扫码信息存在,请检查相应前序业务!");
}
else if (int.Parse(num) == 1)
{
this.ExecuteWcanningSQL(MainRowItem, Quantity + "", DocumentColor, inputText);
}
else if (int.Parse(num) > 1)
{
FrmScanCodeAssociation frmScanCodeAssociation = new FrmScanCodeAssociation(modelRow, inputText);
if (frmScanCodeAssociation.ShowDialog() == DialogResult.OK)
{
string Codes = frmScanCodeAssociation.StringCodes;
this.ExecuteWcanningSQL(MainRowItem, Quantity + "", DocumentColor, Codes);
}
else
{
textEdit.EditValue = "";
textEdit.Focus();
return;
}
}
}
}
else
{
MessageUtil.Show("扫码配置错误");
return;
}
break;
}
}
//刷新单据管理(sourceType=2
foreach (XtraTabPage tabPage in this.xtc_left_container.TabPages)
{
BillSourceUnionModel model = tabPage.Tag as BillSourceUnionModel;
if (model != null && model.GridControlObj != null && model.ModelObj.SourceType == 2)
{
this.RefreshSource(model);
}
}
//刷新下方配置的附件模块
this.OngcMainRowCellClick(null, null);
textEdit.EditValue = "";
textEdit.Focus();
}
}
/// <summary>
/// 执行扫码的存储过程
/// </summary>
/// <param name="MainRowItem">明细选中行</param>
///<param name="Quantity">数量</param>
///<param name="DocumentColor">红蓝单据字段</param>
///<param name="Codes">串码,多个用;隔开</param>
public void ExecuteWcanningSQL(DataRow MainRowItem, string Quantity, string DocumentColor, string Codes)
{
int j = 0;
foreach (string code in Codes.TrimEnd(';').Split(';'))
{
if (string.IsNullOrWhiteSpace(code)) continue;
List<string> Parameter = this.BillModel.CodeExecuteParameter.Split(',').ToList();
for (int i = 0; i < Parameter.Count; i++)
{
string item = Parameter[i];
if (item.Contains("{DocumentColor}"))
{
item = ReplaceHelper.ReplaceParamToValue(item, "{DocumentColor}", DocumentColor);
}
if (item.Contains("{amount}"))
{
item = Quantity + "";
}
//替换单据号
item = ReplaceHelper.ReplaceParamToValue(item, "{" + this.BillModel.PrimaryKey + "}", this.lblOrderNo.Text);
//替换选中行(没有就传空)
item = ReplaceHelper.ReplaceRowParam(MainRowItem, item);
//替换扫码内容
item = ReplaceHelper.ReplaceParamToValue(item, "{value}", code);
Parameter[i] = item;
}
List<string> procParams = ReplaceHelper.GetParamFields(this.BillModel.CodeExecuteSql);
List<SqlParameter> sqlParamList = new List<SqlParameter>();
string[] paramStr = procParams[0].Replace("{", "").Replace("}", "").Split(',');
SqlParameter pMsg = new SqlParameter("@msg", SqlDbType.VarChar, 2000);
for (int i = 0; i < paramStr.Length; i++)
{
string item = paramStr[i];
if (paramStr[i].Equals("@msg", StringComparison.OrdinalIgnoreCase))
{
pMsg.Direction = ParameterDirection.InputOutput;
pMsg.Value = Parameter.Count > i ? string.IsNullOrEmpty(Parameter[i]) ? "" : Parameter[i] : "";
sqlParamList.Add(pMsg);
}
else
{
string paramStr1 = paramStr[i];
SqlParameter param = new SqlParameter(string.Format("{0}", paramStr1), SqlDbType.VarChar);
param.Value = Parameter[i];
sqlParamList.Add(param);
}
}
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4);
returnValue.Direction = ParameterDirection.ReturnValue;
int result;
sqlParamList.Add(returnValue);
try
{
result = MainImpl.ExecProcedure(this.BillModel.CodeExecuteSql.Replace(procParams[0], "").Trim(), sqlParamList.ToArray());
}
catch (SqlException sex)
{
string Message = ErrorMessage.PromptErrorMessage(sex);
MessageUtil.Show(Message, sex.Message);
return;
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
return;
}
int rValue = Convert.ToInt32(returnValue.Value);
string varchar = pMsg.Value + "";
switch (rValue)
{
case 1:
if (string.IsNullOrWhiteSpace(varchar))
{
//刷新当前单据
if (j == Codes.TrimEnd(';').Split(';').Length - 1)
{
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}'", BillModel.MasterTable, BillModel.PrimaryKey, this.lblOrderNo.Text)));
}
}
else
@@ -0,0 +1,74 @@
namespace Lskj.PubBill
{
partial class FrmScanCodeAssociation
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.plm_bottom = new DevExpress.XtraEditors.PanelControl();
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
this.gcMain = new Lskj.Control.GridControlEx();
((System.ComponentModel.ISupportInitialize)(this.plm_bottom)).BeginInit();
this.plm_bottom.SuspendLayout();
this.SuspendLayout();
//
// plm_bottom
//
this.plm_bottom.Controls.Add(this.simpleButton1);
this.plm_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.plm_bottom.Location = new System.Drawing.Point(0, 410);
this.plm_bottom.Margin = new System.Windows.Forms.Padding(4);
this.plm_bottom.Name = "plm_bottom";
this.plm_bottom.Size = new System.Drawing.Size(800, 40);
this.plm_bottom.TabIndex = 18;
//
// simpleButton1
//
this.simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.simpleButton1.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.simpleButton1.Appearance.Options.UseFont = true;
this.simpleButton1.Location = new System.Drawing.Point(696, 6);
this.simpleButton1.Margin = new System.Windows.Forms.Padding(4);
this.simpleButton1.Name = "simpleButton1";
this.simpleButton1.Size = new System.Drawing.Size(90, 30);
this.simpleButton1.TabIndex = 41;
this.simpleButton1.Text = "确定";
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
//
// gcMain
//
this.gcMain.AdapterObj = null;
this.gcMain.BackColor = System.Drawing.Color.Transparent;
this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcMain.Location = new System.Drawing.Point(0, 0);
this.gcMain.Margin = new System.Windows.Forms.Padding(5);
this.gcMain.Name = "gcMain";
this.gcMain.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gcMain.Size = new System.Drawing.Size(800, 410);
this.gcMain.TabIndex = 21;
//
// FrmScanC
@@ -0,0 +1,52 @@
using Lskj.Business.Impl;
using Lskj.Control;
using Lskj.Control.Model;
using Lskj.Core;
using Lskj.Model;
using Lskj.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.PubBill
{
public partial class FrmScanCodeAssociation : BaseForm
{
/// <summary>
/// 系统模块实体对象
/// </summary>
/// <value>The system model.</value>
public ModuleModel SysModel { get; private set; }
/// <summary>
///主表条件控件
/// </summary>
public MyControl SearchMainObj;
/// <summary>
///扫码内容
/// </summary>
public string ScanCodeData;
/// <summary>
//选中的串码
/// </summary>
public string StringCodes;
public FrmScanCodeAssociation()
{
InitializeComponent();
}
public FrmScanCodeAssociation(DataRow modelRow, string scanCodeData)
{
InitializeComponent();
this.ScanCodeData = scanCodeData;
//根据传入的模块号获取模块信息
this.SysModel = new ModuleModel(modelRow);
DataTable mainGridColumns = BaseModuleImpl.GetBaseGridColumns(this.SysModel.ModeCode);
this.gcMain.SetReadOnlyColumns(mainGridColumns, GridCustomColumnStruct.BaseMainGridView + this.SysModel.FormKey);//创建列
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -44,7 +44,6 @@ namespace Lskj.PubBill.Model
public bool DisableShowSourceCount { get; private set; }//是否显示来源数量 public bool DisableShowSourceCount { get; private set; }//是否显示来源数量
public string AddDataSql { get; private set; }// 添加数据sql(来源明细添加到主表明细时,执行sql把查询数据源一并添加到来源明细中) public string AddDataSql { get; private set; }// 添加数据sql(来源明细添加到主表明细时,执行sql把查询数据源一并添加到来源明细中)
public string AddDataCondition { get; private set; }// 添加数据条件 public string AddDataCondition { get; private set; }// 添加数据条件
public bool LoadFilter { get; private set; }//来源筛选行是否显示 public bool LoadFilter { get; private set; }//来源筛选行是否显示
public bool DetailedLoadFilter { get; private set; }//来源明细筛选行是否显示 public bool DetailedLoadFilter { get; private set; }//来源明细筛选行是否显示
@@ -52,6 +51,12 @@ namespace Lskj.PubBill.Model
public string MainDetailsAddType;// 主表明细新增模式 (默认来源明细和来源明细的明细都可以添加到主表, 1为来源明细添加 2为来源明细的明细添加) public string MainDetailsAddType;// 主表明细新增模式 (默认来源明细和来源明细的明细都可以添加到主表, 1为来源明细添加 2为来源明细的明细添加)
public string SourceKeyFieldName;// 节点id(来源主表为树表格时)
public string SourceParentFieldName;// 父节点id(来源主表为树表格时 )
public bool DragAndSave;// 拖拽后保存
public BillSourceModel(DataRow item) public BillSourceModel(DataRow item)
{ {
if (item == null) return; if (item == null) return;
@@ -84,4 +89,8 @@ namespace Lskj.PubBill.Model
this.sourceDetailType = item.Table.Columns.Contains("sourceDetailType") ? item["sourceDetailType"] + "" : ""; this.sourceDetailType = item.Table.Columns.Contains("sourceDetailType") ? item["sourceDetailType"] + "" : "";
this.DisableShowSourceCount = item.Table.Columns.Contains("DisableShowSourceCount") && "1".Equals(item["DisableShowSourceCount"] + "") ? true : false; this.DisableShowSourceCount = item.Table.Columns.Contains("DisableShowSourceCount") && "1".Equals(item["DisableShowSourceCount"] + "") ? true : false;
this.AddDataSql = this.AddDataSql = item.Table.Columns.Contains("AddDataSql") ? item["AddDataSql"] + "" : "";
this.AddDataCondition = item.Table.Columns.Contains("AddDataCondition") ? item["AddDataCondition"] + "" : "";
this.LoadFilter = item.Table.Columns.Contains("LoadFilter") && "1".Equals(item["LoadFilter"] + "") ? true : false;
this.DetailedLoadFilter = item.Table.Columns.Contains("Detai