private void btnImprimir_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = Cursors.WaitCursor;

                List <ReporteInvoiceBE> lstReporte = null;
                lstReporte = new ReporteInvoiceBL().ListadoCommisionCover(int.Parse(gvInvoice.GetFocusedRowCellValue("IdInvoice").ToString()));

                if (lstReporte != null)
                {
                    if (lstReporte.Count > 0)
                    {
                        RptVistaReportes objRptInvoice = new RptVistaReportes();
                        objRptInvoice.VerRptInvoiceComisionCover(lstReporte);
                        objRptInvoice.ShowDialog();
                    }
                    else
                    {
                        XtraMessageBox.Show("No hay informaciĆ³n para el periodo seleccionado", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void tlbMenu_PrintClick()
        {
            try
            {
                Cursor = Cursors.WaitCursor;

                List <ReporteInvoiceBE> lstReporteTemp = null;
                List <ReporteInvoiceBE> lstReporte     = new List <ReporteInvoiceBE>();

                int[] rows = gvInvoice.GetSelectedRows();

                for (int i = 0; i < rows.Length; i++)
                {
                    lstReporteTemp = new ReporteInvoiceBL().Listado(int.Parse(gvInvoice.GetRowCellValue(rows[i], gvInvoice.Columns.ColumnByFieldName("IdInvoice")).ToString()));
                    foreach (var item in lstReporteTemp)
                    {
                        ReporteInvoiceBE objE_Reporte = new ReporteInvoiceBE();
                        objE_Reporte.NameCompany              = item.NameCompany;
                        objE_Reporte.Logo                     = item.Logo;
                        objE_Reporte.NumberInvoice            = item.NumberInvoice;
                        objE_Reporte.NameClient               = item.NameClient;
                        objE_Reporte.ConceptoImprime          = item.ConceptoImprime;
                        objE_Reporte.IssueDate                = item.IssueDate;
                        objE_Reporte.NameDestination          = item.NameDestination;
                        objE_Reporte.BrandCertificate         = item.BrandCertificate;
                        objE_Reporte.PercentComision          = item.PercentComision;
                        objE_Reporte.ComisionImprime          = item.ComisionImprime;
                        objE_Reporte.AddressClient            = item.AddressClient;
                        objE_Reporte.Contac                   = item.Contac;
                        objE_Reporte.Occupation               = item.Occupation;
                        objE_Reporte.NoteGeneral              = item.NoteGeneral;
                        objE_Reporte.NameBank                 = item.NameBank;
                        objE_Reporte.NumberCtaCte             = item.NumberCtaCte;
                        objE_Reporte.Swift                    = item.Swift;
                        objE_Reporte.CodeAba                  = item.CodeAba;
                        objE_Reporte.AddressBank              = item.AddressBank;
                        objE_Reporte.Phone                    = item.Phone;
                        objE_Reporte.Representative           = item.Representative;
                        objE_Reporte.NameCurrency             = item.NameCurrency;
                        objE_Reporte.TotalAmount              = item.TotalAmount;
                        objE_Reporte.TotalComision            = item.TotalComision;
                        objE_Reporte.TotalPieces              = item.TotalPieces;
                        objE_Reporte.ComisionLetter           = item.ComisionLetter;
                        objE_Reporte.NameStatus               = item.NameStatus;
                        objE_Reporte.NumberCertificate        = item.NumberCertificate;
                        objE_Reporte.IssueCertificate         = item.IssueCertificate;
                        objE_Reporte.NameVendor               = item.NameVendor;
                        objE_Reporte.NumberInvoiceCertificate = item.NumberInvoiceCertificate;
                        objE_Reporte.IssueDateInvoice         = item.IssueDateInvoice;
                        objE_Reporte.NameDivision             = item.NameDivision;
                        objE_Reporte.Amount                   = item.Amount;
                        objE_Reporte.Comision                 = item.Comision;
                        objE_Reporte.Pieces                   = item.Pieces;
                        objE_Reporte.CertificateVince         = item.CertificateVince;
                        objE_Reporte.StyleVince               = item.StyleVince;
                        lstReporte.Add(objE_Reporte);
                    }
                }

                if (lstReporte != null)
                {
                    if (lstReporte.Count > 0)
                    {
                        RptVistaReportes objRptInvoice = new RptVistaReportes();
                        objRptInvoice.VerRptInvoice(lstReporte);
                        objRptInvoice.ShowDialog();
                    }
                    else
                    {
                        XtraMessageBox.Show("No hay informaciĆ³n para el periodo seleccionado", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }