|
@@ -239,11 +239,16 @@ namespace UAS_MES.Make
|
|
|
dh.ExecuteSql("update makeserial set ms_nextmacode='" + ma_code.Text + "' where ms_sncode='" + ms_beforesn + "' and ms_nextmacode='" + ms_makecode + "'", "update");
|
|
|
}
|
|
|
OperateResult.AppendText(">>序列号" + sn_code.Text + "归属工单" + ma_code.Text + "成功。\n", Color.Green);
|
|
|
+ getsnqty.Text = dh.getFieldDataByCondition("makeserial ", "count(1)", "ms_makecode='" + ma_code.Text + "'").ToString();
|
|
|
if (AutoPrint.Checked)
|
|
|
{
|
|
|
- OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
|
|
|
- Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
|
|
|
- dh.UpdateByCondition("makeserial", "ms_printcount=nvl(ms_printcount,0)+1", "ms_sncode='" + sn_code.Text + "'");
|
|
|
+ if (PrintLabel.Items.Count != 0)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
|
|
|
+ Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
|
|
|
+ dh.UpdateByCondition("makeserial", "ms_printcount=nvl(ms_printcount,0)+1", "ms_sncode='" + sn_code.Text + "'");
|
|
|
+ }
|
|
|
+ else OperateResult.AppendText(">>" + pr_code.Text + "未维护标签\n", Color.Black);
|
|
|
}
|
|
|
sn_code.Clear();
|
|
|
}
|