//StudentModel constructor
 public StudentModel(string studentID, string studentFirstName, string studentLastName, string studentEmail)
 {
     StudentID        = studentID;
     StudentFirstName = ClassLibrary.FormatName(studentFirstName);
     StudentLastName  = ClassLibrary.FormatName(studentLastName);
     StudentEmail     = $"{studentEmail}@hillsroad.ac.uk";
     StudentPassword  = ClassLibrary.GenerateRandomPassword(10);
 }
Ejemplo n.º 2
0
 //Constructor used to build a new StaffModel
 public StaffModel(string staffFirstName, string staffLastName, string staffEmail)
 {
     //StaffID is handled by the database
     StaffFirstName = ClassLibrary.FormatName(staffFirstName);
     StaffLastName  = ClassLibrary.FormatName(staffLastName);
     StaffEmail     = staffEmail;
     StaffPassword  = ClassLibrary.GenerateRandomPassword(10);
 }