private void btnRemove_Click(object sender, EventArgs e) { try { try { Model.Internal.BoardComputer boardComputer = (Model.Internal.BoardComputer)gdvBoardComputer.GetRow(this.gdvBoardComputer.FocusedRowHandle); if (boardComputer == null) { return; } if (DevExpress.XtraEditors.XtraMessageBox.Show(this.LookAndFeel, "Bent u zeker dat u de boordcomputer wilt verwijderen?", "Verwijderen?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3) == DialogResult.Yes) { boardComputer.Delete(); Uow.CommitChanges(); FindAll(); } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }
private void gdvBoardComputer_DoubleClick(object sender, EventArgs e) { try { Model.Internal.BoardComputer boardComputer = (Model.Internal.BoardComputer)gdvBoardComputer.GetRow(this.gdvBoardComputer.FocusedRowHandle); if (boardComputer == null) { return; } BoardComputer form = new BoardComputer(PROF_IT.Common.Enumerations.TypeForm.PropertyForm, boardComputer); if (form.ShowDialog() == DialogResult.OK) { FindAll(); } } catch (System.Exception exception1) { System.Exception thisException = exception1; Management.ShowException(thisException); } }