Example #1
0
        public ActionResult AddOrUpdateRoom(bool isNew, int roomNumber, string building, string location, int capacity)
        {
            Dal   db   = new Dal();
            Rooms room = new Rooms();

            room.RoomNumber = roomNumber;
            room.Building   = building;
            room.Location   = location;
            room.Capacity   = capacity;
            int result = db.AddOrUpdateRoom(isNew, room);

            return(Json(new { result = result.ToString() }, JsonRequestBehavior.AllowGet));
        }