public ActionResult ChoseExerciseLevel(ExcerciseViewModel vm) { string userId = User.Identity.GetUserId(); vm.NextExcerciseNumber = _studentManager.GetNextExcerciseNumber(vm.ExcerciseNumber, vm.Answer, userId); return(View(vm)); }
public ExerciseDiari() { InitializeComponent(); BindingContext = vm = ViewModelLocator.ExcerciseViewModel; listView.ItemsSource = vm.exercises; //DataTask d = new DataTask(); //listView.ItemsSource = d.ObservableTaskDiari; }
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)); }