public ActionResult SearchRentalId(string searchrentalid)
        {
            var _r     = new RentalBusiness();
            var search = from c in _r.GetAllRentals() select c;

            search = search.Where(d => d.RentalId.Equals(searchrentalid));

            return(View(search));
        }
        public ActionResult AddRentalPayment(RentalPaymentView model)
        {
            var            r  = new Rental();
            RentalBusiness rb = new RentalBusiness();
            var            rv = rb.GetRentalById(model.RentalId);


            if (ModelState.IsValid)
            {
                // if (model.RentalId == rv.RentalId)
                {
                    // if (model.AmountPaid == rv.TotalPrice)
                    {
                        rb.Quantity(model.PolicyHolderIdNo);
                    }
                }

                _rent.AddRentalPayment(model);
                return(RedirectToAction("GetAllRentalPayments"));
            }
            return(View(model));
        }
예제 #3
0
 public RentalController()
 {
     _rentalBusiness = new RentalBusiness();
 }
        public ActionResult SearchRentalId()
        {
            var _r = new RentalBusiness();

            return(View(_r.GetAllRentals()));
        }
예제 #5
0
 //par
 public RentalController(RentalBusiness Rental)
 {
     _Rental = Rental;
 }