SVN-Revision: r831
This commit is contained in:
wyf
2025-07-03 07:30:05 +00:00
parent 61fe1a667b
commit 5e80a58b8c
+32 -2
View File
@@ -35,6 +35,7 @@ using DevExpress.Utils;
using System.Data.SqlClient; using System.Data.SqlClient;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Newtonsoft.Json; using Newtonsoft.Json;
using Lskj.PubBillSpecial;
namespace Lskj.PubBill namespace Lskj.PubBill
{ {
@@ -5841,6 +5842,10 @@ namespace Lskj.PubBill
{ {
} }
} }
else
{
gcMain.AddHeadquarters(null);
}
gcMain.RefreshHeaderColor(); gcMain.RefreshHeaderColor();
this.gcMain.GridControl.DataSource = null; this.gcMain.GridControl.DataSource = null;
this.gcMain.GridControl.DataSource = dataTable; this.gcMain.GridControl.DataSource = dataTable;
@@ -6710,7 +6715,29 @@ namespace Lskj.PubBill
try try
{ {
if (this.CanAddDetailRow()) bool isAgain = true;
if (this.BillModel.isWorkLogin)
{
if (!this.BillModel.SaveState && this.gcMain.DataRowCount() > 0)
{
DialogResult result = MessageUtil.Show(("数据未保存,是否确定新建单据?"), MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
this.SetBillStatus(null);
this.ControlObj.ResetControlValue(this.BillModel.ManuallyTriggerCorrelation, true);
}
else
{
isAgain = false;
}
}
else
{
this.SetBillStatus(null);
this.ControlObj.ResetControlValue(this.BillModel.ManuallyTriggerCorrelation, true);
}
}
if (this.CanAddDetailRow() && isAgain)
{ {
if (this.BillModel.DisableDragPrompt || MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes) if (this.BillModel.DisableDragPrompt || MessageUtil.Show(ResourceKeys.DragSelectRow, MessageBoxButtons.YesNo) == DialogResult.Yes)
{ {
@@ -7503,7 +7530,9 @@ namespace Lskj.PubBill
frmSelect.FpOtherRows = table.Rows.Cast<DataRow>().Where(x => !(rowItem[guidField] + "").Equals(x[guidField] + "") && !string.IsNullOrEmpty(x[mRecordPrimaryField] + "")).ToArray(); frmSelect.FpOtherRows = table.Rows.Cast<DataRow>().Where(x => !(rowItem[guidField] + "").Equals(x[guidField] + "") && !string.IsNullOrEmpty(x[mRecordPrimaryField] + "")).ToArray();
} }
} }
if (frmSelect.ShowDialog() == DialogResult.OK && frmSelect.SelectedRows != null && frmSelect.SelectedRows.Length > 0) if (frmSelect.ShowDialog() == DialogResult.OK)
{
if (frmSelect.SelectedRows != null && frmSelect.SelectedRows.Length > 0)
{ {
//if (frmSelect.isNextOne) //if (frmSelect.isNextOne)
//{ //{
@@ -7576,6 +7605,7 @@ namespace Lskj.PubBill
this.gcMain.GridView.UpdateCurrentRow(); this.gcMain.GridView.UpdateCurrentRow();
this.gcMain.GridView.ShowEditor(); this.gcMain.GridView.ShowEditor();
} }
}
if (frmSelect.isNextOne) if (frmSelect.isNextOne)
{ {
int SourceRowIndex = this.gcMain.GridView.GetFocusedDataSourceRowIndex(); int SourceRowIndex = this.gcMain.GridView.GetFocusedDataSourceRowIndex();