Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                List <Student> students = StudentsDGVConvert.DGVToStudentsList(InputStudentsDGV);
                StudentsDGVConvert.StudentsListToDGV(InputStudentsDGV, StudentsSort.Sort(students));

                ExcludeStudents instance             = new ExcludeStudents((int)minPoint.Value, (int)minsumOfStudents.Value);
                List <string>   ListExcludedStudents = instance.Exclude(students);
                ExcludedStudents.Text = string.Join("; ", ListExcludedStudents);
            }
            catch (Exception)
            {
                MessageUtils.ShowError("Произошла ошибка");
            }
        }
Example #2
0
        private void MenuFailOpen_Click(object sender, EventArgs e)
        {
            if (OpenFileDialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    string path = OpenFileDialog.FileName;

                    List <Student> studentsList = StudentsFiles.ReadStudentsListFromFile(path);

                    StudentsDGVConvert.StudentsListToDGV(InputStudentsDGV, studentsList);
                }
                catch (Exception)
                {
                    MessageUtils.ShowError("Ошиба чтения из файла");
                }
            }
        }