// GET: Hotelkamers/Create
 public ActionResult Create()
 {
     int[] Groote = new[] { 2, 3, 5 };
     ViewBag.Groote = new SelectList(Groote);
     ViewBag.Type   = new SelectList(Kamer.GetKamers(), "Name", "Description");
     return(View());
 }
 public ActionResult Edit(HotelkamerModel hotelkamer)
 {
     if (ModelState.IsValid)
     {
         _hotelkamerRepository.Update(hotelkamer);
         _hotelkamerRepository.Save();
         return(RedirectToAction("Index"));
     }
     ViewBag.Type = new SelectList(Kamer.GetKamers(), "Name", "Description", hotelkamer.Type);
     return(View(hotelkamer));
 }
        // GET: Hotelkamers/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HotelkamerModel hotelkamer = _hotelkamerRepository.Get(id.Value);

            if (hotelkamer == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Type   = new SelectList(Kamer.GetKamers(), "Name", "Description", hotelkamer.Type);
            ViewBag.Groote = new SelectList(new int[] { 2, 3, 5 }, hotelkamer.Groote);
            return(View(hotelkamer));
        }