public async Task <IActionResult> RetrieveCHCReceiptsReports(CHCSampleReportRequest rData) { _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}"); _logger.LogDebug($"Retrieve subject detail for chc receipt report- {JsonConvert.SerializeObject(rData)}"); var chcReports = await _chcReceiptService.RetriveCHCReciptReportsDetail(rData); _logger.LogInformation($"Fetch Subjects for chc receipt reports {chcReports}"); return(Ok(new CHCReciptReportResponse { status = chcReports.status, message = chcReports.message, data = chcReports.data, })); }
public List <CHCReceiptReportDetails> RetrieveShipmentStatusReport(CHCSampleReportRequest rData) { string stProc = CHCSampleShipmentStatusReport; var pList = new List <SqlParameter>() { new SqlParameter("@FromDate", rData.fromDate), new SqlParameter("@ToDate", rData.toDate), new SqlParameter("@CHCID", rData.chcId), new SqlParameter("@PHCID", rData.phcId), new SqlParameter("@ANMID", rData.anmId), new SqlParameter("@Status", rData.status) }; var allData = UtilityDL.FillData <CHCReceiptReportDetails>(stProc, pList); return(allData); }
public async Task <CHCReciptReportResponse> RetriveCHCReciptReportsDetail(CHCSampleReportRequest rData) { var tResponse = new CHCReciptReportResponse(); try { if (rData.searchSection == 1) { var result = _chcReceiptData.RetrieveSampleRecpReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 2) { var result = _chcReceiptData.RetrieveTimeoutDamagedReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 3) { var result = _chcReceiptData.RetrieveCBCPendingReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 4) { var result = _chcReceiptData.RetrieveSSTPendingReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 5) { var result = _chcReceiptData.RetrievePositiveReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 6) { var result = _chcReceiptData.RetrieveNegativeReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else if (rData.searchSection == 7) { var result = _chcReceiptData.RetrieveShipmentStatusReport(rData); tResponse.status = "true"; tResponse.message = ""; tResponse.data = result; } else { tResponse.status = "false"; tResponse.message = "Please give some valid search section"; } } catch (Exception e) { tResponse.status = "false"; tResponse.message = e.Message; } return(tResponse); }