public ActionResult BillDetail(int id)
        {
            CustomerBillingInfoDAORequest request = new CustomerBillingInfoDAORequest();
            CustomerbillinginfoViewModel  model   = request.GetBillById(id);

            return(RedirectToAction("CustomerPolicyBillView", model));
        }
Exemplo n.º 2
0
        public ActionResult CheckBillExist(int customerPolicyId)
        {
            CustomerBillingInfoDAORequest       dao   = new CustomerBillingInfoDAORequest();
            List <CustomerbillinginfoViewModel> model = dao.CheckCustomerPolicyExist(customerPolicyId);

            if (model.Count > 0)
            {
                TempData["message"] = "Customer Policy already had a bill, please check Customer Billing Info";
                return(RedirectToAction("CustomerPolicyManager", new { page = 1 }));
            }
            else
            {
                return(RedirectToAction("CreateBill", "CustomerBllingManager", new { id = customerPolicyId }));
            }
        }
        public ActionResult CheckBillExist(CustomerbillinginfoViewModel cb)
        {
            CustomerBillingInfoDAORequest       dao   = new CustomerBillingInfoDAORequest();
            List <CustomerbillinginfoViewModel> model = dao.CheckCustomerPolicyExist(cb.id);

            if (model.Count > 0)
            {
                TempData["message"] = "Customer Policy already had a bill, please check Customer Billing Info";
                return(RedirectToAction("CusTomerBillManagerl", new { page = 1, pageSize = 10 }));
            }
            else
            {
                return(RedirectToAction("AddCustomerBill", new { l = cb }));
            }
        }
        public ActionResult CreateBillForCustomer()
        {
            int      customerPolicyId = int.Parse(Request.Params["customerPolicyId"]);
            string   customerProve    = Request.Params["customeraddprove"];
            string   billNumber       = Request.Params["bill_number"];
            DateTime createDate       = DateTime.Parse(Request.Params["createDate"]);
            decimal  amount           = decimal.Parse(Request.Params["amount"]);
            bool     active           = Request.Params["active"] == "TRUE" ? true : false;

            CustomerbillinginfoViewModel model = new CustomerbillinginfoViewModel()
            {
                customerpolicyid = customerPolicyId,
                active           = active,
                amount           = amount,
                bill_number      = billNumber,
                createdate       = createDate,
                customeraddprove = customerProve
            };

            CustomerBillingInfoDAORequest request = new CustomerBillingInfoDAORequest();

            request.Add(model);
            return(RedirectToAction("CustomerPolicyBillView", model));
        }