C# Class TRManager.UtilityDB

Datei anzeigen Open project: UristMcMiner/SE-Projekt_RWB.csharp

Public Methods

Method 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

Method Description
closeconnection ( ) : void

Closes the connection to the database.

openconnection ( ) : void

Opens the connection to the database.

Method Details

addFullIncident() public static method

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
return System.Boolean

addIncident() public static method

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.
return System.Boolean

getAllIncidents() public static method

public static getAllIncidents ( ) : List
return List

getClass() public static method

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

getClass() public static method

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

getClassTable() public static method

Gets the class table for export.
public static getClassTable ( ) : List
return List

getClassTeacher() public static method

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

getClasses() public static method

Gets a list of all classes.
public static getClasses ( ) : List
return List

getCommentTable() public static method

public static getCommentTable ( ) : List
return List

getExportData() public static method

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

getIncident() public static method

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

getIncidentTable() public static method

Gets the incident table for export.
public static getIncidentTable ( ) : List
return List

getMaxTicket_ID() public static method

Gets the maximum ticket_ identifier.
public static getMaxTicket_ID ( ) : String
return String

getOpenIncidents() public static method

Gets a list of the open incidents.
public static getOpenIncidents ( ) : List
return List

getOpenIncidents() public static method

public static getOpenIncidents ( List StudentIDs, List TeacherIDs, int TicketID ) : List
StudentIDs List
TeacherIDs List
TicketID int
return List

getReturnerTicketID() public static method

Gets the teacher table for export.
public static getReturnerTicketID ( int StudentID ) : int
StudentID int
return int

getStudent() public static method

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

getStudent() public static method

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.
return Student

getStudentFilter() public static method

public static getStudentFilter ( string name ) : List
name string
return List

getStudentIncidents() public static method

public static getStudentIncidents ( int student_ID ) : List
student_ID int The student identifier.
return List

getStudentTable() public static method

Gets the student table for export.
public static getStudentTable ( ) : List
return List

getStudents() public static method

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

getStudents() public static method

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

getTeacher() public static method

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

getTeacher() public static method

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.
return Teacher

getTeacher() public static method

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

getTeacherFilter() public static method

public static getTeacherFilter ( String filter ) : List
filter String
return List

getTeacherTable() public static method

public static getTeacherTable ( ) : List
return List

incidentIsOpen() public static method

public static incidentIsOpen ( int inc_id ) : System.Boolean
inc_id int
return System.Boolean

setAdminPassword() public static method

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

setLeaveTime() public static method

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.
return System.Boolean

validateAdmin() public static method

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