コード例 #1
0
        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,
            }));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }