C# Class TRManager.UtilityDB

Afficher le fichier Open project: UristMcMiner/SE-Projekt_RWB.csharp

Méthodes publiques

Méthode Description
addFullIncident ( int ticket_ID, int student_ID, int teacher_ID, System.DateTime arrival, String comment, System.DateTime leave ) : System.Boolean

Adds an Complete incident to the database.

addIncident ( int ticket_ID, int student_ID, int teacher_ID, System.DateTime arrival, String comment ) : System.Boolean

Adds an incident to the database.

getAllIncidents ( ) : List
getClass ( String className ) : Class

Gets a class object by ClassName.

getClass ( int class_ID ) : Class

Gets a class object by Class_ID.

getClassTable ( ) : List

Gets the class table for export.

getClassTeacher ( String className ) : Teacher

Gets a teacher object by className.

getClasses ( ) : List

Gets a list of all classes.

getCommentTable ( ) : List
getExportData ( ) : List

Gets all incidents combined with related data for export.

getIncident ( int incident_ID ) : Incident

Gets an incident object by Incident_ID.

getIncidentTable ( ) : List

Gets the incident table for export.

getMaxTicket_ID ( ) : String

Gets the maximum ticket_ identifier.

getOpenIncidents ( ) : List

Gets a list of the open incidents.

getOpenIncidents ( List StudentIDs, List TeacherIDs, int TicketID ) : List
getReturnerTicketID ( int StudentID ) : int

Gets the teacher table for export.

getStudent ( int student_ID ) : Student

Gets a student object.

getStudent ( string givenName, string surname ) : Student

Gets a student object by givenName and surname of the student.

getStudentFilter ( string name ) : List
getStudentIncidents ( int student_ID ) : List
getStudentTable ( ) : List

Gets the student table for export.

getStudents ( int class_ID ) : List

Gets the students of a class by Class_ID.

getStudents ( string className ) : List

Gets a list of student objects by the name of the class.

getTeacher ( String initials ) : Teacher

Gets a teacher objectby the initials.

getTeacher ( String givenName, String surname ) : Teacher

Gets a teacher objectby the full name.

getTeacher ( int teacher_ID ) : Teacher

Gets a teacher object by Teacher_ID.

getTeacherFilter ( String filter ) : List
getTeacherTable ( ) : List
incidentIsOpen ( int inc_id ) : System.Boolean
setAdminPassword ( String pass ) : System.Boolean

Set Admin-Password in DB

setLeaveTime ( Incident i ) : System.Boolean

Sets the leave time of an incident to the current time.

validateAdmin ( String pass ) : System.Boolean

Validate Admin-Password

Private Methods

Méthode Description
closeconnection ( ) : void

Closes the connection to the database.

openconnection ( ) : void

Opens the connection to the database.

Method Details

addFullIncident() public static méthode

Adds an Complete incident to the database.
public static addFullIncident ( int ticket_ID, int student_ID, int teacher_ID, System.DateTime arrival, String comment, System.DateTime leave ) : System.Boolean
ticket_ID int The ticket identifier.
student_ID int The student identifier.
teacher_ID int The teacher identifier.
arrival System.DateTime The arrival time.
comment String The comment.
leave System.DateTime
Résultat System.Boolean

addIncident() public static méthode

Adds an incident to the database.
public static addIncident ( int ticket_ID, int student_ID, int teacher_ID, System.DateTime arrival, String comment ) : System.Boolean
ticket_ID int The ticket identifier.
student_ID int The student identifier.
teacher_ID int The teacher identifier.
arrival System.DateTime The arrival time.
comment String The comment.
Résultat System.Boolean

getAllIncidents() public static méthode

public static getAllIncidents ( ) : List
Résultat List

getClass() public static méthode

Gets a class object by ClassName.
public static getClass ( String className ) : Class
className String The Name of the class.
Résultat Class

getClass() public static méthode

Gets a class object by Class_ID.
public static getClass ( int class_ID ) : Class
class_ID int
Résultat Class

getClassTable() public static méthode

