C# Class TRManager.Admin

Show file Open project: UristMcMiner/SE-Projekt_RWB.csharp

Public Methods

Method Description
addClass ( int teacher_ID, String className ) : System.Boolean

Adds a class to the database.

addStudent ( String givenName, String surname, int class_ID ) : System.Boolean

Adds a student to the database.

addTeacher ( String givenName, String surname, String initials, String title ) : System.Boolean

Adds a teacher to the database.

changePassword ( String oldpassword, String newpassword, String confirmpassword ) : System.Boolean

Change Admin Password

deleteClass ( int class_ID ) : System.Boolean

Deletes a class.

deleteDB ( ) : System.Boolean

Deletes the Entries of the Student, Class and Incident Tables.

deleteStudent ( int student_ID ) : System.Boolean

Deletes a student.

deleteTeacher ( int teacher_ID ) : System.Boolean

Deletes a class.

setClassName ( int class_ID, String className ) : System.Boolean

Updates the className of the class.

setClassTeacher_ID ( int class_ID, int teacher_ID ) : System.Boolean

Updates the teacher identifier of the class.

setIncidentArrival ( int incident_ID, String arrival ) : System.Boolean

Updates the arrival time of the incident.

setIncidentLeaveTime ( int incident_ID, String leaveTime ) : System.Boolean

Updates the leave time of the incident.

setIncidentStudent_ID ( int incident_ID, int student_ID ) : System.Boolean

Updates the student identifier of the incident.

setIncidentTeacher_ID ( int incident_ID, int teacher_ID ) : System.Boolean

Updates the teacher identifier of the incident.

setIncidentTicket_ID ( int incident_ID, String ticket_ID ) : System.Boolean

Updates the ticket identifier of the incident.

setStudentClass_ID ( int student_ID, int class_ID ) : System.Boolean

Updates the class identifier of the student.

setStudentGivenName ( int student_ID, String givenName ) : System.Boolean

Updates the givenName of the student.

setTeacherGivenName ( int teacher_ID, String givenName ) : System.Boolean

Updates the givenName of the teacher.

setTeacherInitials ( int teacher_ID, String initials ) : System.Boolean

Updates the initials of the teacher.

setTeacherSurname ( int teacher_ID, String surname ) : System.Boolean

Updates the surname of the teacher.

setTeacherTitle ( int teacher_ID, String title ) : System.Boolean

Updates the title of the teacher.

updateClass ( int class_ID, int teacher_ID, String className ) : System.Boolean

Updates the Class.

updateStudent ( int student_ID, String givenName, String surname, int class_ID ) : System.Boolean

Updates student.

updateTeacher ( int teacher_ID, String givenName, String surname, String initials, String title ) : System.Boolean

Updates the teacher.

Private Methods

Method Description
closeconnection ( ) : void

Closes the connection to the database.

openconnection ( ) : void

Opens the connection to the database.

Method Details

addClass() public static method

Adds a class to the database.
public static addClass ( int teacher_ID, String className ) : System.Boolean
teacher_ID int The teacher identifier.
className String The name of the class.
return System.Boolean

addStudent() public static method

Adds a student to the database.
public static addStudent ( String givenName, String surname, int class_ID ) : System.Boolean
givenName String The givenName of the student.
surname String The surname of the student.
class_ID int The class identifier.
return System.Boolean

addTeacher() public static method

Adds a teacher to the database.
public static addTeacher ( String givenName, String surname, String initials, String title ) : System.Boolean
givenName String The givenName.
surname String The surname.
initials String The initials.
title String The title.
return System.Boolean

changePassword() public static method

Change Admin Password
public static changePassword ( String oldpassword, String newpassword, String confirmpassword ) : System.Boolean
oldpassword String The old Password
newpassword String The new Password
confirmpassword String The confirmation of the new Password
return System.Boolean

deleteClass() public static method

Deletes a class.
public static deleteClass ( int class_ID ) : System.Boolean
class_ID int The class identifier.
return System.Boolean

deleteDB() public static method

Deletes the Entries of the Student, Class and Incident Tables.
public static deleteDB ( ) : System.Boolean
return System.Boolean

deleteStudent() public static method

