示例#1
0
        public GetRoomStatusResponseDto GetRoomStatus()
        {
            var response = new GetRoomStatusResponseDto();

            if (!AppConfigReaderHelper.AppConfigToBool(AppSettingKeys.MockEnabled))
            {
                response.RoomStatuses = _iPmsLogic.GetRoomStatus();
            }
            else
            {
                //mock data
            }
            return(response);
        }
示例#2
0
        public GetRoomStatusResponseDto GetRoomStatusById(int statusId)
        {
            var response = new GetRoomStatusResponseDto();

            if (statusId <= 0)
            {
                return(response);
            }
            var roomStatusResponseDto = GetRoomStatus();

            if (roomStatusResponseDto == null || roomStatusResponseDto.RoomStatuses == null || roomStatusResponseDto.RoomStatuses.Count <= 0)
            {
                return(response);
            }

            response.RoomStatuses = roomStatusResponseDto.RoomStatuses.Where(x => x.Id.Equals(statusId)).ToList();
            return(response);
        }