/// <summary> /// Creates a new student /// </summary> public void CreateStudent(NewStudentDTO newStudentDTO) { // create the studentDTO for persistence and populate its properties StudentDTO studentDTO = new StudentDTO() { StudentID = newStudentDTO.StudentID, Firstname = newStudentDTO.Firstname, Lastname = newStudentDTO.Lastname, Buildingname = newStudentDTO.Buildingname, Roomnumber = newStudentDTO.Roomnumber, }; _studentDAO.CreateStudent(studentDTO); }
public Boolean CreateStudent(ref StudentBDO studentBDO, ref string message) { Boolean ret = false; StudentBDO sBDO = GetStudent(studentBDO.StudentId); if (sBDO == null) { ret = studentDAO.CreateStudent(ref studentBDO, ref message); } else { message = "Username already exists. Please select another username"; } return(ret); }