public async Task <ActionResult> Create([Bind(Include = "EventReservationId,GuestName,Guest_Email,Guest_Contact_No,EventName,EventDescription")] Event_GuestDetails event_GuestDetails)
        {
            if (ModelState.IsValid)
            {
                db.Event_GuestDetails.Add(event_GuestDetails);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(event_GuestDetails));
        }
        public async Task <ActionResult> Create([Bind(Include = "Food_category_Id,Category,Description")] Food_Categories food_Categories)
        {
            if (ModelState.IsValid)
            {
                db.Food_Categories.Add(food_Categories);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(food_Categories));
        }
Esempio n. 3
0
        public async Task <ActionResult> Create([Bind(Include = "Room_Catogory_Id,Room_Catogory,Room_Description,Image_Url,IsActive,LCD_Television,DvdPlayer,RoomServices,MiniBar,WiFi,HairDrier")] Room_Catagorys room_Catagorys)
        {
            if (ModelState.IsValid)
            {
                db.Room_Catagorys.Add(room_Catagorys);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(room_Catagorys));
        }
        public async Task <ActionResult> Create([Bind(Include = "Depertment_Id,Depertment,Password")] Admin_login admin_login)
        {
            if (ModelState.IsValid)
            {
                db.Admin_login.Add(admin_login);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(admin_login));
        }
        public async Task <ActionResult> Create([Bind(Include = "HallId,HallName,HallCapacity,HallDescription,HImage1,HImage2,HImage3,HImage4,Hall_price_Hour")] Hall hall)
        {
            if (ModelState.IsValid)
            {
                db.Halls.Add(hall);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(hall));
        }
        public async Task <ActionResult> Create([Bind(Include = "Package_ID,Package_Name,Package_Price,Package_Details")] Package package)
        {
            if (ModelState.IsValid)
            {
                db.Packages.Add(package);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(package));
        }
Esempio n. 7
0
        public async Task <ActionResult> Create([Bind(Include = "Guest_Id,Guest_Title,Guest_First_Name,Guest_Last_Name,Guest_Address,Guest_Email,Guest_MobileNO,Guest_CreditCardNo,Paasword")] Guest_Details guest_Details)
        {
            if (ModelState.IsValid)
            {
                db.Guest_Details.Add(guest_Details);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(guest_Details));
        }
        public async Task <ActionResult> Create([Bind(Include = "Bill_ID,Reservation_ID,Total_Charge,Paid")] Bill bill)
        {
            if (ModelState.IsValid)
            {
                db.Bills.Add(bill);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.Reservation_ID = new SelectList(db.Reservations, "Reservation_Id", "Reservation_Id", bill.Reservation_ID);
            return(View(bill));
        }
        public async Task <ActionResult> Create([Bind(Include = "Room_Id,Room_Category_Id,Room_Number,Room_Description,Room_Image_url_1,Room_Image_url_2,Room_Image_url_3,Room_Image_url_4,Room_Image_url_5,RoomCapacity")] Room room)
        {
            if (ModelState.IsValid)
            {
                db.Rooms.Add(room);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.Room_Category_Id = new SelectList(db.Room_Catagorys, "Room_Catogory_Id", "Room_Catogory", room.Room_Category_Id);
            return(View(room));
        }
Esempio n. 10
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Item_Category_ID,Item_Name,Item_Code,Description,Portion_Price,Image_URL")] Food_Items food_Items)
        {
            if (ModelState.IsValid)
            {
                db.Food_Items.Add(food_Items);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.Item_Category_ID = new SelectList(db.Food_Categories, "Food_category_Id", "Category", food_Items.Item_Category_ID);
            return(View(food_Items));
        }
Esempio n. 11
0
        public async Task <ActionResult> Create([Bind(Include = "BookingID,RoomNo,CategoryId,ArivalDate,DepartureDate,ReservationId")] RoomBooking roomBooking)
        {
            if (ModelState.IsValid)
            {
                db.RoomBookings.Add(roomBooking);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.ReservationId = new SelectList(db.Reservations, "Reservation_Id", "Reservation_Id", roomBooking.ReservationId);
            return(View(roomBooking));
        }
        public async Task <ActionResult> Create([Bind(Include = "Order_Id,Reservation_Id,Item_Id,Item_Quantity,Item_Portion_Price,Total_Item_Price")] Order order)
        {
            if (ModelState.IsValid)
            {
                db.Orders.Add(order);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.Item_Id        = new SelectList(db.Food_Items, "Id", "Item_Name", order.Item_Id);
            ViewBag.Reservation_Id = new SelectList(db.Reservations, "Reservation_Id", "Reservation_Id", order.Reservation_Id);
            return(View(order));
        }
        public async Task <ActionResult> Create([Bind(Include = "EventBookingID,HallNumber,EventStartDate,EventEndDate,EventReservationId")] EventReservation eventReservation)
        {
            if (ModelState.IsValid)
            {
                db.EventReservations.Add(eventReservation);
                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));
        }
        public async Task <ActionResult> Create([Bind(Include = "Reservation_Id,Guest_Id,Package_Id,Room_Number,Check_In,Check_Out,Adults,Childrens")] Reservation reservation)
        {
            if (ModelState.IsValid)
            {
                db.Reservations.Add(reservation);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.Guest_Id    = new SelectList(db.Guest_Details, "Guest_Id", "Guest_Title", reservation.Guest_Id);
            ViewBag.Package_Id  = new SelectList(db.Packages, "Package_ID", "Package_Name", reservation.Package_Id);
            ViewBag.Room_Number = new SelectList(db.Rooms, "Room_Id", "Room_Description", reservation.Room_Number);
            return(View(reservation));
        }