예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        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"));
        }