C# Класс TRManager.UtilityDB

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
closeconnection ( ) : void

Closes the connection to the database.

openconnection ( ) : void

Opens the connection to the database.

Описание методов

addFullIncident() публичный статический Метод

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
Результат System.Boolean

addIncident() публичный статический Метод

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.
Результат System.Boolean

getAllIncidents() публичный статический Метод

public static getAllIncidents ( ) : List
Результат List

getClass() публичный статический Метод

Gets a class object by ClassName.
public static getClass ( String className ) : Class
className String The Name of the class.
Результат Class

getClass() публичный статический Метод

Gets a class object by Class_ID.
public static getClass ( int class_ID ) : Class
class_ID int
Результат Class

getClassTable() публичный статический Метод

Gets the class table for export.
public static getClassTable ( ) : List
Результат List

getClassTeacher() публичный статический Метод

Gets a teacher object by className.
public static getClassTeacher ( String className ) : Teacher
className String The name of the class.
Результат Teacher

getClasses() публичный статический Метод

Gets a list of all classes.
public static getClasses ( ) : List
Результат List

getCommentTable() публичный статический Метод

public static getCommentTable ( ) : List
Результат List

getExportData() публичный статический Метод

Gets all incidents combined with related data for export.
public static getExportData ( ) : List
Результат List

getIncident() публичный статический Метод

Gets an incident object by Incident_ID.
public static getIncident ( int incident_ID ) : Incident
incident_ID int The incident identifier.
Результат Incident

getIncidentTable() публичный статический Метод

Gets the incident table for export.
public static getIncidentTable ( ) : List
Результат List

getMaxTicket_ID() публичный статический Метод

Gets the maximum ticket_ identifier.
public static getMaxTicket_ID ( ) : String
Результат String

getOpenIncidents() публичный статический Метод

Gets a list of the open incidents.
public static getOpenIncidents ( ) : List
Результат List

getOpenIncidents() публичный статический Метод

public static getOpenIncidents ( List StudentIDs, List TeacherIDs, int TicketID ) : List
StudentIDs List
TeacherIDs List
TicketID int
Результат List

getReturnerTicketID() публичный статический Метод

Gets the teacher table for export.
public static getReturnerTicketID ( int StudentID ) : int
StudentID int
Результат int

getStudent() публичный статический Метод

Gets a student object.
public static getStudent ( int student_ID ) : Student
student_ID int The identifier of the student.
Результат Student

getStudent() публичный статический Метод

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.
Результат Student

getStudentFilter() публичный статический Метод

public static getStudentFilter ( string name ) : List
name string
Результат List

getStudentIncidents() публичный статический Метод

public static getStudentIncidents ( int student_ID ) : List
student_ID int The student identifier.
Результат List

getStudentTable() публичный статический Метод

Gets the student table for export.
public static getStudentTable ( ) : List
Результат List

getStudents() публичный статический Метод

Gets the students of a class by Class_ID.
public static getStudents ( int class_ID ) : List
class_ID int The class identifier.
Результат List

getStudents() публичный статический Метод

Gets a list of student objects by the name of the class.
public static getStudents ( string className ) : List
className string Name of the class.
Результат List

getTeacher() публичный статический Метод

Gets a teacher objectby the initials.
public static getTeacher ( String initials ) : Teacher
initials String The Initials of the teacher.
Результат Teacher

getTeacher() публичный статический Метод

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.
Результат Teacher

getTeacher() публичный статический Метод

Gets a teacher object by Teacher_ID.
public static getTeacher ( int teacher_ID ) : Teacher
teacher_ID int The identifier of the teacher.
Результат Teacher

getTeacherFilter() публичный статический Метод

public static getTeacherFilter ( String filter ) : List
filter String
Результат List

getTeacherTable() публичный статический Метод

public static getTeacherTable ( ) : List
Результат List

incidentIsOpen() публичный статический Метод

public static incidentIsOpen ( int inc_id ) : System.Boolean
inc_id int
Результат System.Boolean

setAdminPassword() публичный статический Метод

Set Admin-Password in DB
public static setAdminPassword ( String pass ) : System.Boolean
pass String The new Password
Результат System.Boolean

setLeaveTime() публичный статический Метод

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.
Результат System.Boolean

validateAdmin() публичный статический Метод

Validate Admin-Password
public static validateAdmin ( String pass ) : System.Boolean
pass String The Password
Результат System.Boolean