Example #1
0
 public override void Editar()
 {
     base.Editar();
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         //Comprobamos que al menos un registro hay sido seleccionado
         CargaDatosActuales();
         using (var frm = new frmRecursos(Recursos.GetRecursos(_Recursos.ID)))
         {
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 Buscar();
             }
         }
     }
     catch (DataPortalException ex)
     {
         XtraMessageBox.Show(ex.BusinessException.Message,
                             "Ver/Editar",
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Exclamation);
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message,
                             "Ver/Editar",
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Exclamation);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }
Example #2
0
 public override void Nuevo()
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         base.Nuevo();
         using (var frm = new frmRecursos(Recursos.NewRecursos()))
             if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 Buscar();
             }
     }
     catch (DataPortalException ex)
     {
         XtraMessageBox.Show(ex.BusinessException.Message,
                             "Nuevo",
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Exclamation);
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message,
                             "Nuevo",
                             MessageBoxButtons.OK,
                             MessageBoxIcon.Exclamation);
     }
     finally
     {
         Cursor.Current = Cursors.Default;
     }
 }