Пример #1
0
        public ActionResult ChoseExerciseLevel(ExcerciseViewModel vm)
        {
            string userId = User.Identity.GetUserId();

            vm.NextExcerciseNumber = _studentManager.GetNextExcerciseNumber(vm.ExcerciseNumber, vm.Answer, userId);
            return(View(vm));
        }
Пример #2
0
 public ExerciseDiari()
 {
     InitializeComponent();
     BindingContext       = vm = ViewModelLocator.ExcerciseViewModel;
     listView.ItemsSource = vm.exercises;
     //DataTask d = new DataTask();
     //listView.ItemsSource = d.ObservableTaskDiari;
 }
Пример #3
0
        public ActionResult ChoseExerciseLevel(int?exerc)
        {
            string userId   = User.Identity.GetUserId();
            int    exercise = 0;

            if (exerc != null)
            {
                exercise = (int)exerc;
            }

            var ex      = _studentManager.GetNextExcerciseNumber(exercise, true, userId);
            var subject = _studentManager.GetActualSubject(userId);

            var vm = new ExcerciseViewModel()
            {
                ExcerciseNumber     = exercise,
                Answer              = true,
                NextExcerciseNumber = ex,
                SubjectName         = subject.Name,
            };

            return(View(vm));
        }