public ActionResult Room(itmmAdminRoom model) { Room a = new Room(); a.RoomName = model.room; con.AddToRooms(a); con.SaveChanges(); return(RedirectToAction("Room", "AdminBold")); }
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")); }
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)); }