|
@@ -1914,6 +1914,7 @@ namespace UAS_LabelMachine
|
|
|
GetBarCodeRule(out Prefix, out Suffix, out MaxNum, out NumLength, out Radix, GetNumCount);
|
|
GetBarCodeRule(out Prefix, out Suffix, out MaxNum, out NumLength, out Radix, GetNumCount);
|
|
|
List<string> OutBoxCode = new List<string>();
|
|
List<string> OutBoxCode = new List<string>();
|
|
|
List<string> PIBID = new List<string>();
|
|
List<string> PIBID = new List<string>();
|
|
|
|
|
+ string Str_OutBoxCode = "";
|
|
|
for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
{
|
|
{
|
|
|
if (LabelInf.Rows[i].Cells["pib_custoutboxcode"].Value.ToString() == "")
|
|
if (LabelInf.Rows[i].Cells["pib_custoutboxcode"].Value.ToString() == "")
|
|
@@ -1942,10 +1943,23 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
OutBoxCode.Add(Prefix + serialcode + Suffix);
|
|
OutBoxCode.Add(Prefix + serialcode + Suffix);
|
|
|
|
|
+ Str_OutBoxCode += "'" + Prefix + serialcode + Suffix + "',";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- dh.BatchInsert("update prodiobarcode set pib_custoutboxcode=:pib_custoutboxcode where pib_id=:pib_id and pib_custoutboxcode is null", new string[] { "pib_custoutboxcode", "pib_outboxcode2" }, OutBoxCode.ToArray(), PIBID.ToArray());
|
|
|
|
|
- LoadGridData(sender, e);
|
|
|
|
|
|
|
+ if (OutBoxCode.ToArray().Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!dh.CheckExist("prodiobarcode", "pib_custcode='" + pi_cardcode.Text + "' and pib_custoutboxcode in (" + Str_OutBoxCode.Substring(0, Str_OutBoxCode.Length - 1) + ")"))
|
|
|
|
|
+ {
|
|
|
|
|
+ dh.BatchInsert("update prodiobarcode set pib_custoutboxcode=:pib_custoutboxcode where pib_id=:pib_id and pib_custoutboxcode is null", new string[] { "pib_custoutboxcode", "pib_outboxcode2" }, OutBoxCode.ToArray(), PIBID.ToArray());
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ dh.UpdateByCondition("RULEMAXNUM", "rmn_maxnumber='" + (MaxNum + 1) + "'", "rmn_nrcode='" + (NrCode == "" ? "Default" : NrCode) + "' and rmn_prefix='" + Prefix + "' and rmn_type='" + ReSetType + "'");
|
|
|
|
|
+ Pack_Click(sender, e);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ LoadGridData(sender, e);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|