internal static Student NewStudent(string firstName, string familyName, string streetAddress, string townAddress, string countryAddress) { var student = new Student { _firstName = firstName, _familyName = familyName, _streetAddress = streetAddress, _townAddress = townAddress, _countryAddress = countryAddress }; return student; }
private int GetNewCurrentStudent(Student student) { var nextId = -1; if (_model.Students.Count > 1) { var studentInfo = StudentInfo.GetStudentById(student.StudentId); var currentIndex = _model.Students.IndexOf(studentInfo); if (currentIndex < _model.Students.Count - 1) nextId = _model.Students[currentIndex + 1].StudentId; else nextId = _model.Students[currentIndex - 1].StudentId; } return nextId; }
public static Student AddNewStudent() { var student = new Student(); student.IsDirty = true; Students.Add(student); StudentInfo.AddNewStudentInfo(student.StudentId, string.Empty); return student; }