Example #1
0
 public static ReservationRequest CreateReservationRequest()
 {
     ReservationRequest rq = new ReservationRequest();
     rq.StartDate = DateTime.Today.AddDays(1);
     rq.EndDate = DateTime.Today.AddDays(2);
     return rq;
 }
        public ActionResult Create(ReservationRequest rq)
        {
            if (ModelState.IsValid)
            {
                return RedirectToAction("Index", rq);
            }

            ViewBag.BranchId = new SelectList(db.Branches, "BranchId", "BranchName", rq.BranchId);
            //ViewBag.CarId = new SelectList(db.Cars, "CarId", "CarColor", rq.CarId);
            return View(rq);
        }