Ejemplo n.º 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("Произошла ошибка");
            }
        }
Ejemplo n.º 2
0
        private void MenuFailSave_Click(object sender, EventArgs e)
        {
            if (SaveFileDialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    string path = SaveFileDialog.FileName;

                    List <Student> studentsList = StudentsDGVConvert.DGVToStudentsList(InputStudentsDGV);

                    StudentsFiles.SaveStudentsListInFile(path, studentsList);
                }
                catch (Exception)
                {
                    MessageUtils.ShowError("Ошиба сохранения файла");
                }
            }
        }
Ejemplo n.º 3
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("Ошиба чтения из файла");
                }
            }
        }