Example #1
0
 private void SwitchBookingView(BookingViews type)
 {
     switch (type)
     {
         case BookingViews.Tee:
             {
                 SwitchToTeeBookingCommandExecuted();
                 break;
             }
         case BookingViews.Group:
             {
                 SwitchToGroupBookingCommandExecuted();
                 break;
             }
         case BookingViews.Event:
             {
                 SwitchToEventBookingCommandExecuted();
                 break;
             }
         case BookingViews.Competition:
             {
                 SwitchToCompetitionBookingCommandExecuted();
                 break;
             }
         case BookingViews.Match:
             {
                 SwitchToMatchBookingCommandExecuted();
                 break;
             }
     }
 }
Example #2
0
        private void SwitchBookingView(BookingViews type)
        {
            switch (type)
            {
            case BookingViews.Tee:
            {
                SwitchToTeeBookingCommandExecuted();
                break;
            }

            case BookingViews.Group:
            {
                SwitchToGroupBookingCommandExecuted();
                break;
            }

            case BookingViews.Event:
            {
                SwitchToEventBookingCommandExecuted();
                break;
            }

            case BookingViews.Competition:
            {
                SwitchToCompetitionBookingCommandExecuted();
                break;
            }

            case BookingViews.Match:
            {
                SwitchToMatchBookingCommandExecuted();
                break;
            }
            }
        }
Example #3
0
        public BookingView(BookingViews type, ModelBase model = null, bool IsDuplicate = false)
        {
            InitializeComponent();
            if (model != null)
                this.Header = "Edit Booking";
            DataContext = ViewModel = new BookingViewModel(type, model,IsDuplicate);

            Owner = Application.Current.MainWindow;
        }
Example #4
0
        public BookingView(BookingViews type, ModelBase model = null, bool IsDuplicate = false)
        {
            InitializeComponent();
            if (model != null)
            {
                this.Header = "Edit Booking";
            }
            DataContext = ViewModel = new BookingViewModel(type, model, IsDuplicate);

            Owner = Application.Current.MainWindow;
        }
Example #5
0
        public BookingViewModel(BookingViews type, ModelBase model, bool IsDuplicate)
        {
            _model = model;

            // TODO: Remove "() => false" when tab will be completed.
            SwitchToTeeBookingCommand         = new RelayCommand(SwitchToTeeBookingCommandExecuted, () => false);
            SwitchToGroupBookingCommand       = new RelayCommand(SwitchToGroupBookingCommandExecuted, () => false);
            SwitchToEventBookingCommand       = new RelayCommand(SwitchToEventBookingCommandExecuted);
            SwitchToCompetitionBookingCommand = new RelayCommand(SwitchToCompetitionBookingCommandExecuted, () => false);
            SwitchToMatchBookingCommand       = new RelayCommand(SwitchToMatchBookingCommandExecuted, () => false);
            if (IsDuplicate)
            {
                Content = new EventBookingView(_model as EventModel, IsDuplicate);
            }
            else
            {
                SwitchBookingView(type);
            }
        }
Example #6
0
        public BookingViewModel(BookingViews type, ModelBase model, bool IsDuplicate)
        {
            _model = model;

            // TODO: Remove "() => false" when tab will be completed.
            SwitchToTeeBookingCommand = new RelayCommand(SwitchToTeeBookingCommandExecuted, () => false);
            SwitchToGroupBookingCommand = new RelayCommand(SwitchToGroupBookingCommandExecuted, () => false);
            SwitchToEventBookingCommand = new RelayCommand(SwitchToEventBookingCommandExecuted);
            SwitchToCompetitionBookingCommand = new RelayCommand(SwitchToCompetitionBookingCommandExecuted, () => false);
            SwitchToMatchBookingCommand = new RelayCommand(SwitchToMatchBookingCommandExecuted, () => false);
            if (IsDuplicate)
            {
                Content = new EventBookingView(_model as EventModel, IsDuplicate);
            }
            else
            {
                SwitchBookingView(type);

            }
        }