/// <summary> /// Shows the edit form to modify a record. /// </summary> private void EditExpertItem(DBGuid ID) { if (ID.IsNull) { return; } frmExpertEdit frmEdit = null; try { frmEdit = new frmExpertEdit(ID, true); DialogResult result = frmEdit.ShowDialog(); if (result == DialogResult.OK) { FillDatagridExp(frmEdit.CurrentID); } } catch (Exception ex) { // --- Log exception ExceptionManager.Publish(ex); // --- Display Exception ErrorHandler.DisplayError("Hiba történt az adatok módosítása során.", ex); } finally { if (frmEdit != null) { frmEdit.Dispose(); } } }
/// <summary> /// Shows the edit form to modify a record. /// </summary> private void EditItem() { DBGuid ID = DBGuid.Null; ID.Value = dtgMain.GetSelectedRowCell("ID"); frmExpertEdit frmEdit = null; try { frmEdit = new frmExpertEdit(ID); DialogResult result = frmEdit.ShowDialog(); if (result == DialogResult.OK) { FillDatagrid(frmEdit.CurrentID); } } catch (Exception ex) { // --- Log exception ExceptionManager.Publish(ex); // --- Display Exception ErrorHandler.DisplayError("Hiba történt az adatok módosítása során.", ex); } finally { if (frmEdit != null) { frmEdit.Dispose(); } } }