public ActionResult CreateReservation([Bind(Include = "ReservationID,CarID,CostumerID,ReservStatsID,StartDate,EndDate,Location,CouponCode")] Reservations reservations)
        {
            var date = Session["Dates"] as Dates;

            ViewBag.StartDate = date.StartDate;
            ViewBag.EndDate   = date.EndDate;
            var reservation1 = reservations;

            reservation1.ReservationID = reservations.ReservationID;
            reservation1.CarID         = reservations.CarID;
            reservation1.ReservStatsID = reservations.ReservStatsID;
            reservation1.StartDate     = date.StartDate;
            reservation1.EndDate       = date.EndDate;
            reservation1.Location      = reservations.Location;
            reservation1.CouponCode    = reservation1.CouponCode;

            if (ModelState.IsValid)
            {
                db.Reservations.Add(reservation1);
                db.SaveChanges();
                return(RedirectToAction("Complete"));
            }

            ViewBag.CarID         = new SelectList(db.Cars, "CarID", "Plate", reservations.CarID);
            ViewBag.CouponCode    = new SelectList(db.Coupons, "CouponCode", "Description", reservations.CouponCode);
            ViewBag.CostumerID    = new SelectList(db.Customers, "CostumerID", "Name", reservations.CostumerID);
            ViewBag.ReservStatsID = new SelectList(db.ReservationStatuses, "ReservStatsID", "Name", reservations.ReservStatsID);



            return(View(reservations));
        }
        public ActionResult Create([Bind(Include = "CouponCode,Description,Discount")] Coupons coupons)
        {
            if (ModelState.IsValid)
            {
                db.Coupons.Add(coupons);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(coupons));
        }
        public ActionResult Create([Bind(Include = "ReservStatsID,Name,Description")] ReservationStatuses reservationStatuses)
        {
            if (ModelState.IsValid)
            {
                db.ReservationStatuses.Add(reservationStatuses);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(reservationStatuses));
        }
        public ActionResult Create([Bind(Include = "CarID,Plate,Manufacturer,Model,PricePerDay")] Cars cars)
        {
            if (ModelState.IsValid)
            {
                db.Cars.Add(cars);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cars));
        }
        public ActionResult Create([Bind(Include = "CostumerID,Name,BirthDate,Location")] Customers customers)
        {
            if (ModelState.IsValid)
            {
                db.Customers.Add(customers);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(customers));
        }