|
@@ -323,19 +323,33 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
if (!CheckDateCode(Data["DATECODE"]))
|
|
|
{
|
|
|
- richTextAutoBottom1.AppendText("物料" + Data["PRCODE"] + "【DateCode】超出校验日期\n");
|
|
|
-
|
|
|
if (ConnectToMachine)
|
|
|
+ {
|
|
|
+ richTextAutoBottom1.AppendText("物料" + Data["PRCODE"] + "【DateCode】超出校验日期\n");
|
|
|
receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
- return;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string close = MessageBox.Show(this.ParentForm, "物料" + Data["PRCODE"] + "【DateCode】超出校验日期\n", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
+ if (close.ToString() != "Yes")
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
if (Data["BRAND"] != CurrentBrand)
|
|
|
{
|
|
|
- richTextAutoBottom1.AppendText("当前采集【品牌" + Data["BRAND"] + "】不对应\n");
|
|
|
-
|
|
|
if (ConnectToMachine)
|
|
|
+ {
|
|
|
+ richTextAutoBottom1.AppendText("当前采集【品牌" + Data["BRAND"] + "】不对应\n");
|
|
|
receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
- return;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ string close = MessageBox.Show(this.ParentForm, "当前采集【品牌" + Data["BRAND"] + "】不对应", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
+ if (close.ToString() != "Yes")
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
int CodeCount = 0;
|
|
|
|
|
@@ -1206,6 +1220,10 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
|
|
|
DataTable dt;
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("update prodiobarcode set pib_midboxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
+ sql.Append(" and pib_outboxcode1 in(" + pib_outboxcode1 + ")");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "update");
|
|
|
if (MidLabelAutoPrint.Checked)
|
|
|
{
|
|
|
if (CurrentRowOnly.Checked)
|
|
@@ -1242,6 +1260,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
if (!MidLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
|
|
|
MidReport.Load(MidLabelCombox.SelectedValue.ToString());
|
|
|
+
|
|
|
for (int j = 0; j < MidReport.Parameters.Count; j++)
|
|
|
{
|
|
|
MidReport.SetParameterValue(MidReport.Parameters[j].Name, "");
|
|
@@ -1259,10 +1278,6 @@ namespace UAS_LabelMachine
|
|
|
MidReport.PrintSettings.Printer = MidLabelPrinter.Text;
|
|
|
MidReport.Print();
|
|
|
dh.UpdateByCondition("prodiobarcode", "pib_midifprint=-1", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1 in (" + pib_outboxcode1 + ")");
|
|
|
- sql.Clear();
|
|
|
- sql.Append("update prodiobarcode set pib_midboxweight='" + Weight.Text + "' where pib_inoutno='" + pi_inoutno.Text + "' ");
|
|
|
- sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "' and pib_outboxcode1 in(" + pib_outboxcode1 + ")");
|
|
|
- dh.ExecuteSql(sql.ToString(), "update");
|
|
|
SelectRowIndex = -1;
|
|
|
LoadGridData(new object(), new EventArgs());
|
|
|
LogManager.DoCommandLog(pi_inoutno.Text, User.UserCode, "打印中盒" + pib_outboxcode1.Replace("'", ""), "打印成功");
|