Esempio n. 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 frmMntCargo(Cargo.GetCargo(_Cargo.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;
     }
 }
Esempio n. 2
0
 public override void Nuevo()
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         base.Nuevo();
         using (var frm = new frmMntCargo(Cargo.NewCargo()))
             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;
     }
 }
 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 frmMntCargo(Cargo.GetCargo(_Cargo.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;
     }
 }
 public override void Nuevo()
 {
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         base.Nuevo();
         using (var frm = new frmMntCargo(Cargo.NewCargo()))
             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;
     }
 }