public ActionResult PendingPolicyList(DateTime?FromDate, DateTime?ToDate, string PolicyNo = "", string Client = "", string SalesManager = "") { ViewBag.Fromdate = new PolicyRenewalRepository().GetFromDate(); ViewBag.Todate = new PolicyRenewalRepository().GetToDate(); FromDate = FromDate ?? ViewBag.Fromdate; ToDate = ToDate ?? ViewBag.Todate; var pendingData = new PolicyRenewalRepository().GetNewPolicyForRenewal(UserID, UserRolename, FromDate, ToDate, PolicyNo, Client, SalesManager); Session["pendingData"] = pendingData; return(PartialView("_PendingPolicyListGrid", pendingData)); //return PartialView("_PendingPolicyListGrid", new PolicyRenewalRepository().GetNewPolicyForRenewal(FromDate, ToDate,PolicyNo,Client, SalesManager)); }
public ActionResult LoadQuickView() { QuickView view = new QuickView(); view.RenewalPolicy = true; if (view.RenewalPolicy) { DateTime FromDate = new PolicyRenewalRepository().GetFromDate(); DateTime ToDate = new PolicyRenewalRepository().GetToDate(); var res = new PolicyRenewalRepository().GetNewPolicyForRenewal(UserID, UserRolename, FromDate, ToDate, "", "", ""); view.NoOfRenewalPolicy = res.Count; } return(PartialView("_LoginPartial", view)); }
public ActionResult Create(int Id) { FillDropdowns(); PolicyIssue objPolicy = new PolicyRenewalRepository().GetNewPolicyForRenewal(Id); objPolicy.PolicySubDate = DateTime.Now; objPolicy.TranType = "RenewPolicy"; var internalid = PolicyIssueRepository.GetNextDocNo(objPolicy.TranType); objPolicy.TranNumber = "CIB/REN/" + internalid; objPolicy.Cheque = new PolicyIssueRepository().GetChequeDetails(Id); if (objPolicy.Cheque.Count == 0) { objPolicy.Cheque.Add(new PolicyIssueChequeReceived()); } return(View("Create", objPolicy)); }
public ActionResult Create(PolicyIssue model) { model.TranPrefix = "CIB/REN"; model.TranDate = System.DateTime.Now; model.CreatedDate = System.DateTime.Now; model.CreatedBy = UserID; if (!ModelState.IsValid) { var allErrors = ModelState.Values.SelectMany(v => v.Errors); return(View(model)); } Result res = new PolicyRenewalRepository().Insert(model); if (res.Value) { TempData["Success"] = "Saved Successfully!"; } else { } return(RedirectToAction("Index")); }