private void DeleteHall_Click(object sender, EventArgs e) { try { if (_valid.ValidDeleteHallTable(_f1.idhall)) { bool res = _hallService.DeleteHalls(new HallMember { HallId = _f1.idhall }); if (res == false) { MessageBox.Show("Не удалось выполнить запрос!"); } else { outputHall(_dataGridHall); if (_dataGridHall.CurrentRow != null) { _dataGridHall.Rows[_dataGridHall.CurrentRow.Index].Selected = false; } } } else { foreach (var v in _valid.ErrorStrings) { MessageBox.Show(v); } _valid.ErrorStrings.Clear(); } } catch (Exception exp) { MessageBox.Show(errorController); } }