private void btnRemove_Click(object sender, EventArgs e) { try { DataRow selRow = SelectedRow; if (selRow != null) { int id = (int)selRow[0]; using (GmConnection conn = App.CreateConnection()) { Observation.Remove(conn, id); } dataTable.Rows.Remove(selRow); } } catch (Exception ex) { Log.Exception(ex); } }