public ActionResult LoadSuspectInformation(string ContactID) { try { AIA.Life.Models.Opportunity.Prospect objProspect = new Prospect(); objProspect.ContactID = Convert.ToInt32(CrossCutting.CrossCutting_EncryptDecrypt.Decrypt(ContactID.ToString())); objProspect.CreatedBy = _username; #region Check user authorization AuthorizeUser authorizeUser = new AuthorizeUser(); authorizeUser.UserName = _username; authorizeUser.ContactId = objProspect.ContactID; authorizeUser = new AIA.Life.Business.Common.CommonBusiness().CheckAuthorisation(authorizeUser); if (!string.IsNullOrEmpty(authorizeUser.Error.ErrorMessage)) { return(RedirectToAction("AuthorizeError", "Error", new { errorMessage = authorizeUser.Error.ErrorMessage })); } #endregion objProspect = objProspectBusiness.LoadContactInformation(objProspect); foreach (PreviousInsuranceList item in objProspect.objPreviousInsuranceList) { PrevPolicy obj = new PrevPolicy(); obj.PolicyNo = item.PolicyNumber; obj.MaturityFund = 0; objProspect.objNeedAnalysis.objPrevPolicy.Add(obj); } ViewBag.Type = "Suspect"; //objProspect.objNeedAnalysis.dlladversities.Add(new SelectListItem { Text = "Critical Illnesses" }); //objProspect.objNeedAnalysis.dlladversities.Add(new SelectListItem { Text = "Major Surgeries" }); //objProspect.objNeedAnalysis.dlladversities.Add(new SelectListItem { Text = "Loss of Income" }); //objProspect.objNeedAnalysis.dlladversities.Add(new SelectListItem { Text = "Pre and Post Hospitalization Expenses" }); //objProspect.objNeedAnalysis.dlladversities.Add(new SelectListItem { Text = "Excess Payments/Taxes" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "Below LKR 100,000" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "LKR 100,000 - 200,000" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "LKR 200,000 - 300,000" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "LKR 300,000 - 400,000" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "LKR 400,000 - 500,000" }); //objProspect.objNeedAnalysis.dllannualamount.Add(new SelectListItem { Text = "Above LKR 500,000" }); //objProspect.objNeedAnalysis.dllcoverage.Add(new SelectListItem { Text = "Local" }); //objProspect.objNeedAnalysis.dllcoverage.Add(new SelectListItem { Text = "Global" }); //objProspect.objNeedAnalysis.dlladequacy.Add(new SelectListItem { Text = "Yes" }); //objProspect.objNeedAnalysis.dlladequacy.Add(new SelectListItem { Text = "No" }); if (!string.IsNullOrEmpty(objProspect.NIC)) { objProspect.NICAVAIL = false; objProspect = objProspectBusiness.FetchNicverify(objProspect); if (objProspect == null) { objProspect = objProspectBusiness.FetchNicverifyPolicyIL(objProspect); } } if (objProspect.objNeedAnalysis.ProspectSign != null) { objProspect.Signature = Convert.ToString(objProspect.objNeedAnalysis.ProspectSign); } objProspect.objNeedAnalysis.Stage = "Lead"; for (int i = 0; i < objProspect.objNeedAnalysis.objFinancialNeeds.Count; i++) { if (objProspect.objNeedAnalysis.objFinancialNeeds[i].Name.ToUpper() == "HIGHER EDUCATION") { objProspect.objNeedAnalysis.objFinancialNeeds[i].ImagePath = "/Content/Images/FnaIcons/Education@0,25x.png"; } else if (objProspect.objNeedAnalysis.objFinancialNeeds[i].Name.ToUpper() == "WEDDING") { objProspect.objNeedAnalysis.objFinancialNeeds[i].ImagePath = "/Content/Images/FnaIcons/Children Wedding@0,25x.png"; } else if (objProspect.objNeedAnalysis.objFinancialNeeds[i].Name.ToUpper() == "PENSION FUND") { objProspect.objNeedAnalysis.objFinancialNeeds[i].ImagePath = "/Content/Images/FnaIcons/Gratutity@0,25x.png"; } else if (objProspect.objNeedAnalysis.objFinancialNeeds[i].Name.ToUpper() == "BUY CAR/PROPERTY") { objProspect.objNeedAnalysis.objFinancialNeeds[i].ImagePath = "/Content/Images/FnaIcons/Buy car_property@0,25x.png"; } else if (objProspect.objNeedAnalysis.objFinancialNeeds[i].Name.ToUpper() == "OTHER") { objProspect.objNeedAnalysis.objFinancialNeeds[i].ImagePath = "/Content/Images/FnaIcons/Other@0,25x.png"; } } return(View("~/Views/Prospect/CreateProspect.cshtml", objProspect)); } catch (Exception e) { return(View()); } }
private ActionResult ProposalPaymentInternal(string QuoteNo, string AppUserName = null, string CloseWindow = "false") { PaymentModel objPaymentModel = new PaymentModel(); objPaymentModel.QuoteNo = CrossCutting.CrossCutting_EncryptDecrypt.Decrypt(QuoteNo); #region Check user authorization AuthorizeUser authorizeUser = new AuthorizeUser(); if (!string.IsNullOrEmpty(AppUserName)) { authorizeUser.UserName = objPaymentModel.UserName = AppUserName; } else { authorizeUser.UserName = objPaymentModel.UserName = Username; } authorizeUser.QuoteNo = objPaymentModel.QuoteNo; authorizeUser = new AIA.Life.Business.Common.CommonBusiness().CheckAuthorisation(authorizeUser); if (!string.IsNullOrEmpty(authorizeUser.Error.ErrorMessage)) { return(RedirectToAction("AuthorizeError", "Error", new { errorMessage = authorizeUser.Error.ErrorMessage })); } #endregion objPaymentModel.CloseWindow = CloseWindow; TempData["CloseWindow"] = CloseWindow; objPaymentModel = objPaymentBusiness.FetchProposals(objPaymentModel); if (objPaymentModel.lstPaymentItems.Count > 0) { int planID = Convert.ToInt32(objPaymentModel.lstPaymentItems[0].PlanId); var obj = Context.tblMasProductPlans.Where(a => a.PlanId == planID).FirstOrDefault(); if (objPaymentModel.lstPaymentItems[0].PrefferedMode == "12") { switch (obj.PlanCode) { case "SBB": { if (objPaymentModel.lstPaymentItems[0].Premium < 12000) { objPaymentModel.lstPaymentItems[0].Premium = objPaymentModel.lstPaymentItems[0].Premium * 2; } break; } case "SBF": { objPaymentModel.lstPaymentItems[0].Premium = objPaymentModel.lstPaymentItems[0].Premium * 3; break; } case "PPG": { objPaymentModel.lstPaymentItems[0].Premium = objPaymentModel.lstPaymentItems[0].Premium * 3; break; } case "PPH": { if (objPaymentModel.lstPaymentItems[0].Premium < 12000) { objPaymentModel.lstPaymentItems[0].Premium = objPaymentModel.lstPaymentItems[0].Premium * 2; } break; } case "EPB": { if (objPaymentModel.lstPaymentItems[0].Premium < 12000) { objPaymentModel.lstPaymentItems[0].Premium = objPaymentModel.lstPaymentItems[0].Premium * 2; } break; } } } } return(View("~/Views/Payment/ProposalPayment.cshtml", objPaymentModel)); }