|
|
@@ -90,7 +90,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 + "拆解成功!");
|
|
|
+ OperateResult.AppendText(">>批次" + ob_checkno.Text + "拆解成功\n ",Color.Green);
|
|
|
}
|
|
|
else OperateResult.AppendText(">>批次状态必须是待检验\n", Color.Red);
|
|
|
}
|
|
|
@@ -103,27 +103,34 @@ namespace UAS_MES.OQC
|
|
|
{
|
|
|
if (OutBoxDGV.Columns[e.ColumnIndex].Name == "choose")
|
|
|
{
|
|
|
- string Checked = OutBoxDGV.Rows[e.RowIndex].Cells[0].FormattedValue.ToString();
|
|
|
- for (int i = 0; i < OutBoxDGV.Rows.Count; i++)
|
|
|
+ if (OutBoxDGV.Rows[e.RowIndex].Cells["obd_outboxcode1"].Value.ToString() != "")
|
|
|
{
|
|
|
- if (OutBoxDGV.Rows[i].Cells["obd_outboxcode1"].Value.ToString() == OutBoxDGV.Rows[e.RowIndex].Cells["obd_outboxcode1"].Value.ToString())
|
|
|
+ string Checked = OutBoxDGV.Rows[e.RowIndex].Cells[0].EditedFormattedValue.ToString();
|
|
|
+ for (int i = 0; i < OutBoxDGV.Rows.Count; i++)
|
|
|
{
|
|
|
- if (Checked != "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() == OutBoxDGV.Rows[e.RowIndex].Cells["obd_outboxcode1"].Value.ToString())
|
|
|
+ {
|
|
|
+ if (Checked == "True")
|
|
|
+ OutBoxDGV.Rows[i].Cells[0].Value = true;
|
|
|
+ else
|
|
|
+ OutBoxDGV.Rows[i].Cells[0].Value = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
int ChoosedNum = 0;
|
|
|
+ CheckSn = "";
|
|
|
for (int i = 0; i < OutBoxDGV.Rows.Count; i++)
|
|
|
{
|
|
|
- if (OutBoxDGV.Rows[i].Cells[0].FormattedValue.ToString() == "True")
|
|
|
+ if (OutBoxDGV.Rows[i].Cells[0].EditedFormattedValue.ToString() == "True")
|
|
|
{
|
|
|
ChoosedNum = ChoosedNum + 1;
|
|
|
CheckSn += "'" + OutBoxDGV.Rows[i].Cells["obd_sncode"].Value.ToString() + "',";
|
|
|
}
|
|
|
}
|
|
|
- CheckSn = CheckSn.Substring(0, CheckSn.Length - 1);
|
|
|
+ if (CheckSn != "")
|
|
|
+ CheckSn = CheckSn.Substring(0, CheckSn.Length - 1);
|
|
|
+ else
|
|
|
+ CheckSn = "''";
|
|
|
choosedsn.Text = ChoosedNum.ToString();
|
|
|
}
|
|
|
}
|
|
|
@@ -138,19 +145,22 @@ namespace UAS_MES.OQC
|
|
|
{
|
|
|
if (sncode.Text == OutBoxDGV.Rows[i].Cells["obd_sncode"].Value.ToString())
|
|
|
{
|
|
|
- string Checked = OutBoxDGV.Rows[i].Cells[0].FormattedValue.ToString();
|
|
|
- for (int j = 0; j < OutBoxDGV.Rows.Count; j++)
|
|
|
+ if (OutBoxDGV.Rows[i].Cells["obd_outboxcode1"].Value.ToString() != "")
|
|
|
{
|
|
|
- if (OutBoxDGV.Rows[j].Cells["obd_outboxcode1"].Value.ToString() == OutBoxDGV.Rows[i].Cells["obd_outboxcode1"].Value.ToString())
|
|
|
+ string Checked = OutBoxDGV.Rows[i].Cells[0].EditedFormattedValue.ToString();
|
|
|
+ for (int j = 0; j < OutBoxDGV.Rows.Count; j++)
|
|
|
{
|
|
|
- if (Checked != "True")
|
|
|
- OutBoxDGV.Rows[j].Cells[0].Value = true;
|
|
|
- else
|
|
|
- OutBoxDGV.Rows[j].Cells[0].Value = false;
|
|
|
+ if (OutBoxDGV.Rows[j].Cells["obd_outboxcode1"].Value.ToString() == OutBoxDGV.Rows[i].Cells["obd_outboxcode1"].Value.ToString())
|
|
|
+ {
|
|
|
+ if (Checked == "True")
|
|
|
+ OutBoxDGV.Rows[j].Cells[0].Value = true;
|
|
|
+ else
|
|
|
+ OutBoxDGV.Rows[j].Cells[0].Value = false;
|
|
|
+ }
|
|
|
}
|
|
|
+ FindSN = true;
|
|
|
+ break;
|
|
|
}
|
|
|
- FindSN = true;
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
if (!FindSN)
|