public JArray Create_ModelAltSku(string sku) { JArray altSkus = new JArray(); string sql = string.Format("PR_MM_BARCODE_ARTICLES_INFORMATION '{0}' , '{1}' ", "SOUTH", sku); DataTable dt = DAL.SELECT_SQL(sql); if (dt.Rows.Count > 0) { code = sku; sku = sku.TrimStart('0'); int count = DAL.IntReturn(dt.Rows.Count); for (int i = 0; i < count; i++) { try { AltSku altSku = new AltSku(); altSku.altsku = dt.Rows[i]["Barcode"].ToString(); altSku.storerkey = "OW9600"; altSku.sku = sku; string output = JsonConvert.SerializeObject(altSku); JObject objectAltSku = JObject.Parse(output); altSkus.Add(objectAltSku); } catch (Exception e) { string step = string.Format(Constant.MODEL_ALTSKU, "SOUTH"); resultMapping.Handle_Error_Mapping(code, e.ToString(), step); continue; } } } return(altSkus); }
public JArray Create_ModelAltSku_South(string sku) { JArray altSkus = new JArray(); string sql = string.Format("Select * from MM_Barcode_Articles where Article_Number='{0}' and status=''", sku); DataTable dt = DAL.SELECT_SQL(sql); if (dt.Rows.Count > 0) { int count = DAL.IntReturn(dt.Rows.Count); for (int i = 0; i < count; i++) { AltSku altSku = new AltSku(); altSku.altsku = dt.Rows[i]["Barcode"].ToString(); altSku.storerkey = "OW9600"; altSku.sku = dt.Rows[i]["Article_Number"].ToString(); altSku.udf1 = dt.Rows[i]["Warehouse_Number"].ToString(); string output = JsonConvert.SerializeObject(altSku); JObject objectAltSku = JObject.Parse(output); altSkus.Add(objectAltSku); } } return(altSkus); }