private void obtenerRecibo(REC01_RECIBO rec)
        {
            Recibo dato = new Recibo();
            Mensaje <REC01_RECIBO> resp = dato.obtenerRecibo(rec);

            if (resp.data.MEDIO_PAGO == 1)
            {
                llenarPaises();
                llenarConceptos();
                llenarMediosPago();
                lblbanco.Visible  = false;
                cbxbancos.Visible = false;
                lblcheque.Visible = false;
                txtcheque.Visible = false;

                txtrecibo.Text            = resp.data.RECIBO.ToString(); //En este campo se colocara el dato de recibo cuando ya exista
                txtnombre.Text            = resp.data.NOMBRE;
                txtdireccion.Text         = resp.data.DIRECCION;
                cbxpais.SelectedValue     = resp.data.PAIS;
                txtnit.Text               = resp.data.NIT;
                txttelefono.Text          = resp.data.TELEFONO;
                cbxconcepto.SelectedValue = Convert.ToDecimal(resp.data.CONCEPTO);
                txtprecio.Text            = resp.data.PRECIO.ToString();
                txtcantidad.Text          = resp.data.CANTIDAD.ToString();
                txttotal.Text             = resp.data.TOTAL.ToString();
                cbxmodopago.SelectedValue = Convert.ToDecimal(resp.data.MEDIO_PAGO);
                txtobservacion.Text       = resp.data.OBSERVACION_3;

                //inactivar();
            }
            else if (resp.data.MEDIO_PAGO == 2)
            {
                llenarPaises();
                llenarConceptos();
                llenarMediosPago();
                llenarBancos();
                lblbanco.Visible  = true;
                cbxbancos.Visible = true;
                lblcheque.Visible = true;
                txtcheque.Visible = true;

                txtrecibo.Text            = resp.data.RECIBO.ToString(); //En este campo se colocara el dato de recibo cuando ya exista
                txtnombre.Text            = resp.data.NOMBRE;
                txtdireccion.Text         = resp.data.DIRECCION;
                cbxpais.SelectedValue     = resp.data.PAIS;
                txtnit.Text               = resp.data.NIT;
                txttelefono.Text          = resp.data.TELEFONO;
                cbxconcepto.SelectedValue = Convert.ToDecimal(resp.data.CONCEPTO);
                txtprecio.Text            = resp.data.PRECIO.ToString();
                txtcantidad.Text          = resp.data.CANTIDAD.ToString();
                txtcantidad.Text          = resp.data.TOTAL.ToString();
                cbxmodopago.SelectedValue = Convert.ToDecimal(resp.data.MEDIO_PAGO);
                cbxbancos.SelectedValue   = Convert.ToDecimal(resp.data.BANCO);
                txtcheque.Text            = resp.data.NUMERO_CHEQUE;
                txtobservacion.Text       = resp.data.OBSERVACION_3;

                //inactivar();
            }
        }
        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 frmVistaPrevia_Load(object sender, EventArgs e)
        {
            Recibo objServicio = new Recibo()
            {
                recibo = recibo, usuario = usuario
            };
            List <reciboEntidad> servicio = objServicio.obtenerRecibo();

            if (medio_pago == 1)
            {
                try
                {
                    this.rptdiseno.LocalReport.ReportPath = @"..\..\Reportes\RptImpresionEfectivo.rdlc";
                    this.rptdiseno.LocalReport.DataSources.Clear();
                    ReportDataSource ds = new ReportDataSource("dts_recibo", servicio);
                    this.rptdiseno.LocalReport.DataSources.Add(ds);
                    this.rptdiseno.LocalReport.Refresh();
                    this.rptdiseno.RefreshReport();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Referencia: " + ex.ToString());
                }
            }
            else if (medio_pago == 2)
            {
                try
                {
                    this.rptdiseno.LocalReport.ReportPath = @"..\..\Reportes\RptImpresionCheque.rdlc";
                    this.rptdiseno.LocalReport.DataSources.Clear();
                    ReportDataSource ds = new ReportDataSource("dts_recibo", servicio);
                    this.rptdiseno.LocalReport.DataSources.Add(ds);
                    this.rptdiseno.LocalReport.Refresh();
                    this.rptdiseno.RefreshReport();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Referencia: " + ex.ToString());
                }
            }
        }
        private void obtenerRecibo()
        {
            Recibo       obj = new Recibo();
            REC01_RECIBO rec = new REC01_RECIBO();

            rec.RECIBO           = Convert.ToDecimal(recibo);
            rec.USUARIO_CREACION = usuario;
            Mensaje <REC01_RECIBO> resp = obj.obtenerRecibo(rec);

            txtrecibo.Text  = resp.data.RECIBO.ToString();
            txtusuario.Text = resp.data.USUARIO_CREACION.ToString();
            txtnombre.Text  = resp.data.NOMBRE.ToString();
            txttotal.Text   = resp.data.TOTAL.ToString();

            if (resp.data.RECIBO_FISICO != null || resp.data.SERIE_RECIBO != null)
            {
                txtnumerorecibo.Text    = resp.data.RECIBO_FISICO.ToString();
                txtserie.Text           = resp.data.SERIE_RECIBO.ToString();
                txtnumerorecibo.Enabled = false;
                txtserie.Enabled        = false;
            }
        }