Example #1
0
 private void mnuInsert_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmSafe();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData(txtSearch.Text);
         }
     }
     catch (Exception ex)
     {
         frmMessage frm = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, ex.Message);
         frm.ShowDialog();
     }
 }
Example #2
0
 private void mnuEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGrid.RowCount == 0)
         {
             return;
         }
         Guid _safeGuid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
         var  frm       = new frmSafe(_safeGuid, true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             LoadData(txtSearch.Text);
         }
     }
     catch (Exception exception)
     {
         frmMessage f = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, exception.Message);
         f.ShowDialog();
     }
 }