From 52d9f82c258c721018582ed2a5dfd1c25a49f97e Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Fri, 6 Aug 2021 09:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8D=95No.158690=201?= =?UTF-8?q?=E3=80=81=E7=A7=B0=E9=87=8D=E6=89=93=E7=A0=81=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=EF=BC=9A=E4=B8=8D=E5=85=81=E8=AE=B8=E6=89=93=E8=B4=9F?= =?UTF-8?q?=E6=95=B0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SegmentProductionAuto_/SegmentProductionAutoForm.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index 8353d6a..01d03d0 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -236,10 +236,10 @@ namespace ButcherFactory.SegmentProductionAuto_ // if (weight == 0) // weight = (g.StandardWeightLow ?? 4.0m) + 0.1m; //#endif - if (weight == 0) + if (weight <= 0) { //weight = 10; - MessageBox.Show("重量不能为0"); + MessageBox.Show("重量必须大于0"); return; } if (g.StandardWeight.HasValue) @@ -336,8 +336,8 @@ namespace ButcherFactory.SegmentProductionAuto_ // if (weight == 0) // weight = (detail.StandardWeightLow ?? 4.0m) + 0.1m; //#endif - if (weight == 0) - throw new Exception("重量不能为0"); + if (weight <= 0) + throw new Exception("重量必须大于0"); if (detail.StandardWeight.HasValue) {