public ActionResult CreateBill(int id)
        {
            int customerPolicyId             = id;
            CustomerpolicyDAORequest request = new CustomerpolicyDAORequest();
            CustomerpolicyViewModel  model   = request.GetCustomerPolicyById(id);

            return(View(model));
        }
Exemplo n.º 2
0
        //===============================================================================================
        public ActionResult CustomerHistory()
        {
            CustomerpolicyDAORequest request = new CustomerpolicyDAORequest();
            int id = (int)Session["id"];
            List <CustomerHistoryModelView> list = request.GetCustomerPolicyHistory(id);

            return(View(list));
        }
Exemplo n.º 3
0
        public ActionResult ShowCustomerPolicyHistory(int id, string customerName)
        {
            CustomerpolicyDAORequest        request = new CustomerpolicyDAORequest();
            List <CustomerHistoryModelView> list    = request.GetCustomerPolicyHistory(id);

            ViewBag.customerName = customerName;
            return(View(list));
        }
        public void AddCustomerPolicy()
        {
            CheckoutInfo checkout = (CheckoutInfo)Session["checkoutInfo"];

            Vehicle_Info    vehicleInfo    = checkout.Vehicle;
            Customer_Policy customerPolicy = checkout.CustomerPolicy;

            VehicleinfoViewModel vehicle = new VehicleinfoViewModel()
            {
                address          = vehicleInfo.address,
                brandid          = vehicleInfo.brand_id,
                eginenumber      = vehicleInfo.engine_number,
                framenumber      = vehicleInfo.frame_number,
                modelid          = vehicleInfo.model_id,
                ownername        = vehicleInfo.owner_name,
                ratebycondition  = vehicleInfo.rate_by_condition,
                vehiclecondition = vehicleInfo.vehicle_condition,
                vehiclenumber    = vehicleInfo.vehicle_number,
                version          = vehicleInfo.version
            };

            VehicleinfoDAORequest request1 = new VehicleinfoDAORequest();

            request1.Add(vehicle);

            VehicleinfoViewModel vehicle2 = request1.GetByAllNumber(vehicle.framenumber, vehicle.eginenumber, vehicle.vehiclenumber);

            CustomerpolicyViewModel cPolicy = new CustomerpolicyViewModel()
            {
                active           = customerPolicy.active,
                createdate       = customerPolicy.create_date,
                customeraddprove = customerPolicy.customer_add_prove,
                customerid       = (int)customerPolicy.customer_id,
                policyenddate    = customerPolicy.policy_end_date,
                policyid         = (int)customerPolicy.policy_id,
                policystartdate  = customerPolicy.policy_start_date,
                TotalPayment     = customerPolicy.total_payment,
                vehicleid        = vehicle2.id
            };

            CustomerpolicyDAORequest request2 = new CustomerpolicyDAORequest();

            request2.Add(cPolicy);
        }
Exemplo n.º 5
0
        //--------------------------------------------------------------------------------------

        //POLICY NEWARAL AND DUE REPORT
        public ActionResult PolicyDueReport()
        {
            ReportFeature report = new ReportFeature();


            CustomerpolicyDAORequest       request = new CustomerpolicyDAORequest();
            List <CustomerpolicyViewModel> list    = request.GetLapsePolicy(DateTime.Today);

            foreach (var item in list)
            {
                item.active = false;
                request.Update(item);
            }

            //one month due Policy
            //date of last month
            DateTime oneMonthLaterDate = DateTime.Today.AddMonths(1);

            ViewBag.duePolicy = report.ShowPolicyDue(oneMonthLaterDate);

            //Lapsed Policy
            ViewBag.lapsedPolicy = report.ShowLapsedPolicyDue(false);
            return(View());
        }