private void btn_removeStudent_Click(object sender, EventArgs e) { if (lv_students.SelectedIndices.Count == 0) { MessageBox.Show("Оберіть студента для видалення!"); return; } Student student = _students[lv_students.SelectedIndices[0]]; try { _proxy.DeleteStudent(student); } catch (Exception ex) { MessageBox.Show(ex.Message, "Повідомлення", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } LoadStudents(); return; }