示例#1
0
        /// <summary>
        /// производит поиск задолжников
        /// и возвращает их фамилии группы и
        /// количество задолженностей
        /// </summary>
        /// <returns></returns>
        public List <StudentInfo> GetDebtorsList()
        {
            var allStudents  = new GetStudents();
            var studentsList = allStudents.GetAll();
            var dabtors      = new List <StudentInfo>();

            foreach (Student student in studentsList)
            {
                int na = 0;
                for (int exem = 0; exem < 5; exem++)
                {
                    if (student.Exems[exem].Equals('2'))
                    {
                        na++;
                    }
                }

                for (int score = 0; score < 5; score++)
                {
                    if (student.Scores[score].Equals('Н') || student.Scores[score].Equals('н'))
                    {
                        na++;
                    }
                }
                if (na >= 1)
                {
                    dabtors.Add(new StudentInfo(student.ID, student.Group, student.Surname, na));
                }
            }
            return(dabtors);
        }
示例#2
0
        public void UpdateData()
        {
            StudentsDataGrid.Rows.Clear();
            GetStudents students = new GetStudents();

            foreach (Student student in students.GetAll())
            {
                StudentsDataGrid.Rows.Add(student.ID,
                                          student.Group,
                                          student.Surname,
                                          student.Exems,
                                          student.Scores);
            }
        }
示例#3
0
        //поиск студентов по указанной группе
        private void GetStudents(string group)
        {
            var students = new GetStudents();

            studentsOnGroup = students.GetByGroup(group);
        }