public ActionResult GetClaimForInsuer(int page = 1, string error = "") { ViewBag.AccountNo = ""; ViewBag.Name = ""; ViewBag.CardNo = ""; ViewBag.MobileNumber = ""; ViewBag.EmailId = ""; if (error != "") { ViewBag.Error = error; } ViewBag.All = true; var claimInsurer = new InsurerClaimDto(); claimInsurer.StatusMasterDtos = _iClaimHelper.GetStatus(); var claimPageData = new PagedData <ClaimsDto>(); claimInsurer.PagedData = claimPageData; claimPageData.Data = _iClaimHelper.GetClaimList(50, page); claimPageData.CurrentPage = page; var totalCount = _iClaimHelper.GetTotalClaimCount(); claimPageData.NumberOfPages = Convert.ToInt32(Math.Ceiling((double)totalCount / 50)); Session["InsurerclaimList"] = _iClaimHelper.GetClaimList(1, 50); return(View("ClaimListForInsurer", claimInsurer)); }
public ActionResult SearchClaimPage(string acNo, string name, string crdNo, string mNo, string eml, int page = 1) { ViewBag.IsSearch = true; ViewBag.AccountNo = acNo; ViewBag.Name = name; ViewBag.CardNo = crdNo; ViewBag.MobileNumber = mNo; ViewBag.EmailId = eml; var searchDto = new ClaimSearchDto { CardNo = crdNo, Name = name, AccountNo = acNo, EmailId = eml, MobileNo = mNo, UserId = Convert.ToInt32(Session["UserId"]), UserTypeId = 1 }; var claimInsurer = new InsurerClaimDto(); claimInsurer.StatusMasterDtos = _iClaimHelper.GetStatus(); var claimPageData = new PagedData <ClaimsDto>(); var claimSeachList = _iClaimHelper.GetClaimSearch(searchDto, 50, page); claimPageData.Data = claimSeachList; claimPageData.CurrentPage = page; var totalCount = _iClaimHelper.GetTotalClaimCountForSearch(searchDto); claimPageData.NumberOfPages = Convert.ToInt32(Math.Ceiling((double)totalCount / 50)); claimInsurer.PagedData = claimPageData; return(View("ClaimListForInsurer", claimInsurer)); }
public ActionResult UpdateStatus(FormCollection frm, string btnUpdate) { if (btnUpdate == "update") { var ddlStatus = frm.GetValue("ddlStatus"); var txtComment = frm.GetValue("txtComment"); var chkClaimIds = frm.GetValues("chkClaimIds"); var updateStatusListRequesstList = new List <UpdateStatusRequestDto>(); for (var i = 0; i < chkClaimIds.Length; i++) { updateStatusListRequesstList.Add(new UpdateStatusRequestDto { ClaimId = Convert.ToInt32(chkClaimIds[i]), StatusId = Convert.ToInt32(ddlStatus.AttemptedValue), UpdateDate = DateTime.Now, UpdateUserId = Convert.ToInt32(Session["UserId"]), Comment = txtComment.AttemptedValue }); } var claimList = _iClaimHelper.UpdateStatusOfClaim(updateStatusListRequesstList); foreach (var claimsDto in claimList) { SendMailApprovalReject(claimsDto, Convert.ToInt32(ddlStatus.AttemptedValue)); } } else if (btnUpdate == "Search") { var txtAccountNo = frm.GetValue("txtAccountNo"); var txtName = frm.GetValue("txtName"); var txtCardNumber = frm.GetValue("txtCardNumber"); var txtEmailId = frm.GetValue("txtEmailId"); var txtMobileNo = frm.GetValue("txtMobileNo"); var searchDto = new ClaimSearchDto { CardNo = txtCardNumber.AttemptedValue, Name = txtName.AttemptedValue, // PanNo = txtPanNo.AttemptedValue, AccountNo = txtAccountNo.AttemptedValue, EmailId = txtEmailId.AttemptedValue, MobileNo = txtMobileNo.AttemptedValue, UserId = Convert.ToInt32(Session["UserId"]), UserTypeId = 1 }; ViewBag.IsSearch = true; ViewBag.All = false; ViewBag.AccountNo = txtAccountNo.AttemptedValue; ViewBag.Name = txtName.AttemptedValue; ViewBag.CardNo = txtCardNumber.AttemptedValue; ViewBag.MobileNumber = txtMobileNo.AttemptedValue; ViewBag.EmailId = txtEmailId.AttemptedValue; var claimInsurer = new InsurerClaimDto(); claimInsurer.StatusMasterDtos = _iClaimHelper.GetStatus(); //claimInsurer.ClaimsDtos = claimSeachList; var claimPageData = new PagedData <ClaimsDto>(); var claimSeachList = _iClaimHelper.GetClaimSearch(searchDto, 50, 1); claimPageData.Data = claimSeachList; claimPageData.CurrentPage = 1; var totalCount = _iClaimHelper.GetTotalClaimCountForSearch(searchDto); claimPageData.NumberOfPages = Convert.ToInt32(Math.Ceiling((double)totalCount / 50)); claimInsurer.PagedData = claimPageData; Session["InsurerclaimList"] = claimSeachList; return(View("ClaimListForInsurer", claimInsurer)); } return(RedirectToAction("GetClaimForInsuer")); }