public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom) { return(new ClassSummaryViewData(classDetails) { Room = RoomViewData.Create(currentRoom) }); }
public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom, IList <Period> periods, IList <DayType> dayTypes) { return(new ClassSummaryViewData(classDetails) { Room = currentRoom != null?RoomViewData.Create(currentRoom) : null, Periods = periods?.Select(x => x.Name).ToList(), DayTypes = dayTypes?.Select(x => x.Name).ToList() }); }
protected ClassInfoViewData(ClassDetails cClass, Room room, ChalkableDepartment department) : base(cClass) { if (room != null) { Room = RoomViewData.Create(room); } if (department != null) { Department = ChalkableDepartmentViewData.Create(department); } }
public IActionResult InsertBed(RoomViewData roomviewdata) { var dbbed = new Bed { RoomId = roomviewdata.RoomId, BedNumber = roomviewdata.BedNumber, BedType = roomviewdata.BedType, Bottem_top = roomviewdata.Bottem_top }; _iroom.InsertBed(dbbed); return(RedirectToAction("Index")); }
public IActionResult InsertRoom(RoomViewData roomViewData) { RoomViewData room = roomViewData; Room dbroom = new Room { RoomName = roomViewData.RoomName, RoomType = roomViewData.RoomType, RoomNumber = roomViewData.RoomNumber, RoomPrice = roomViewData.RoomPrice }; _iroom.InsertRoom(dbroom); return(RedirectToAction("Index")); }
public IActionResult AddBed(int roomId) { var dbRoom = _iroom.GetRoomWhitId(roomId); var dbBedList = _iroom.getBedsWhitRoomId(roomId); var roomview = new RoomViewData { RoomId = dbRoom.RoomId, RoomName = dbRoom.RoomName, RoomType = dbRoom.RoomType, Bedlist = dbBedList, }; return(View(roomview)); }
public IActionResult CreateRoom(RoomViewData roomViewData) { return(View()); }