示例#1
0
        public async Task <List <CoverageBalance> > GetCoveragesByNationalId()
        {
            string nationalId = TempData["NationalId"].ToString();
            string yob        = TempData["YOB"].ToString();

            TempData.Keep("YOB");
            TempData.Keep("NationalId");
            var result = new List <CoverageBalance>();

            try
            {
                if (nationalId != null && yob != null)
                {
                    var clsInput = new ClsInput();
                    clsInput.code       = "";
                    clsInput.nationalID = nationalId;
                    DateTime date = Convert.ToDateTime(yob);
                    clsInput.yearOfBirth = date.Year.ToString();
                    clsInput.insPolicyNo = "";
                    result = await _coverageHandler.GetCoveragesByNationalId(clsInput);
                }
                return(result);
            }
            catch (Exception ex)
            {
                _logger.LogInformation(_className + "::GetCoveragesByNationalId::" + ex.Message);
            }
            return(result);
        }
        public async Task <List <CoverageBalance> > GetCoveragesByNationalId()
        {
            string nationalId = TempData["NationalId"].ToString();
            string yob        = TempData["YOB"].ToString();

            TempData.Keep("YOB");
            TempData.Keep("NationalId");
            var result = new List <CoverageBalance>();

            if (nationalId != null && yob != null)
            {
                var clsInput = new ClsInput();
                clsInput.code       = "";
                clsInput.nationalID = nationalId;
                DateTime date = Convert.ToDateTime(yob);
                clsInput.yearOfBirth = date.Year.ToString();
                clsInput.insPolicyNo = "";
                result = await _coverageHandler.GetCoveragesByNationalId(clsInput);
            }
            return(result);
        }