public StudentRegisterViewModel() { try { database = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Users = new ObservableCollection <User>(); //RegisterCommand = new YZYCommand(this.OnAdd, this.CanAdd); RegisterCommand = new YZYCommand(this.OnAdd); }
public ProfileViewModel() { Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } LoadUser(); UpdateCommand = new YZYCommand(this.OnUpdate, this.CanUpdate); }
public TeacherViewModel() { Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Courses = new ObservableCollection <Course>(); LoadCourse(); UpdateCommand = new YZYCommand(this.OnUpdate, this.CanUpdate); //UpdateGradeCommand = new YZYCommand(this.OnUpdateGrade, this.CanUpdateGrade); }
public TeacherDialogViewModel(int selectedCourseID) { _selectedCourseID = selectedCourseID; Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Registers = new ObservableCollection <Register>(); LoadRegistrations(); UpdateGradeCommand = new YZYCommand(this.OnUpdateGrade, this.CanUpdateGrade); }
public StudentSearchCoursViewModel() { Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Courses = new ObservableCollection <Course>(); Categories = new List <Category>(); CategoryStrings = new List <string>(); LoadCourse(); SearchCommand = new YZYCommand(this.OnSearch); }
//public YZYCommand RegisterCommand { get; set; } public SearchAccountViewModel() { Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Users = new ObservableCollection <User>(); LoadCourse(); DeleteCommand = new YZYCommand(this.OnDelete, this.CanExecute); UpdateCommand = new YZYCommand(this.OnUpdate, this.CanExecute); AddCommand = new YZYCommand(this.OnAdd, this.CanAdd); //RegisterCommand = new YZYCommand(this.OnRegister, this.CanRegister); }
public SearchCourseViewModel() { Log.setLogOnFile(); try { ctx = new YZYDbContextAzure(); } catch (SystemException ex) { Log.WriteLine(ex.Message); Environment.Exit(1); } Courses = new ObservableCollection <Course>(); Categories = new List <Category>(); CategoryStrings = new List <string>(); LoadCourse(); DeleteCommand = new YZYCommand(this.OnDelete, this.CanDelete); UpdateCommand = new YZYCommand(this.OnUpdate, this.CanExecute); AddCommand = new YZYCommand(this.OnAdd, this.CanExecute); }