Пример #1
0
        private void ReporteLlenarCamposEspecificos(TipoDocumento tipoDoc, ReporteBase reporteBase)
        {
            Type tipoEspecifico = reporteBase.GetType();

            if (typeof(Sprayette) == tipoEspecifico)
            {
                Sprayette reporteEspecifico = (Sprayette)reporteBase;

                //reporteEspecifico.txtEmpresa.Visible = false;
                reporteEspecifico.picLogoCabecera.Visible = true;

                //Por ahora, sea A o B se muestra el mismo campo. Lo dejo preparado por si cambia.
                if (UnReporte.LetraCbte != "B")
                    reporteEspecifico.xrTableCellPrecioUnitario.DataBindings.Add("Text", null, "ImportePrecioUnitarioMonedaFacturacion");
                else
                    reporteEspecifico.xrTableCellPrecioUnitario.DataBindings.Add("Text", null, "ImportePrecioUnitarioMonedaFacturacion");

                if (reporteEspecifico.xrTableCellPrecioUnitario.DataBindings[0] != null)
                    reporteEspecifico.xrTableCellPrecioUnitario.DataBindings[0].FormatString = FORMATO_NRO;

                reporteEspecifico.xrTableCellCantidad.DataBindings.Add("Text", null, "CANTIDAD");

                //Datos de la empresa.
                reporteEspecifico.txtEmpresa.Text = UnReporte.oEmpresa.RazonSocial;
                reporteEspecifico.txtEmpresa.Visible = true;

                //Datos de la empresa, panel izquierdo.
                reporteEspecifico.rtbDatosEmpresa.Text = string.Format(reporteEspecifico.rtbDatosEmpresa.Text,
                                                                        UnReporte.oEmpresa.Direccion,
                                                                        UnReporte.oEmpresa.Localidad,
                                                                        UnReporte.oEmpresa.Pais,
                                                                        UnReporte.oEmpresa.Telefono);

                //Datos de la empresa, panel derecho.
                reporteEspecifico.rtbDatosEmpresa3.Text = string.Format(reporteEspecifico.rtbDatosEmpresa3.Text,
                                                                        UnReporte.oEmpresa.NroDocumento,
                                                                        UnReporte.oEmpresa.CodigoTipoResponsableAnteAFIP,
                                                                        UnReporte.oEmpresa.NroIIBB,
                                                                        UnReporte.oEmpresa.AgRecaudacionIIBB,
                                                                        UnReporte.oEmpresa.ImpuestosInternos,
                                                                        Convert.ToDateTime(UnReporte.oEmpresa.InicioActividades).ToString("dd/MM/yyyy"));

                SetReportLogo(reporteEspecifico);
            }
        }