Example #1
0
        public void DeleteTraining(ITrainerView trainerForm, int trainingId, string teamName, string trainingTime)
        {
            var form = _formsFactory.DeleteTrainingView(teamName, trainingTime);

            if (_trainerController.DeleteTraining(form, _trainingRepository, _teamRepository, _trainingRepository.GetTrainingById(trainingId)))
            {
                trainerForm.DisplayTrainingList(_trainingRepository.GetAll(), _teamRepository.GetAll());
            }
        }
Example #2
0
        public void CreateTrainingView(ITrainerView parentForm, Trainer trainer)
        {
            var form = _formsFactory.CreateTrainingView();

            form.LoadData(trainer, _teamRepository.GetAll());
            if (_trainerController.ShowCreateTraining(form, trainer, _trainingRepository, _teamRepository))
            {
                parentForm.DisplayTrainingList(_trainingRepository.GetAll(), _teamRepository.GetAll());
            }
            else
            {
                parentForm.AlertFailedCreateTraining();
            }
        }