Gets the class table for export.
public static getClassTable ( ) : List
Résultat List

getClassTeacher() public static méthode

Gets a teacher object by className.
public static getClassTeacher ( String className ) : Teacher
className String The name of the class.
Résultat Teacher

getClasses() public static méthode

Gets a list of all classes.
public static getClasses ( ) : List
Résultat List

getCommentTable() public static méthode

public static getCommentTable ( ) : List
Résultat List

getExportData() public static méthode

Gets all incidents combined with related data for export.
public static getExportData ( ) : List
Résultat List

getIncident() public static méthode

Gets an incident object by Incident_ID.
public static getIncident ( int incident_ID ) : Incident
incident_ID int The incident identifier.
Résultat Incident

getIncidentTable() public static méthode

Gets the incident table for export.
public static getIncidentTable ( ) : List
Résultat List

getMaxTicket_ID() public static méthode

Gets the maximum ticket_ identifier.
public static getMaxTicket_ID ( ) : String
Résultat String

getOpenIncidents() public static méthode

Gets a list of the open incidents.
public static getOpenIncidents ( ) : List
Résultat List

getOpenIncidents() public static méthode

public static getOpenIncidents ( List StudentIDs, List TeacherIDs, int TicketID ) : List
StudentIDs List
TeacherIDs List
TicketID int
Résultat List

getReturnerTicketID() public static méthode

Gets the teacher table for export.
public static getReturnerTicketID ( int StudentID ) : int
StudentID int
Résultat int

getStudent() public static méthode

Gets a student object.
public static getStudent ( int student_ID ) : Student
student_ID int The identifier of the student.
Résultat Student

getStudent() public static méthode

Gets a student object by givenName and surname of the student.
public static getStudent ( string givenName, string surname ) : Student
givenName string The given name of the student.
surname string The surname of the student.
Résultat Student

getStudentFilter() public static méthode

public static getStudentFilter ( string name ) : List
name string
Résultat List

getStudentIncidents() public static méthode

public static getStudentIncidents ( int student_ID ) : List
student_ID int The student identifier.
Résultat List

getStudentTable() public static méthode

Gets the student table for export.
public static getStudentTable ( ) : List
Résultat List

getStudents() public static méthode

Gets the students of a class by Class_ID.
public static getStudents ( int class_ID ) : List
class_ID int The class identifier.
Résultat List

getStudents() public static méthode

Gets a list of student objects by the name of the class.
public static getStudents ( string className ) : List
className string Name of the class.
Résultat List

getTeacher() public static méthode

Gets a teacher objectby the initials.
public static getTeacher ( String initials ) : Teacher
initials String The Initials of the teacher.
Résultat Teacher

getTeacher() public static méthode

Gets a teacher objectby the full name.
public static getTeacher ( String givenName, String surname ) : Teacher
givenName String The given Name of the teacher.
surname String The Surname of the teacher.
Résultat Teacher

getTeacher() public static méthode

Gets a teacher object by Teacher_ID.
public static getTeacher ( int teacher_ID ) : Teacher
teacher_ID int The identifier of the teacher.
Résultat Teacher

getTeacherFilter() public static méthode

public static getTeacherFilter ( String filter ) : List
filter String
Résultat List

getTeacherTable() public static méthode

public static getTeacherTable ( ) : List
Résultat List

incidentIsOpen() public static méthode

public static incidentIsOpen ( int inc_id ) : System.Boolean
inc_id int
Résultat System.Boolean

setAdminPassword() public static méthode

Set Admin-Password in DB
public static setAdminPassword ( String pass ) : System.Boolean
pass String The new Password
Résultat System.Boolean

setLeaveTime() public static méthode

Sets the leave time of an incident to the current time.
public static setLeaveTime ( Incident i ) : System.Boolean
i Incident The incident which leave time should be set.
Résultat System.Boolean

validateAdmin() public static méthode

Validate Admin-Password
public static validateAdmin ( String pass ) : System.Boolean
pass String The Password
Résultat System.Boolean