|
|
@ -470,6 +470,8 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
|
|
|
|
dtBarcode.AcceptChanges(); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
if (kp_no == "MB") |
|
|
|
{ |
|
|
|
ESUNContext _esun_context = new ESUNContext(); |
|
|
@ -483,6 +485,8 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
|
|
|
|
bool createMacCol = true; |
|
|
|
|
|
|
|
part_no = "91000237320038"; |
|
|
|
|
|
|
|
string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,
|
|
|
|
case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode, |
|
|
|
f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date |
|
|
@ -517,7 +521,7 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
{ |
|
|
|
for (int m = 0; m < esun_table.Rows.Count; m++) |
|
|
|
{ |
|
|
|
dtBarcode.Columns.Add("KP_MB" + k.ToString() + "_MAC" + (m + 1).ToString()); |
|
|
|
dtBarcode.Columns.Add("KP_MB" + (k + 1).ToString() + "_MAC" + (m + 1).ToString()); |
|
|
|
} |
|
|
|
dtBarcode.AcceptChanges(); |
|
|
|
createMacCol = false; |
|
|
@ -527,7 +531,7 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
for (int m = 0; m < esun_table.Rows.Count; m++) |
|
|
|
{ |
|
|
|
mac = esun_table.Rows[m]["part_barcode"].ToString().Trim(); |
|
|
|
dtBarcode.Rows[k]["KP_MB" + k.ToString() + "_MAC" + (m + 1).ToString()] = mac; |
|
|
|
dtBarcode.Rows[k]["KP_MB" + (k + 1).ToString() + "_MAC" + (m + 1).ToString()] = mac; |
|
|
|
dtBarcode.AcceptChanges(); |
|
|
|
} |
|
|
|
} |
|
|
@ -537,6 +541,8 @@ and b.item_no = '{0}' and a.barcode_no = '{1}'", kp_no, barcode_no); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch { } |
|
|
|
} |
|
|
|
dtBarcode.AcceptChanges(); |
|
|
|
} |
|
|
|
} |
|
|
|