Browse Source

bug

master
yibo 7 years ago
parent
commit
88bf1d5193
3 changed files with 9 additions and 4 deletions
  1. +1
    -1
      ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs
  2. +4
    -1
      ButcherFactory.Form/Dialogs/AddWeightRecord.cs
  3. +4
    -2
      ButcherFactory.Form/Dialogs/WeightRecordDialog.cs

+ 1
- 1
ButcherFactory.Form/CarcassSaleOut_/CarcassSaleOutForm.cs View File

@ -157,7 +157,7 @@ namespace ButcherFactory.CarcassSaleOut_
if (orderGridView.CurrentRow == null)
throw new Exception("请选择配货明细");
var detail = orderGridView.CurrentRow.DataBoundItem as SaleOutStore_Detail;
var dg = new WeightRecordDialog(details.First(x => x.ID == detail.ID), already);
var dg = new WeightRecordDialog(details.First(x => x.ID == detail.ID), already, batchID);
dg.ShowDialog();
if (dg.Changed)
BindOrderGrid(detail.SaleOutStore_ID);


+ 4
- 1
ButcherFactory.Form/Dialogs/AddWeightRecord.cs View File

@ -16,11 +16,13 @@ namespace ButcherFactory.Dialogs
public partial class AddWeightRecord : Form
{
SaleOutStore_Detail mDetail;
long? mBatchID = null;
decimal number = 1;
public AddWeightRecord(SaleOutStore_Detail detail)
public AddWeightRecord(SaleOutStore_Detail detail,long? batchID)
{
InitializeComponent();
mDetail = detail;
mBatchID = batchID;
goodsLabel.Text = mDetail.Goods_Name;
}
@ -34,6 +36,7 @@ namespace ButcherFactory.Dialogs
record.BillID = mDetail.SaleOutStore_ID;
record.DetailID = mDetail.ID;
record.Filled = true;
record.ProductBatch_ID = mBatchID;
record.Goods_Code = mDetail.Goods_Code;
record.Goods_ID = mDetail.Goods_ID;
record.Goods_Name = mDetail.Goods_Name;


+ 4
- 2
ButcherFactory.Form/Dialogs/WeightRecordDialog.cs View File

@ -16,11 +16,13 @@ namespace ButcherFactory.Dialogs
{
BindingList<CarcassSaleOut_Detail> list;
SaleOutStore_Detail mDetail;
long? mBatchID = null;
public bool Changed = false;
public WeightRecordDialog(SaleOutStore_Detail detail, bool readOnly)
public WeightRecordDialog(SaleOutStore_Detail detail, bool readOnly,long? batchID)
{
InitializeComponent();
mDetail = detail;
mBatchID = batchID;
if (readOnly)
{
addBtn.Enabled = false;
@ -40,7 +42,7 @@ namespace ButcherFactory.Dialogs
private void addBtn_Click(object sender, EventArgs e)
{
if (new AddWeightRecord(mDetail).ShowDialog() == DialogResult.OK)
if (new AddWeightRecord(mDetail,mBatchID).ShowDialog() == DialogResult.OK)
{
BindGrid();
Changed = true;


Loading…
Cancel
Save