public JsonResult GetTransNum(string Id)
        {
            var    internalid = PolicyIssueRepository.GetNextDocNo(Id);
            string prefix;

            if (Id == "RenewPolicy")
            {
                prefix = "CIB/REN/";
            }
            else
            {
                prefix = "CIB/NEW/";
            }

            return(Json(new { Success = true, internalid = prefix + internalid }, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
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));
        }
        public ActionResult Create(int?type)
        {
            //ViewBag.Type = type;
            FillDropdowns();
            PolicyIssue model = new PolicyIssue();

            model.TranType    = "NewPolicy";
            model.PolicyStage = type;
            var internalid = PolicyIssueRepository.GetNextDocNo(model.TranType);

            model.TranNumber = "CIB/NEW/" + internalid;
            model.Cheque     = new List <PolicyIssueChequeReceived>();
            model.Cheque.Add(new PolicyIssueChequeReceived());
            model.PolicySubDate = DateTime.Now;
            model.EffectiveDate = DateTime.Now;
            // model.RenewalDate = DateTime.Now.AddMonths(6);
            model.ICActualDate = null;


            return(View(model));
        }