|
|
@@ -738,26 +738,22 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
DataGridViewCell cell = null;
|
|
|
string Matchstr = "";
|
|
|
- string field = "";
|
|
|
switch (kind.ToString().ToUpper())
|
|
|
{
|
|
|
case "DATECODE":
|
|
|
cell = LabelInf.Rows[CurrentRowIndex].Cells["pib_datecode"];
|
|
|
- field = "pib_datecode";
|
|
|
Matchstr = MatchStr(data[j], "DATECODE");
|
|
|
setdata.Remove("DATECODE");
|
|
|
length--;
|
|
|
break;
|
|
|
case "LOTNO":
|
|
|
cell = LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"];
|
|
|
- field = "pib_lotno";
|
|
|
Matchstr = MatchStr(data[j], "LOTNO");
|
|
|
setdata.Remove("LOTNO");
|
|
|
length--;
|
|
|
break;
|
|
|
case "MPN":
|
|
|
cell = LabelInf.Rows[CurrentRowIndex].Cells["pr_vendprodcode"];
|
|
|
- field = "pr_vendprodcode";
|
|
|
Matchstr = MatchStr(data[j], "MPN");
|
|
|
//采集的供应商号不匹配的话
|
|
|
if (cell.Value.ToString() != Matchstr)
|
|
|
@@ -783,7 +779,6 @@ namespace UAS_LabelMachine
|
|
|
break;
|
|
|
case "QTY":
|
|
|
cell = LabelInf.Rows[CurrentRowIndex].Cells["pib_qty"];
|
|
|
- field = "pib_qty";
|
|
|
Matchstr = MatchStr(data[j], "QTY");
|
|
|
//如果采集的数量不相等的话
|
|
|
if (cell.Value.ToString() != Matchstr)
|
|
|
@@ -818,7 +813,7 @@ namespace UAS_LabelMachine
|
|
|
if (kind != "MPN" && kind != "QTY")
|
|
|
{
|
|
|
DataTable dt = (DataTable)MidSource.DataSource;
|
|
|
- dt.Rows[cell.RowIndex][field] = Matchstr;
|
|
|
+ cell.Value = Matchstr;
|
|
|
MatchResult = "成功";
|
|
|
}
|
|
|
else
|