From a85c54939e5ecc5e1ad97884858e939fd2cebfad Mon Sep 17 00:00:00 2001 From: qian Date: Thu, 1 Feb 2024 17:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=9A=90=E8=97=8F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=98=8E=E7=BB=86=E7=9A=84=E4=BB=B7=E6=A0=BC=20?= =?UTF-8?q?=E5=92=8C=20=E5=AF=BC=E5=85=A5=E8=AE=A2=E5=8D=95=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BF=A1=E6=81=AF=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_PO.aspx.cs | 24 ++++++++++++++++-------- SCP/Views/PlanData/SCP_PO_DETAIL.aspx | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/SCP/Views/PlanData/SCP_PO.aspx.cs b/SCP/Views/PlanData/SCP_PO.aspx.cs index 7d69e42..be5cf16 100644 --- a/SCP/Views/PlanData/SCP_PO.aspx.cs +++ b/SCP/Views/PlanData/SCP_PO.aspx.cs @@ -215,21 +215,29 @@ namespace SCP.PlanData _dt = ExcelHelper.GetDataTableOfXlsx(_stream); } var list = ConvertHelper.ToList(ExcelHelper.RemoveEmpty(_dt)).ToList(); - var ret = SCP_PO_CONTROLLER.EXCEL_PO_MOD2(_dt,list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, PoState.Open); - if (ret.State == ReturnStatus.Succeed && ret.Result == true) + try { + var ret = SCP_PO_CONTROLLER.EXCEL_PO_MOD2(_dt, list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, PoState.Open); + if (ret.State == ReturnStatus.Succeed && ret.Result == true) + { - FileUp.Reset(); + FileUp.Reset(); - BindOrder(); - - Alert.Show("导入成功"); + BindOrder(); + + Alert.Show("导入成功"); + } + else + { + Alert.Show(string.Join("
", ret.MessageList)); + } } - else + catch(Exception ex) { - Alert.Show(string.Join("
", ret.MessageList)); + Alert.Show(ex.Message); } + } diff --git a/SCP/Views/PlanData/SCP_PO_DETAIL.aspx b/SCP/Views/PlanData/SCP_PO_DETAIL.aspx index cb6bd8a..ae5657d 100644 --- a/SCP/Views/PlanData/SCP_PO_DETAIL.aspx +++ b/SCP/Views/PlanData/SCP_PO_DETAIL.aspx @@ -98,7 +98,7 @@