예제 #1
0
 /// <summary>
 /// Shows the edit form to modify a record.
 /// </summary>
 private void EditItem()
 {
     DBString ID = Convert.ToString(dtgMain.GetSelectedRowCell("LoginName"));
       frmUserEdit frmEdit = null;
       try
       {
     frmEdit = new frmUserEdit(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();
     }
       }
 }
예제 #2
0
 /// <summary>
 /// Shows the edit form to insert a record.
 /// </summary>
 private void NewItem()
 {
     frmUserEdit frmEdit = null;
       try
       {
     frmEdit = new frmUserEdit();
     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();
     }
       }
 }
 /// <summary>
 /// Shows the edit form to modify a record.
 /// </summary>
 private void EditUserItem()
 {
     DBString id = Convert.ToString(dtgUser.GetSelectedRowCell("LoginName"));
       frmUserEdit frmEdit = null;
       try
       {
     frmEdit = new frmUserEdit(id);
     DialogResult result = frmEdit.ShowDialog();
     if (result == DialogResult.OK)
     {
       FillUserDataGrid();
     }
       }
       catch (Exception ex)
       {
     //	---	Log exception
     ExceptionManager.Publish(ex);
     //	---	Display Exception
     ErrorHandler.DisplayError("Hiba történt az adatok lekérdezése során.", ex);
       }
       finally
       {
     if (frmEdit != null)
     {
       frmEdit.Dispose();
     }
       }
 }