コード例 #1
0
        private void Btn_actualizar_Click(object sender, EventArgs e)
        {
            this.ValidarDesactualizar();
            if (existe)
            {
                btn_actualizar.Enabled = false;
                using (Form_ProgresBar fwait = new Form_ProgresBar())
                {
                    fwait.Title           = "DESACTUALIZANDO ASIENTOS";
                    fwait.Message         = "ESPERE MIENTRAS SE REALIZA EL PROCESO";
                    fwait.Picture         = Properties.Resources.siimn;
                    fwait.ActionToExecute = DesactualizarAsiento;
                    if (fwait.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        MessageBox.Show(this.cantasi + "   ASIENTOS FUERON DESACTUALIZADOS ");
                    }
                    else
                    {
                        MessageBox.Show("ERROR");
                    }
                    if (this.tipodes == 1)
                    {
                        cbx_mes1.SelectedIndex = 1;
                        cbx_mes2.SelectedIndex = DateTime.Now.Month;
                    }
                    else
                    {
                        cbx_comprobante.SelectedValue = 1;
                        txt_numeroasiento.Clear();
                    }

                    btn_actualizar.Enabled = true;
                }
            }
        }
コード例 #2
0
 private void Btn_Generar_Click(object sender, EventArgs e)
 {
     this.ValidarGenerar();
     if (existe)
     {
         this.Enabled = false;
         using (Form_ProgresBar fwait = new Form_ProgresBar())
         {
             fwait.Title           = "GENERANDO CIERRE DE CUENTAS";
             fwait.Message         = "ESPERE MIENTRAS SE REALIZA EL PROCESO";
             fwait.Picture         = Properties.Resources.siimn;
             fwait.ActionToExecute = GenerarCierreCuentasEstado;
             if (fwait.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 MessageBox.Show("   FUE GENERADO EL ASIENTO ");
             }
             else
             {
                 MessageBox.Show("ERROR");
             }
         }
     }
 }