Deletes a student.
public static deleteStudent ( int student_ID ) : System.Boolean
student_ID int The class identifier.
return System.Boolean

deleteTeacher() public static method

Deletes a class.
public static deleteTeacher ( int teacher_ID ) : System.Boolean
teacher_ID int
return System.Boolean

setClassName() public static method

Updates the className of the class.
public static setClassName ( int class_ID, String className ) : System.Boolean
class_ID int The class identifier.
className String The new name of the class.
return System.Boolean

setClassTeacher_ID() public static method

Updates the teacher identifier of the class.
public static setClassTeacher_ID ( int class_ID, int teacher_ID ) : System.Boolean
class_ID int The class identifier.
teacher_ID int The new teacher identifier.
return System.Boolean

setIncidentArrival() public static method

Updates the arrival time of the incident.
public static setIncidentArrival ( int incident_ID, String arrival ) : System.Boolean
incident_ID int The incident identifier.
arrival String The new arrival time.
return System.Boolean

setIncidentLeaveTime() public static method

Updates the leave time of the incident.
public static setIncidentLeaveTime ( int incident_ID, String leaveTime ) : System.Boolean
incident_ID int The incident identifier.
leaveTime String The new leave time.
return System.Boolean

setIncidentStudent_ID() public static method

Updates the student identifier of the incident.
public static setIncidentStudent_ID ( int incident_ID, int student_ID ) : System.Boolean
incident_ID int The incident identifier.
student_ID int The student identifier.
return System.Boolean

setIncidentTeacher_ID() public static method

Updates the teacher identifier of the incident.
public static setIncidentTeacher_ID ( int incident_ID, int teacher_ID ) : System.Boolean
incident_ID int The incident identifier.
teacher_ID int The teacher identifier.
return System.Boolean

setIncidentTicket_ID() public static method

Updates the ticket identifier of the incident.
public static setIncidentTicket_ID ( int incident_ID, String ticket_ID ) : System.Boolean
incident_ID int The incident identifier.
ticket_ID String The new ticket identifier.
return System.Boolean

setStudentClass_ID() public static method

Updates the class identifier of the student.
public static setStudentClass_ID ( int student_ID, int class_ID ) : System.Boolean
student_ID int The student identifier.
class_ID int The class identifier.
return System.Boolean

setStudentGivenName() public static method

Updates the givenName of the student.
public static setStudentGivenName ( int student_ID, String givenName ) : System.Boolean
student_ID int The student identifier.
givenName String The new givenName.
return System.Boolean

setTeacherGivenName() public static method

Updates the givenName of the teacher.
public static setTeacherGivenName ( int teacher_ID, String givenName ) : System.Boolean
teacher_ID int The teacher identifier.
givenName String The new givenName.
return System.Boolean

setTeacherInitials() public static method

Updates the initials of the teacher.
public static setTeacherInitials ( int teacher_ID, String initials ) : System.Boolean
teacher_ID int The teacher identifier.
initials String The new initials.
return System.Boolean

setTeacherSurname() public static method

Updates the surname of the teacher.
public static setTeacherSurname ( int teacher_ID, String surname ) : System.Boolean
teacher_ID int The teacher identifier.
surname String The new surname.
return System.Boolean

setTeacherTitle() public static method

Updates the title of the teacher.
public static setTeacherTitle ( int teacher_ID, String title ) : System.Boolean
teacher_ID int The teacher identifier.
title String The new title.
return System.Boolean

updateClass() public static method

Updates the Class.
public static updateClass ( int class_ID, int teacher_ID, String className ) : System.Boolean
class_ID int The class identifier.
teacher_ID int The new teacher identifier.
className String The new className.
return System.Boolean

updateStudent() public static method

Updates student.
public static updateStudent ( int student_ID, String givenName, String surname, int class_ID ) : System.Boolean
student_ID int The student identifier.
givenName String The new givenName.
surname String The new surname.
class_ID int The class identifier.
return System.Boolean

updateTeacher() public static method

Updates the teacher.
public static updateTeacher ( int teacher_ID, String givenName, String surname, String initials, String title ) : System.Boolean
teacher_ID int The teacher identifier.
givenName String The new givenName. /// The new Surname.
surname String
initials String The new initials.
title String The new title.
return System.Boolean