Ejemplo n.º 1
0
 public Reservation(Customer owner, IAccomodation accomodation, ReservationPeriod reservationPeriod, string numberOfPersons, Option bestOption)
 {
     Owner             = owner;
     Hotel             = accomodation;
     ReservationPeriod = reservationPeriod;
     NumberOfPersons   = numberOfPersons;
     BestOption        = bestOption;
 }
 public AccomodationBooksRoomsViewModel()
 {
     _accomodationList                 = DataManagementService.Instance.MainRepository.AccomodationRepository.AccomodationList;
     _reservationRepository            = DataManagementService.Instance.MainRepository.ReservationRepository;
     _searchAccomodationList           = new ObservableCollection <IAccomodation>();
     _accomodation                     = new Hotel();
     _searchAccomodationCommand        = new SearchAccomodationCommand(this);
     _roomsListForSelectedAccomodation = new ObservableCollection <IRoom>();
     _accomodationReservation          = new AccomodationReservation();
     _selectedRoom                     = new Room();
     _accomodationBooksRoomCommand     = new AccomodationBooksRoomCommand(this);
 }
        public AccomodationManagementViewModel()
        {
            _accomodationRepository = DataManagementService.Instance.MainRepository.AccomodationRepository;
            _locationRepository     = DataManagementService.Instance.MainRepository.LocationRepository;

            _accomodationFactory  = new AccomodationFactory();
            _accomodation         = _accomodationFactory.BuildAccomodation(_acomodationType);
            _selectedAccomodation = _accomodationFactory.BuildAccomodation(_acomodationType);

            _roomFactory  = new RoomFactory();
            _room         = _roomFactory.BuildRoom(_roomType);
            _selectedRoom = _roomFactory.BuildRoom(_roomType);

            _addAccomodationCommand    = new AddAccomodationCommand(this);
            _deleteAccomodationCommand = new DeleteAccomodationCommand(this);
            _editAccomodationCommand   = new EditAccomodationCommand(this);
            _saveAccomodationCommand   = new SaveAccomodationCommand(this);
            _addRoomCommand            = new AddRoomCommand(this);
            _editRoomCommand           = new EditRoomCommand(this);
            _saveRoomCommand           = new SaveRoomCommand(this);
        }
Ejemplo n.º 4
0
 public void Delete(IAccomodation selectedHotel)
 {
     _accomodationList.Remove(selectedHotel);
 }
Ejemplo n.º 5
0
 public void Add(IAccomodation newHotel)
 {
     _accomodationList.Add(newHotel);
 }
Ejemplo n.º 6
0
 public Option()
 {
     _accomodation = new Hotel();
     _roomList     = new ObservableCollection <IRoom>();
     _totalPrice   = new Price();
 }
Ejemplo n.º 7
0
 public Option(IAccomodation accomodation, ObservableCollection <IRoom> roomList)
 {
     this._accomodation = accomodation;
     this._roomList     = roomList;
     _totalPrice        = new Price();
 }
 public AccomodationReservation(IAccomodation accomodation, ReservationPeriod reservationPeriod, IRoom room)
 {
     _accomodation      = accomodation;
     _reservationPeriod = reservationPeriod;
     _room = room;
 }