public DataTable FindAllFrom(int universityId)
        {
            var table = DataAccessProvider.ExecuteQuery($"SELECT * FROM Groups " +
                                                        $"WHERE UniversityID = {universityId}");

            return(table);
        }
Exemple #2
0
        public DataTable FindAllFrom(int groupId)
        {
            var table = DataAccessProvider.ExecuteQuery($"SELECT * FROM Students " +
                                                        $"WHERE GroupID = {groupId}");

            return(table);
        }
Exemple #3
0
        private void RefreshForm()
        {
            subjectDataGrid.DataSource = _dataProvider.ExecuteQuery($"SELECT * FROM Subjects WHERE UniversityID = {_universityId}");
            teacherDataGrid.DataSource = _dataProvider.ExecuteQuery($"SELECT * FROM Teachers");

            selectSubjectComboBox.Items.Clear();
            selectTeacherComboBox.Items.Clear();

            DataTable subjectList = _dataProvider.ExecuteQuery("SELECT SubjectName FROM Subjects WHERE TeacherID IS NULL AND UniversityID = " + _universityId);

            for (int i = 0; i < subjectList.Rows.Count; i++)
            {
                selectSubjectComboBox.Items.Add(subjectList.Rows[i].Field <string>(0));
            }

            DataTable teacherList = _dataProvider.ExecuteQuery("SELECT TeacherName, TeacherSurname FROM Teachers WHERE SubjectID IS NULL");

            for (int i = 0; i < teacherList.Rows.Count; i++)
            {
                selectTeacherComboBox.Items.Add(teacherList.Rows[i].Field <string>(0) + " " + teacherList.Rows[i].Field <string>(1));
            }
        }
Exemple #4
0
        public DataTable FindAllFrom(int studentId)
        {
            var table = DataAccessProvider.ExecuteQuery($"SELECT * FROM Records WHERE StudentID = {studentId}");

            return(table);
        }
Exemple #5
0
        public override DataTable FindAll()
        {
            var table = DataAccessProvider.ExecuteQuery("SELECT * FROM Records");

            return(table);
        }