示例#1
0
 public CoursesViewModel()
 {
     instance            = this;
     this.courseService  = new CourseService();
     this.RefreshCommand = new Command(async() => await GetCourses());
     this.RefreshCommand.Execute(null);
 }
        public CourseItemViewModel()
        {
            this.courseService = new CourseService();

            EditCourseCommand   = new Command(async() => await EditCourse());
            DeleteCourseCommand = new Command(async() => await DeleteCourse());
        }
示例#3
0
        public CreateCourseViewModel()
        {
            this.courseService = new CourseService();
            this.SaveCommand   = new Command(async() => await CreateCourse());

            this.IsRunning = false;
            this.IsEnabled = true;
        }
示例#4
0
        public EditCourseViewModel(CourseDTO course)
        {
            this.course = course;

            this.courseService = new CourseService();
            this.SaveCommand   = new Command(async() => await EditCourse());

            this.IsRunning = false;
            this.IsEnabled = true;
        }