public async Task <ActionResult> DeleteConfirmed(int id)
        {
            EventReservation eventReservation = await db.EventReservations.FindAsync(id);

            db.EventReservations.Remove(eventReservation);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "EventBookingID,HallNumber,EventStartDate,EventEndDate,EventReservationId")] EventReservation eventReservation)
        {
            if (ModelState.IsValid)
            {
                db.Entry(eventReservation).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.EventReservationId = new SelectList(db.Event_GuestDetails, "EventReservationId", "GuestName", eventReservation.EventReservationId);
            ViewBag.HallNumber         = new SelectList(db.Halls, "HallId", "HallName", eventReservation.HallNumber);
            return(View(eventReservation));
        }
        // GET: Admin/EventReservations/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EventReservation eventReservation = await db.EventReservations.FindAsync(id);

            if (eventReservation == null)
            {
                return(HttpNotFound());
            }
            return(View(eventReservation));
        }
        // GET: Admin/EventReservations/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EventReservation eventReservation = await db.EventReservations.FindAsync(id);

            if (eventReservation == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EventReservationId = new SelectList(db.Event_GuestDetails, "EventReservationId", "GuestName", eventReservation.EventReservationId);
            ViewBag.HallNumber         = new SelectList(db.Halls, "HallId", "HallName", eventReservation.HallNumber);
            return(View(eventReservation));
        }