private void AddStudent() { Student student = new Student(); context.Insert(student); CurrentStudent = new StudentViewModel(student, context); Students.Add(CurrentStudent); }
public StudentViewModel(Student student, StudentContext context) { if(student == null) { throw new ArgumentNullException("student"); } if(context == null) { throw new ArgumentNullException("context"); } this.Context = context; this.student = student; }
public void UpdateModel(Student model) { student = model; OnPropertyChanged("SocialSecurityNumber"); OnPropertyChanged("FirstName"); OnPropertyChanged("MiddleInitial"); OnPropertyChanged("LastName"); OnPropertyChanged("StreetAddress"); OnPropertyChanged("City"); OnPropertyChanged("State"); OnPropertyChanged("Zip"); OnPropertyChanged("Email"); OnPropertyChanged("PhoneNumber"); OnPropertyChanged("GPA"); OnPropertyChanged("SAT"); }