Example #1
0
        public ActionResult Delete(Int16 id)
        {
            HotelEventService cat = db.HotelEventServices.Where(x => x.EventServiceID == id).Single <HotelEventService>();

            db.HotelEventServices.DeleteOnSubmit(cat);
            db.SubmitChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult Edit(HotelEventService_model cat)
        {
            HotelEventService tblcat = db.HotelEventServices.Where(x => x.EventServiceID == cat.EventServiceID).Single <HotelEventService>();

            tblcat.HotelID   = Convert.ToInt32(Session["HotelId"]);
            tblcat.EventName = cat.EventName;
            db.SubmitChanges();
            return(View());
        }
Example #3
0
        public ActionResult HotelEventService(HotelEventService_model cat)
        {
            HotelEventService tblcat = new HotelEventService();

            tblcat.HotelID   = Convert.ToInt32(Session["HotelId"]);
            tblcat.EventName = cat.EventName;

            db.HotelEventServices.InsertOnSubmit(tblcat);

            db.SubmitChanges();
            return(View());
        }