diff --git a/DropPigReOrder/ReOrderForm.cs b/DropPigReOrder/ReOrderForm.cs index dad4c82..2373a8e 100644 --- a/DropPigReOrder/ReOrderForm.cs +++ b/DropPigReOrder/ReOrderForm.cs @@ -123,9 +123,11 @@ namespace DropPigReOrder { if (lastSelect == null) throw new Exception("请选选择掉猪的行记录"); + if(lastSelect.IsDrop) + throw new Exception("不可以对掉猪的明细在做掉猪处理。"); bool ok = false; List order = new List(); - if (string.IsNullOrEmpty(tangInput.Text)) + if (!string.IsNullOrEmpty(tangInput.Text)) { var num = int.Parse(tangInput.Text); if (num != 0) @@ -133,8 +135,9 @@ namespace DropPigReOrder ok = true; order.Add(OrderDetailRpc.InsertDropPig(lastSelect.OrderDetail_ID, num, 0)); } + tangInput.Clear(); } - if (string.IsNullOrEmpty(maoInput.Text)) + if (!string.IsNullOrEmpty(maoInput.Text)) { var num = int.Parse(maoInput.Text); if (num != 0) @@ -142,9 +145,13 @@ namespace DropPigReOrder ok = true; order.Add(OrderDetailRpc.InsertDropPig(lastSelect.OrderDetail_ID, num, 1)); } + maoInput.Clear(); } if (ok) - UMessageBox.Show(string.Format("处理成功!新的排宰顺序号为:{0}", string.Join("、", order)), "成功提示"); + { + UMessageBox.Show(string.Format("处理成功!{0}新的排宰顺序号为:{1}", Environment.NewLine, string.Join("、", order)), "成功提示"); + BindOrderGrid(); + } else UMessageBox.Show("请输入烫褪或毛剥头数", "错误"); }