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