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("Произошла ошибка"); } }
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("Ошиба сохранения файла"); } } }