public Request(DateTime beginTime, int durationMin, RoomType roomType, RentPriceRangeType rentPriceRange, CapacityRangeType capacityRange, MultimediaType multimediaType,
                int roomTypePriority = 1, int rentPriceRangePriority = 1, int capacityRangePriority = 1, int multimediaTypePriority = 1)
 {
     this.Occupation             = new Timeslot(beginTime, durationMin);
     this.RoomTypeProp           = roomType;
     this.RentPriceRangeTypeProp = rentPriceRange;
     this.CapacityRange          = capacityRange;
     this.MultimediaTypeProp     = multimediaType;
     this.RoomTypePriority       = roomTypePriority;
     this.RentPriceRangePriority = rentPriceRangePriority;
     this.CapacityRangePriority  = capacityRangePriority;
     this.MultimediaTypePriority = multimediaTypePriority;
 }
Beispiel #2
0
        public Room(string csvStr)
        {
            string[] temp = csvStr.Split(new[] { '[', ']' });
            csvStr = temp[0] + temp[2].Remove(0, 1).Trim(); //first ","
            string[]           RoomData            = csvStr.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            RoomType           eRoomType           = ClassGeneral.GetEnumByName <RoomType>(RoomData[2]);
            CapacityRangeType  eCapacityRange      = ClassGeneral.GetEnumByName <CapacityRangeType>(RoomData[3]);
            RentPriceRangeType eRentPriceRangeType = ClassGeneral.GetEnumByName <RentPriceRangeType>(RoomData[4]);

            RoomInit(int.Parse(RoomData[0]),
                     int.Parse(RoomData[1]),
                     MultimediaDevice.createListMMD(temp[1]),
                     eRoomType, eCapacityRange, eRentPriceRangeType,
                     decimal.Parse(RoomData[5]), new Location(), RoomData[7]);
        }
Beispiel #3
0
 private void RoomInit(int capacity, int floor, List <MultimediaDevice> listMultimedia,
                       RoomType roomType, CapacityRangeType capacityRange, RentPriceRangeType RentPriceRangeType,
                       decimal rentPricePerHour, Location location, string picturePath = "")
 {
     this.Capacity               = capacity;
     this.Floor                  = floor;
     this.ListMultimedia         = listMultimedia;
     this.RoomTypeProp           = roomType;
     this.CapacityRange          = capacityRange;
     this.RentPriceRangeTypeProp = RentPriceRangeType;
     this.RentPricePerHour       = rentPricePerHour;
     this.Location               = location;
     this.PicturePath            = picturePath;
     this.RoomID                 = roomIdGenerator++;
 }
 public Request(
     DateTime beginTime, int durationMin,
     int capacity,
     CapacityRangeType capacityRange,
     int floor,
     List <MultimediaDevice> listMultimedia,
     Location location,
     decimal RentPricePerHour,
     RentPriceRangeType rentPriceRange,
     RoomType roomType)
 {
     //Room modelDesiredRoom = new Room(roomType, capacity, listMultimedia, rentPriceRange, location);
     this.Occupation             = new Timeslot(beginTime, durationMin);
     this.Capacity               = capacity;
     this.CapacityRange          = capacityRange;
     this.Floor                  = floor;
     this.ListMultimedia         = listMultimedia;
     this.Location               = location;
     this.RentPricePerHour       = rentPricePerHour;
     this.RentPriceRangeTypeProp = rentPriceRange;
     this.RoomTypeProp           = roomType;
 }
Beispiel #5
0
 public Room(int capacity, int floor, List <MultimediaDevice> listMultimedia,
             RoomType roomType, CapacityRangeType capacityRnage, RentPriceRangeType rentPriceRange,
             decimal rentPricePerHour, Location location)
 {
     RoomInit(capacity, floor, listMultimedia, roomType, capacityRange, rentPriceRange, rentPricePerHour, location);
 }