Browse Source

修正。

master
yibo 8 years ago
parent
commit
bdfeec6d17
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      DropPigReOrder/ReOrderForm.cs

+ 10
- 3
DropPigReOrder/ReOrderForm.cs View File

@ -123,9 +123,11 @@ namespace DropPigReOrder
{
if (lastSelect == null)
throw new Exception("请选选择掉猪的行记录");
if(lastSelect.IsDrop)
throw new Exception("不可以对掉猪的明细在做掉猪处理。");
bool ok = false;
List<int> order = new List<int>();
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("请输入烫褪或毛剥头数", "错误");
}


Loading…
Cancel
Save