|
@@ -281,6 +281,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
SplitData2 = Input.Text.Split(System.Convert.ToChar(29));//< GS >
|
|
|
SplitData2 = Regex.Split(Input.Text, "<GS>", RegexOptions.IgnoreCase);
|
|
|
+ String qty;
|
|
|
for (int i = 0; i < SplitData2.Length; i++)
|
|
|
{
|
|
|
Console.WriteLine(SplitData2[i]);
|
|
@@ -298,13 +299,25 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (dh.CheckExist("product", "pr_code = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "-" + SplitData2[2].Substring(SplitData2[2].Length - 3, 3) + "'"))
|
|
|
+
|
|
|
+ String qtycheck = SplitData2[3].Substring(1, SplitData2[3].Length - 1).Split('/')[0];
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ qty = SplitData2[3].Substring(1, SplitData2[3].Length - 1).Split('/')[1];
|
|
|
+ }
|
|
|
+ catch
|
|
|
+ {
|
|
|
+ qty = SplitData2[3].Substring(1, SplitData2[3].Length - 1).Split('/')[0];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dh.CheckExist("product", "pr_code = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "-" + SplitData2[1].Substring(SplitData2[1].Length - 3, 3) + "'"))
|
|
|
{
|
|
|
Data.Add("PRCODE", SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "-" + SplitData2[1].Substring(SplitData2[1].Length - 3, 3));
|
|
|
}
|
|
|
- else if (dh.CheckExist("product", "pr_specvalue = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "' and pr_nexbzs_user = '" + SplitData2[3].Substring(1, SplitData2[3].Length - 1) + "' "))
|
|
|
+ else if (dh.CheckExist("product", "pr_specvalue = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "' and pr_nexbzs_user = '" + qtycheck + "' "))
|
|
|
{
|
|
|
- Data.Add("PRCODE", dh.getFieldDataByCondition("product", "pr_code", "pr_specvalue = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "' and pr_nexbzs_user = '" + SplitData2[3].Substring(1, SplitData2[3].Length - 1) + "'").ToString());
|
|
|
+ Data.Add("PRCODE", dh.getFieldDataByCondition("product", "pr_code", "pr_specvalue = '" + SplitData2[2].Substring(3, SplitData2[2].Length - 3) + "' and pr_nexbzs_user = '" + qtycheck + "'").ToString());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -312,7 +325,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Data.Add("QTY", SplitData2[3].Substring(1, SplitData2[3].Length - 1));
|
|
|
+ Data.Add("QTY", qty);
|
|
|
|
|
|
Data.Add("DATECODE", SplitData2[4].Substring(2, SplitData2[4].Length - 2));
|
|
|
|