From 9fdd099b601535fb3288dd76d19a2a51370af3a4 Mon Sep 17 00:00:00 2001 From: cyf Date: Mon, 12 May 2025 10:04:02 +0000 Subject: [PATCH] SVN r573 SVN-Revision: r573 --- 插件库/Lskj.PubBill/BillModule.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/插件库/Lskj.PubBill/BillModule.cs b/插件库/Lskj.PubBill/BillModule.cs index d0590bd..d6a4457 100644 --- a/插件库/Lskj.PubBill/BillModule.cs +++ b/插件库/Lskj.PubBill/BillModule.cs @@ -328,9 +328,12 @@ namespace Lskj.PubBill Task menuConfigTabTask = cachesDic.AddTask(this, "MenuConfigTab", new Task(() => { DataRow dataRow = BaseImpl.GetMenuConfigTab(dynamicModel.ModuleId); - billModel.BillSourceIds = dataRow.Table.Columns.Contains("BillSourceIds") ? (dataRow["BillSourceIds"] + "").Trim(',') : string.Empty; - billModel.BillFlag = dataRow.Table.Columns.Contains("BillFlag") && !string.IsNullOrEmpty(dataRow["BillFlag"] + "") ? Convert.ToInt32(dataRow["BillFlag"] + "") : -1; - //billModel + if (dataRow != null) + { + billModel.BillSourceIds = dataRow.Table.Columns.Contains("BillSourceIds") ? (dataRow["BillSourceIds"] + "").Trim(',') : string.Empty; + billModel.BillFlag = dataRow.Table.Columns.Contains("BillFlag") && !string.IsNullOrEmpty(dataRow["BillFlag"] + "") ? Convert.ToInt32(dataRow["BillFlag"] + "") : -1; + //billModel + } return dataRow;//获取菜单其他配置 })); #region GetPrintOtherParam获取打印其他参数 @@ -5717,6 +5720,7 @@ namespace Lskj.PubBill //{ // Pid = dataRow[(this.gcMain as TreeGridControlEx).TreeListObj.KeyFieldName] + ""; //} + if (rowItem == null) return; //添加行 this.AddMultiRowTreeGridControl(new DataRow[] { rowItem }, Pid); if (!string.IsNullOrWhiteSpace(unionModel.AddDataSql) && !string.IsNullOrWhiteSpace(unionModel.AddDataCondition) && this.ValidateCond(unionModel.AddDataCondition, rowItem)) @@ -6055,7 +6059,7 @@ namespace Lskj.PubBill { if (this.CanAddDetailRow()) { - if (MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes) + 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; @@ -6630,6 +6634,8 @@ namespace Lskj.PubBill WaitForm.ShowForm(); try { + // 临时禁用新增行(空白行) + if (this.BillModel.DefaultAddEmptyRow) this.gcMain.GridView.OptionsView.NewItemRowPosition = NewItemRowPosition.None; DataRow rowItem = this.gcMain.GridView.GetFocusedDataRow(); if (rowItem == null) { @@ -6759,6 +6765,8 @@ namespace Lskj.PubBill } finally { + // 重新开启新增行(空白行) + if (this.BillModel.DefaultAddEmptyRow) this.gcMain.GridView.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom; WaitForm.HideForm(); } } @@ -7992,7 +8000,7 @@ namespace Lskj.PubBill { if (this.CanAddTreeDetailRow()) { - if (MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes) + 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;