Example #1
0
 public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom)
 {
     return(new ClassSummaryViewData(classDetails)
     {
         Room = RoomViewData.Create(currentRoom)
     });
 }
Example #2
0
 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()
     });
 }
Example #3
0
 protected ClassInfoViewData(ClassDetails cClass, Room room, ChalkableDepartment department)
     : base(cClass)
 {
     if (room != null)
     {
         Room = RoomViewData.Create(room);
     }
     if (department != null)
     {
         Department = ChalkableDepartmentViewData.Create(department);
     }
 }
Example #4
0
        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"));
        }
Example #5
0
        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"));
        }
Example #6
0
        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));
        }
Example #7
0
 public IActionResult CreateRoom(RoomViewData roomViewData)
 {
     return(View());
 }