|
|
@ -58,14 +58,14 @@ namespace ButcherFactory.CarcassInStore_ |
|
|
if (workUnitSelect.SelectedValue == null) |
|
|
if (workUnitSelect.SelectedValue == null) |
|
|
workUnitID = null; |
|
|
workUnitID = null; |
|
|
else |
|
|
else |
|
|
workUnitID = ((WorkUnit)workUnitSelect.SelectedValue).ID; |
|
|
|
|
|
|
|
|
workUnitID = (long)workUnitSelect.SelectedValue; |
|
|
}; |
|
|
}; |
|
|
productBatchSelect.SelectedIndexChanged += delegate |
|
|
productBatchSelect.SelectedIndexChanged += delegate |
|
|
{ |
|
|
{ |
|
|
if (productBatchSelect.SelectedValue == null) |
|
|
if (productBatchSelect.SelectedValue == null) |
|
|
batchID = null; |
|
|
batchID = null; |
|
|
else |
|
|
else |
|
|
batchID = ((ProductBatch)productBatchSelect.SelectedValue).ID; |
|
|
|
|
|
|
|
|
batchID = (long)productBatchSelect.SelectedValue; |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -135,21 +135,18 @@ namespace ButcherFactory.CarcassInStore_ |
|
|
var goods = CarcassInStoreBL.GetGoodsList(); |
|
|
var goods = CarcassInStoreBL.GetGoodsList(); |
|
|
foreach (var item in goods) |
|
|
foreach (var item in goods) |
|
|
{ |
|
|
{ |
|
|
for (var i = 0; i < 10; i++) |
|
|
|
|
|
|
|
|
var btn = new UButton() { Width = 90, Height = 50, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(8, 14, 8, 0), PlaySound = true }; |
|
|
|
|
|
btn.Click += (sender, e) => |
|
|
{ |
|
|
{ |
|
|
var btn = new UButton() { Width = 90, Height = 50, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(8, 14, 8, 0), PlaySound = true }; |
|
|
|
|
|
btn.Click += (sender, e) => |
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(uScanPanel1.TextBox.Text)) |
|
|
|
|
|
throw new Exception("请先扫码"); |
|
|
|
|
|
if (uScanPanel1.TextBox.Text.Length != 23) |
|
|
|
|
|
throw new Exception("条码格式不正确"); |
|
|
|
|
|
var c = sender as UButton; |
|
|
|
|
|
var list = CarcassInStoreBL.InsertOrUpdate(workUnitID, batchID, (long)c.Tag, uScanPanel1.TextBox.Text); |
|
|
|
|
|
AfterUpdateOrInsert(list); |
|
|
|
|
|
}; |
|
|
|
|
|
flowLayoutPanel1.Controls.Add(btn); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(uScanPanel1.TextBox.Text)) |
|
|
|
|
|
throw new Exception("请先扫码"); |
|
|
|
|
|
if (uScanPanel1.TextBox.Text.Length != 23) |
|
|
|
|
|
throw new Exception("条码格式不正确"); |
|
|
|
|
|
var c = sender as UButton; |
|
|
|
|
|
var list = CarcassInStoreBL.InsertOrUpdate(workUnitID, batchID, (long)c.Tag, uScanPanel1.TextBox.Text); |
|
|
|
|
|
AfterUpdateOrInsert(list); |
|
|
|
|
|
}; |
|
|
|
|
|
flowLayoutPanel1.Controls.Add(btn); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|