示例#1
0
 public DiscountEntity(Discount discount)
 {
     _pcs      = new PropertyChangeSupport(this);
     _discount = discount;
     if (discount != null)
     {
         _validityEntity = new DateRangeEntity(discount.Validity);
     }
 }
示例#2
0
 public DiscountEntity(Discount discount)
 {
     _pcs = new PropertyChangeSupport(this);
     _discount = discount;
     if (discount != null)
     {
         _validityEntity = new DateRangeEntity(discount.Validity);
     }
 }
示例#3
0
 public BookingEntity(Booking booking)
 {
     _pcs           = new PropertyChangeSupport(this);
     _booking       = booking;
     _clientEntity  = new ClientEntity(_booking.Client);
     _paymentEntity = new PaymentEntity(booking);
     _datesEntity   = new DateRangeEntity(_booking.Dates);
     _discountedOptionChoiceEntity = new OptionChoiceEntity(_booking, _booking.DiscountedOptionChoice);
     _optionDiscountEntity         = new DiscountEntity(_booking.OptionDiscount);
 }
示例#4
0
 public BookingEntity(Booking booking)
 {
     _pcs = new PropertyChangeSupport(this);
     _booking = booking;
     _clientEntity = new ClientEntity(_booking.Client);
     _paymentEntity = new PaymentEntity(booking);
     _datesEntity = new DateRangeEntity(_booking.Dates);
     _discountedOptionChoiceEntity = new OptionChoiceEntity(_booking, _booking.DiscountedOptionChoice);
     _optionDiscountEntity = new DiscountEntity(_booking.OptionDiscount);
 }
        public BookingParametersViewModel(Booking booking)
        {
            _pcs = new PropertyChangeSupport(this);

            _booking = booking;
            _booking.Dates.Start = booking.Dates.Start.Date;
            _booking.Dates.End = booking.Dates.End.Date;
            _dateRange = new DateRangeEntity(booking.Dates);
            _adultsCount = booking.AdultsCount;
            _babiesCount = booking.BabiesCount;
            _validateCommand = new DelegateCommand<object>(_validate);

            if(_adultsCount == 0 && booking.Id == 0)
            {
                AdultsCount = 1;
            }
        }