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)); }
public PaymentModel FetchProposals(PaymentModel objPaymentModel) { PaymentBusiness objPaymentBusiness = new PaymentBusiness(); return(objPaymentBusiness.FetchProposals(objPaymentModel)); }