private void Anular()
 {
     if (string.IsNullOrWhiteSpace(txtmotivo.Text))
     {
         MessageBox.Show("Favor de colocar una descripcion del Motivo por el cual se esta Anulando el Recibo.");
         txtmotivo.Focus();
     }
     else if (string.IsNullOrWhiteSpace(txtnumerorecibo.Text))
     {
         MessageBox.Show("Favor de colocar el numero del Recibo Fisico que sera Anulando.");
         txtnumerorecibo.Focus();
     }
     else if (string.IsNullOrWhiteSpace(txtserie.Text))
     {
         MessageBox.Show("Favor de colocar la Serie del Recibo Fisico que sera Anulando.");
         txtserie.Focus();
     }
     else
     {
         REC01_ANULACION objAnulacion = new REC01_ANULACION();
         objAnulacion.RECIBO           = Convert.ToDecimal(txtrecibo.Text);
         objAnulacion.USUARIO_CREACION = txtusuario.Text;
         objAnulacion.MOTIVO           = txtmotivo.Text;
         objAnulacion.RECIBO_FISICO    = Convert.ToDecimal(txtnumerorecibo.Text);
         objAnulacion.SERIE            = txtserie.Text;
         Recibo           objRecibo = new Recibo();
         Mensaje <Recibo> resp      = objRecibo.AnularRecibo(objAnulacion);
         MessageBox.Show(resp.mensaje);
         frmReciboEvento fre = new frmReciboEvento();
         this.Hide();
         fre.ShowDialog();
         this.Close();
     }
 }
예제 #2
0
        private void btnSalir_Click(object sender, EventArgs e)
        {
            frmReciboEvento fp = new frmReciboEvento();

            this.Hide();
            fp.ShowDialog();
            this.Close();
        }
        private void btncancelar_Click(object sender, EventArgs e)
        {
            frmReciboEvento fre = new frmReciboEvento();

            this.Hide();
            fre.ShowDialog();
            this.Close();
        }
        private void btnimprimir_Click(object sender, EventArgs e)
        {
            Recibo objServicio = new Recibo()
            {
                recibo = recibo, usuario = usuario
            };
            List <reciboEntidad> servicio = objServicio.obtenerRecibo();

            if (medio_pago == 1)
            {
                try
                {
                    //MUESTRA LA VISTA PREVIA DEL REPORTE
                    LocalReport rdlc = new LocalReport();
                    rdlc.ReportPath = @"..\..\Reportes\RptImpresionEfectivo.rdlc";
                    rdlc.DataSources.Clear();
                    ReportDataSource ds = new ReportDataSource("dts_recibo", servicio);
                    rdlc.DataSources.Add(ds);
                    //ENVIA EL REPORTE A LA IMPRESORA
                    impresor imp = new impresor();
                    imp.Imprime(rdlc);
                    //SE CIERRA VENTANA DE VISTA PREVIA Y SE HABRE LA PANTALLA DEL MENU PRINCIPAL
                    frmReciboEvento nre = new frmReciboEvento();
                    this.Hide();
                    nre.ShowDialog();
                    this.Close();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else if (medio_pago == 2)
            {
                try
                {
                    //MUESTRA LA VISTA PREVIA DEL REPORTE
                    LocalReport rdlc = new LocalReport();
                    rdlc.ReportPath = @"..\..\Reportes\RptImpresionCheque.rdlc";
                    rdlc.DataSources.Clear();
                    ReportDataSource ds = new ReportDataSource("dts_recibo", servicio);
                    rdlc.DataSources.Add(ds);
                    //ENVIA EL REPORTE A LA IMPRESORA
                    impresor imp = new impresor();
                    imp.Imprime(rdlc);
                    //SE CIERRA VENTANA DE VISTA PREVIA Y SE HABRE LA PANTALLA DEL MENU PRINCIPAL
                    frmReciboEvento nre = new frmReciboEvento();
                    this.Hide();
                    nre.ShowDialog();
                    this.Close();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
        private void btnModificar_Click(object sender, EventArgs e)
        {
            frmReciboEvento nreev = new frmReciboEvento();

            nreev.reciboimpresion = this.recibo;
            this.Hide();
            nreev.ShowDialog();
            this.Close();
        }
예제 #6
0
        private void btnactivar_Click(object sender, EventArgs e)
        {
            if (cbxevento.SelectedValue != null)
            {
                Global.eventoActivo       = Convert.ToDecimal(cbxevento.SelectedValue);
                Global.nombreeventoActivo = cbxevento.Text;

                frmReciboEvento fp = new frmReciboEvento();
                this.Hide();
                fp.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("No ha seleccionado un Evento para Iniciar la Gestion de Recibos");
            }
        }
예제 #7
0
 private void guardarCorrelativos()
 {
     if (string.IsNullOrWhiteSpace(txtCorrelativoActual.Text.ToString()))
     {
         MessageBox.Show("El Campo de Correlativo Inicial se encuentra vacio o contiene un espacio, favor de colocar un dato en el campo");
         txtCorrelativoActual.Focus();
     }
     else if (string.IsNullOrWhiteSpace(txtCorrelativoFinal.Text.ToString()))
     {
         MessageBox.Show("El Campo de Correlativo Final se encuentra vacio o contiene un espacio, favor de colocar un dato en el campo");
         txtCorrelativoFinal.Focus();
     }
     else if (string.IsNullOrWhiteSpace(txtSerie.Text.ToString()))
     {
         MessageBox.Show("El Campo de Serie se encuentra vacio o contiene un espacio, favor de colocar un dato en el campo");
         txtSerie.Focus();
     }
     else if (Convert.ToDecimal(txtCorrelativoActual.Text) > Convert.ToDecimal(txtCorrelativoFinal.Text))
     {
         MessageBox.Show("El Valor del Correlativo Inicial no puede ser Mayor al Valor del Correlativo Final");
         txtCorrelativoActual.Focus();
     }
     else
     {
         REC01_CORRELATIVO_RECIBO objcorrelativo = new REC01_CORRELATIVO_RECIBO();
         objcorrelativo.CORRELATIVO_ACTUAL = Convert.ToDecimal(txtCorrelativoActual.Text);
         objcorrelativo.CORRELATIVO_FINAL  = Convert.ToDecimal(txtCorrelativoFinal.Text);
         objcorrelativo.SERIE = txtSerie.Text;
         Recibo           objrecibo    = new Recibo();
         Mensaje <Recibo> objrespuesta = objrecibo.guardarCorrelativoFisico(objcorrelativo);
         MessageBox.Show(objrespuesta.mensaje);
         frmReciboEvento fp = new frmReciboEvento();
         this.Hide();
         fp.ShowDialog();
         this.Close();
     }
 }