コード例 #1
0
        public async Task <IActionResult> RetrieveSubjectsForANMReports(ANMReportRequest anmData)
        {
            _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
            _logger.LogDebug($"Request - Retrieve subject detail for anm report- {JsonConvert.SerializeObject(anmData)}");
            var anmReports = await _anmReportsService.RetriveANMReportsDetail(anmData);

            _logger.LogInformation($"Fetch Subjects for anm reports {anmReports}");
            _logger.LogDebug($"Response - Retrieve subject detail for anm report- {JsonConvert.SerializeObject(anmReports)}");
            return(Ok(new ANMReportResponse
            {
                status = anmReports.status,
                message = anmReports.message,
                data = anmReports.data,
            }));
        }
コード例 #2
0
        public List <ANMReports> RetrieveANMReportsPostPNDTC(ANMReportRequest anmData)
        {
            string stProc = ANMPostPNDTCReport;
            var    pList  = new List <SqlParameter>()
            {
                new SqlParameter("@FromDate", anmData.fromDate),
                new SqlParameter("@ToDate", anmData.toDate),
                new SqlParameter("@ANMID", anmData.userId),
                new SqlParameter("@RIID", anmData.riId),
                new SqlParameter("@SubjectType", anmData.subjectTypeId),
                new SqlParameter("@Status", anmData.status)
            };
            var allData = UtilityDL.FillData <ANMReports>(stProc, pList);

            return(allData);
        }
コード例 #3
0
        public async Task <ANMReportResponse> RetriveANMReportsDetail(ANMReportRequest anmData)
        {
            var tResponse = new ANMReportResponse();

            try
            {
                if (anmData.searchSection == 1)
                {
                    var result = _anmReportData.RetrieveANMReportsSampling(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 2)
                {
                    var result = _anmReportData.RetrieveANMReportsShipment(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 3)
                {
                    var result = _anmReportData.RetrieveANMReportsTimeoutDamaged(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 4)
                {
                    var result = _anmReportData.RetrieveANMReportsCHC(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 5)
                {
                    var result = _anmReportData.RetrieveANMReportsHPLC(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 6)
                {
                    var result = _anmReportData.RetrieveANMReportsPrePNDTC(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 7)
                {
                    var result = _anmReportData.RetrieveANMReportsPNDT(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 8)
                {
                    var result = _anmReportData.RetrieveANMReportsPostPNDTC(anmData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (anmData.searchSection == 9)
                {
                    var result = _anmReportData.RetrieveANMReportsMTP(anmData);
                    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);
        }