Esempio n. 1
0
 private void tsbEliminar_Click(object sender, EventArgs e)
 {
     if (base.ValidarDGV(dgvEspecialidades))
     {
         try
         {
             int ID = ((Business.Entities.Especialidad) this.dgvEspecialidades.SelectedRows[0].DataBoundItem).Id;
             EspecialidadDesktop frmEspecialidadesDesktop = new EspecialidadDesktop(ID, ModoForm.Baja);
             frmEspecialidadesDesktop.MapearADatos();
             frmEspecialidadesDesktop.Show();
         }
         catch (NotFoundException ex)
         {
             Notificar(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         catch (CustomException ex)
         {
             Notificar(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         catch (Exception ex)
         {
             Notificar(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }