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) {