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)); }
public RentalController() { _rentalBusiness = new RentalBusiness(); }
public ActionResult SearchRentalId() { var _r = new RentalBusiness(); return(View(_r.GetAllRentals())); }
//par public RentalController(RentalBusiness Rental) { _Rental = Rental; }