private void pictureBox3_Click(object sender, EventArgs e)
        {
            frmVerListados Reporte = new frmVerListados(5, string.Empty);

            Reporte.ShowDialog();
            Reporte.Dispose();
        }
Example #2
0
 private void btnReporteSaldos_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.dgvNomina.SelectedRows.Count == 1)
         {
             int    Row      = this.dgvNomina.Rows.GetFirstRow(DataGridViewElementStates.Selected);
             Nomina DatosAux = this.ObtenerDatosGrid(Row);
             if (!string.IsNullOrEmpty(DatosAux.IDNomina))
             {
                 frmVerListados Reporte = new frmVerListados(3, DatosAux.IDNomina);
                 this.Visible = false;
                 Reporte.ShowDialog();
                 Reporte.Dispose();
                 this.Visible = true;
             }
         }
         else
         {
             MessageBox.Show("Seleccione un registro.", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     catch (Exception ex)
     {
         this.Visible = true;
         LogError.AddExcFileTxt(ex, "frmNomina ~ btnReporteSaldos_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #3
0
 private void btnImprimirCarta_Click(object sender, EventArgs e)
 {
     try
     {
         MobiliarioResguardo DatosAux = this.ObtenerDatosMobiliario();
         if (!string.IsNullOrEmpty(DatosAux.IDMobiliarioResguardo))
         {
             frmVerListados Listado = new frmVerListados(1, DatosAux.IDMobiliarioResguardo);
             this.Visible = false;
             Listado.ShowDialog();
             this.Visible = true;
             Listado.Dispose();
         }
         else
         {
             MessageBox.Show("Seleccione un registro", Comun.Sistema, MessageBoxButtons.OK);
         }
     }
     catch (Exception ex)
     {
         this.Visible = true;
         LogError.AddExcFileTxt(ex, "frmMobiliario_Resguardo ~ btnBuscar_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void bgwGenerarNomina_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null)
         {
             Nomina Datos = null;
             try
             {
                 Datos = (Nomina)e.Result;
             }
             catch (Exception) { }
             if (Datos != null)
             {
                 if (Datos.Completado)
                 {
                     frmVerListados Reporte = new frmVerListados(3, Datos.IDNomina);
                     this.Visible = false;
                     Reporte.ShowDialog();
                     Reporte.Dispose();
                     this.Visible      = true;
                     this.DialogResult = DialogResult.OK;
                 }
                 else
                 {
                     MessageBox.Show("No se pudo generar el reporte. (1)", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                 }
             }
             else
             {
                 MessageBox.Show("No se pudo generar el reporte. (2)", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         else
         {
             MessageBox.Show("No se pudo generar el reporte. (3)", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception exe)
     {
         LogError.AddExcFileTxt(exe, "frmNuevaNomina ~ btnGenerarNomina_Click ~ bgwGenerarNomina_RunWorkerCompleted");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.Visible = true;
     }
     finally
     {
         AllowClick         = true;
         lblMessage.Visible = false;
         Cursor             = Cursors.Default;
     }
 }
 private void btnImprimir_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.dgvComisiones.SelectedRows.Count == 1)
         {
             int            Row     = this.dgvComisiones.Rows.GetFirstRow(DataGridViewElementStates.Selected);
             Comision       Datos   = this.ObtenerDatosGrid(Row);
             frmVerListados Reporte = new frmVerListados(2, Datos.IDResumenComision);
             Reporte.ShowDialog();
             Reporte.Dispose();
         }
         else
         {
             MessageBox.Show("Seleccione un registro.", Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmComisiones ~ btnImprimir_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }