예제 #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));
        }