From ed7046a564e162c813a742eef7d681251d762459 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Fri, 14 Sep 2018 13:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=AD=98=E8=B4=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=94=AF=E6=8C=81=E6=89=B9=E9=87=8F=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=A0=87=E5=87=86=E9=87=8D=E9=87=8F=E6=A0=87=E5=87=86?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E9=99=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClientGoodsSet_/ClientGoodsSetEdit.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/B3ClientService.Web/Pages/B3ClientService/BaseInfos/ClientGoodsSet_/ClientGoodsSetEdit.cs b/B3ClientService.Web/Pages/B3ClientService/BaseInfos/ClientGoodsSet_/ClientGoodsSetEdit.cs index 8fc276c..2b5496d 100644 --- a/B3ClientService.Web/Pages/B3ClientService/BaseInfos/ClientGoodsSet_/ClientGoodsSetEdit.cs +++ b/B3ClientService.Web/Pages/B3ClientService/BaseInfos/ClientGoodsSet_/ClientGoodsSetEdit.cs @@ -88,15 +88,20 @@ namespace BWP.Web.Pages.B3ClientService.BaseInfos.ClientGoodsSet_ } _detailGrid.DataBind(); }; - + hPanel.Add(new SimpleLabel("标准重量")); + var standard = hPanel.Add(new DFTextBox() { Width = Unit.Pixel(50) }); hPanel.Add(new SimpleLabel("标准上限")); - var up = hPanel.Add(new DFTextBox() { Width=Unit.Pixel(50)}); + var up = hPanel.Add(new DFTextBox() { Width = Unit.Pixel(50) }); hPanel.Add(new SimpleLabel("标准上限")); var dw = hPanel.Add(new DFTextBox() { Width = Unit.Pixel(50) }); - hPanel.Add(new TSButton("更新上下限", delegate { + hPanel.Add(new TSButton("更新上下限", delegate + { GetFromUI(); + decimal? sValue = null; decimal? uValue = null; decimal? wValue = null; + if (!standard.IsEmpty) + sValue = decimal.Parse(standard.Text); if (!up.IsEmpty) uValue = decimal.Parse(up.Text); if (!dw.IsEmpty) @@ -104,13 +109,9 @@ namespace BWP.Web.Pages.B3ClientService.BaseInfos.ClientGoodsSet_ foreach (var d in _detailGrid.GetSelectedItems()) { var detail = d as ClientGoodsSet_Detail; - if (detail.StandardWeight.HasValue) - { - if (uValue.HasValue) - detail.StandardWeightUp = detail.StandardWeight + uValue; - if (wValue.HasValue ) - detail.StandardWeightLow = detail.StandardWeight - wValue; - } + detail.StandardWeight = sValue; + detail.StandardWeightUp = detail.StandardWeight + uValue; + detail.StandardWeightLow = detail.StandardWeight - wValue; } AppToUI(); }));