Ejemplo n.º 1
0
        public ActionResult Room(itmmAdminRoom model)
        {
            Room a = new Room();

            a.RoomName = model.room;
            con.AddToRooms(a);
            con.SaveChanges();

            return(RedirectToAction("Room", "AdminBold"));
        }
Ejemplo n.º 2
0
        public ActionResult EditRoom(itmmAdminRoom model)
        {
            var x = (from y in con.Rooms
                     where y.RoomId == model.roomid
                     select y).FirstOrDefault();

            x.RoomName = model.room;

            con.SaveChanges();

            return(RedirectToAction("Room", "AdminBold"));
        }
Ejemplo n.º 3
0
        public ActionResult EditRoom(int RoomId)
        {
            var x = (from y in con.Rooms
                     where y.RoomId == RoomId
                     select y).FirstOrDefault();

            itmmAdminRoom b = new itmmAdminRoom();

            b.room = x.RoomName;

            return(View(b));
        }