public async Task <JsonResult> SaleOrder([FromQuery] string source_no) { try { List <Report> repotlist = new List <Report>(); Report repot = new Report(); source_no = "'" + source_no.Replace("|", "','") + "'"; DataSet ds = await _reportLogic.SaleOrder(source_no).ConfigureAwait(false); if (ds.Tables[0].Rows.Count > 0) { repot.condition = "True"; repot.message = ""; repot.sale_headers = ds.Tables[0]; repot.sale_lines = ds.Tables[1]; repotlist.Add(repot); return(new JsonResult(repotlist)); } else { repot.condition = "False"; repot.message = ""; repotlist.Add(repot); return(new JsonResult(repotlist)); } } catch (Exception ee) { return(await _reportLogic.SendRespose("False", ee.Message).ConfigureAwait(false)); } }