|
|
@@ -49,16 +49,21 @@ namespace UAS_MES.OQC
|
|
|
|
|
|
private void GetBatch_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+ string ErrorMessage = "";
|
|
|
DataTable[] dt = LogicHandler.GetOQCBatch(ms_sncode.Text, obd_outboxcode.Text, ob_checkno.Text, "OQCCHECKNOSPLIT", out ErrorMessage);
|
|
|
- BaseUtil.SetFormValue(this.Controls, dt[0]);
|
|
|
- if (dt[1] != null)
|
|
|
+ if (ErrorMessage == "")
|
|
|
{
|
|
|
- BaseUtil.FillDgvWithDataTable(OutBoxDGV, dt[1]);
|
|
|
+ BaseUtil.SetFormValue(this.Controls, dt[0]);
|
|
|
+ if (dt[1] != null)
|
|
|
+ {
|
|
|
+ BaseUtil.FillDgvWithDataTable(OutBoxDGV, dt[1]);
|
|
|
+ }
|
|
|
+ int oldchecknocount = dh.getRowCount("oqcbatch", "ob_oldcheckno='" + ob_checkno.Text + "'");
|
|
|
+ new_checkno.Text = ob_checkno.Text + "-0" + (oldchecknocount + 1);
|
|
|
+ choosedsn.Text = "0";
|
|
|
+ totalsn.Text = OutBoxDGV.Rows.Count.ToString();
|
|
|
}
|
|
|
- int oldchecknocount = dh.getRowCount("oqcbatch", "ob_oldcheckno='" + ob_checkno.Text + "'");
|
|
|
- new_checkno.Text = ob_checkno.Text + "-0" + (oldchecknocount + 1);
|
|
|
- choosedsn.Text = "0";
|
|
|
- totalsn.Text = OutBoxDGV.Rows.Count.ToString();
|
|
|
+ else OperateResult.AppendText(">>"+ErrorMessage+"\n", Color.Red);
|
|
|
}
|
|
|
|
|
|
private void SplitCheckNo_Click(object sender, EventArgs e)
|
|
|
@@ -90,7 +95,7 @@ namespace UAS_MES.OQC
|
|
|
sqls[4] = "update OQCBatch set ob_nowcheckqty=(select count(1) from oqcbatchdetail where obd_checkno='" + ob_checkno.Text + "') where ob_checkno='" + ob_checkno.Text + "'";
|
|
|
dh.ExecuteSQLTran(sqls);
|
|
|
GetBatch.PerformClick();
|
|
|
- OperateResult.AppendText(">>批次" + ob_checkno.Text + "拆解成功\n ",Color.Green);
|
|
|
+ OperateResult.AppendText(">>批次" + ob_checkno.Text + "拆解成功\n ", Color.Green);
|
|
|
}
|
|
|
else OperateResult.AppendText(">>批次状态必须是待检验\n", Color.Red);
|
|
|
}
|
|
|
@@ -145,6 +150,10 @@ namespace UAS_MES.OQC
|
|
|
{
|
|
|
if (sncode.Text == OutBoxDGV.Rows[i].Cells["obd_sncode"].Value.ToString())
|
|
|
{
|
|
|
+ if (OutBoxDGV.Rows[i].Cells[0].EditedFormattedValue.ToString() != "True")
|
|
|
+ OutBoxDGV.Rows[i].Cells[0].Value = true;
|
|
|
+ else
|
|
|
+ OutBoxDGV.Rows[i].Cells[0].Value = false;
|
|
|
if (OutBoxDGV.Rows[i].Cells["obd_outboxcode1"].Value.ToString() != "")
|
|
|
{
|
|
|
string Checked = OutBoxDGV.Rows[i].Cells[0].EditedFormattedValue.ToString();
|
|
|
@@ -165,6 +174,7 @@ namespace UAS_MES.OQC
|
|
|
}
|
|
|
if (!FindSN)
|
|
|
OperateResult.AppendText(">>批次" + ob_checkno.Text + "不存在序列号" + sncode.Text + "\n", Color.Red);
|
|
|
+ sncode.Text = "";
|
|
|
}
|
|
|
}
|
|
|
}
|