|
|
@@ -781,14 +781,16 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
//如果有选中行
|
|
|
- if (SelectProdcode != "")
|
|
|
+ if (SelectRowIndex >=0)
|
|
|
{
|
|
|
MidOutBoxCode.Clear();
|
|
|
MidOutBoxCodeIndex.Clear();
|
|
|
}
|
|
|
+ SelectProdcode = LabelInf.Rows[SelectRowIndex].Cells["pib_prodcode"].Value.ToString();
|
|
|
+ SelectMidBoxCode = LabelInf.Rows[SelectRowIndex].Cells["pib_outboxcode1"].Value.ToString();
|
|
|
for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
{
|
|
|
- if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode)
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode&& LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() == SelectMidBoxCode)
|
|
|
{
|
|
|
if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
|
|
|
{
|
|
|
@@ -1731,10 +1733,12 @@ namespace UAS_LabelMachine
|
|
|
LoadPrcodeData();
|
|
|
}
|
|
|
string SelectProdcode = "";
|
|
|
+ string SelectMidBoxCode = "";
|
|
|
+ int SelectRowIndex=-1;
|
|
|
private void LabelInf_CellClick(object sender, DataGridViewCellEventArgs e)
|
|
|
{
|
|
|
LabelInf.Rows[e.RowIndex].Selected = true;
|
|
|
- SelectProdcode = LabelInf.Rows[e.RowIndex].Cells["pib_prodcode"].Value.ToString();
|
|
|
+ SelectRowIndex = e.RowIndex;
|
|
|
}
|
|
|
}
|
|
|
}
|