Exemple #1
0
 // Конструктор
 public SingleVisit(TypeWorkout typeTr, SpaService spa, Pay payStatus, TimeForTr time)
     : base(payStatus, time, typeTr, spa)
 {
     _numAerobicTr  = 0;
     _numPersonalTr = 0;
     DaysLeft       = 1;
     EndDate        = DateTime.Now.Date;
 }
Exemple #2
0
 protected AbonementBasic()
 {
     this.PayStatus    = Pay.Не_Оплачено;
     TimeTraining      = TimeForTr.Весь_День;
     TypeWorkout       = TypeWorkout.Тренажерный_Зал;
     this.Spa          = SpaService.Спа;
     IsActivated       = false;
     BuyActivationDate = DateTime.Now.Date;
     BuyDate           = DateTime.Now.Date;
 }
Exemple #3
0
 // КОНСТРУКТОР
 protected AbonementBasic(Pay payStatus, TimeForTr time, TypeWorkout tr, SpaService spa)
 {
     this.PayStatus    = payStatus;
     TimeTraining      = time;
     TypeWorkout       = tr;
     this.Spa          = spa;
     IsActivated       = false;
     BuyActivationDate = DateTime.Now.Date;
     BuyDate           = DateTime.Now.Date;
 }
Exemple #4
0
 // Конструктор
 public AbonementByDays(Pay payStatus, TimeForTr time, TypeWorkout typeTr, SpaService spa, DaysInAbon numDays)
     : base(payStatus, time, typeTr, spa)
 {
     DaysLeft        = (int)numDays;
     _typeAbonement  = numDays;
     NumAerobicTr    = 0;
     NumPersonalTr   = 0;
     _validityPeriod = (typeTr == TypeWorkout.Персональная || typeTr == TypeWorkout.МиниГруппа)
      ? Options.ValidPeriod12Month: Options.ValidPeriodInMonth;
     // 12 месяцев - длительность абонемента с персональными тренировками
     EndDate = CalculateEndDate(DateTime.Now, _validityPeriod);
 }
 public OptimalDrivingStrategy()
 {
     _vehicleState         = new States();
     _vehicleStates        = new ObservableCollection <States>();
     _solarModel           = new SpaData();
     _solarModelCollection = new ObservableCollection <SpaData>();
     _solarModelService    = new SpaService();
     _sampleStats          = new SampleStats();
     _combinedTrack        = new ObservableCollection <RouteSegmentVector>();
     _finishTime           = DateTime.Now.ToLocalTime();
     _velocityReference    = 19.0;
     _brightnessFactor     = 0.8;
     _numberOfLoops        = 0;
 }
Exemple #6
0
        // Конструктор
        public ClubCardA(Pay payStatus, TimeForTr time, TypeWorkout typeTr, SpaService spa,
                         PeriodClubCard periodInMonths)
            : base(payStatus, time, typeTr, spa)
        {
            _numberMonths = (int)periodInMonths;
            _numAerobicTr = _numberMonths * 10;
            NumPersonalTr = 0;
            NumMiniGroup  = 0;
            _periodAbonem = periodInMonths;

            Freeze = new FreezeClass(periodInMonths);

            EndDateChanged += CalculateDaysLeft;
            EndDate         = DateTime.Now.AddMonths(_numberMonths).Date;
        }
        private void SetInitialValues()
        {
            if (_person.AbonementCurent == null)
            {
                _selectedAbonementName        = "Абонемент";// Вид Абонемента по Умолчанию
                radioButton_Abonement.Checked = true;
                _typeWorkout    = TypeWorkout.Тренажерный_Зал;
                _timeTren       = TimeForTr.Весь_День;
                _spa            = SpaService.Спа;
                _pay            = Pay.Оплачено;
                _daysInAbon     = DaysInAbon.На_12_посещений;
                _periodClubCard = PeriodClubCard.На_1_Месяц;
            }
            else // Абонемент Существует
            {
                _selectedAbonementName = _person.AbonementCurent.AbonementName;
                _typeWorkout           = _person.AbonementCurent.TypeWorkout;
                _timeTren = _person.AbonementCurent.TimeTraining;
                _spa      = _person.AbonementCurent.Spa;
                _pay      = _person.AbonementCurent.PayStatus;
                switch (_person.AbonementCurent)
                {
                case AbonementByDays days:
                    _daysInAbon = days.GetTypeAbonementByDays();
                    radioButton_Abonement.Checked = true;
                    break;

                case ClubCardA abonement:
                    _periodClubCard = abonement.GetTypeClubCard();
                    radioButton_ClubCard.Checked = true;
                    break;

                case SingleVisit _:
                    radioButton_Single.Checked = true;
                    break;
                }
            }
        }
        private void ComboBox_spa_SelectedIndexChanged(object sender, EventArgs e)
        {
            var combo = (ComboBox)sender;

            _spa = MyComboBox.GetComboBoxValue <SpaService>(combo);
        }