|
|
|
@ -115,8 +115,8 @@ namespace WeighAndGrading |
|
|
|
|
|
|
|
if (modifyDetail == null) |
|
|
|
{ |
|
|
|
StartPrintEntity(tech, null); |
|
|
|
AddDetail(livestockTag); |
|
|
|
var code=StartPrintEntity(tech, null); |
|
|
|
AddDetail(livestockTag,code); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@ -416,18 +416,19 @@ namespace WeighAndGrading |
|
|
|
historyGrid.Refresh(); |
|
|
|
} |
|
|
|
|
|
|
|
void StartPrintEntity(string gongyijibie, int? index) |
|
|
|
string StartPrintEntity(string gongyijibie, int? index) |
|
|
|
{ |
|
|
|
if (!isPrintCheckBox.Checked) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(gongyijibie)) |
|
|
|
{ |
|
|
|
return; |
|
|
|
return ""; |
|
|
|
} |
|
|
|
var entity = CreatePrintEntity(gongyijibie, index); |
|
|
|
WeightGradePrint.Print(entity); |
|
|
|
if (isPrintCheckBox.Checked) |
|
|
|
{ |
|
|
|
WeightGradePrint.Print(entity); |
|
|
|
} |
|
|
|
return entity.BarCode; |
|
|
|
} |
|
|
|
|
|
|
|
PrintEntity CreatePrintEntity(string jibie, int? index) |
|
|
|
@ -477,7 +478,7 @@ namespace WeighAndGrading |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index); |
|
|
|
var code=StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index); |
|
|
|
cancelBtn_Click(sender, EventArgs.Empty); |
|
|
|
} |
|
|
|
|
|
|
|
@ -702,7 +703,7 @@ namespace WeighAndGrading |
|
|
|
#endregion
|
|
|
|
|
|
|
|
static object _obj = new object(); |
|
|
|
void AddDetail(CTuple<long, string, short, string> livestock) |
|
|
|
void AddDetail(CTuple<long, string, short, string> livestock,string barCode) |
|
|
|
{ |
|
|
|
lock (_obj) |
|
|
|
{ |
|
|
|
@ -732,7 +733,9 @@ namespace WeighAndGrading |
|
|
|
SetBtnUnCheck(disBtn); |
|
|
|
disBtn = null; |
|
|
|
} |
|
|
|
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight"); |
|
|
|
|
|
|
|
first.BarCode = barCode; |
|
|
|
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode"); |
|
|
|
var tag = details.FirstOrDefault(x => x.SID == first.SID); |
|
|
|
if (first != null) |
|
|
|
{ |
|
|
|
@ -751,6 +754,7 @@ namespace WeighAndGrading |
|
|
|
{ |
|
|
|
maxIndex++; |
|
|
|
var entity = new GradeAndWeight_Detail(); |
|
|
|
entity.BarCode = barCode; |
|
|
|
entity.Index = maxIndex; |
|
|
|
if (currentRow != null) |
|
|
|
{ |
|
|
|
|