Exemplo n.º 1
0
        public NotificacionInternaRpt GetDetailNotificacionCierreDiscrepanciasReport(NotificacionInternaInfo comunicado, AuditoriaInfo item, CompanyInfo empresa)
        {
            if (item == null)
            {
                return(null);
            }
            NotificacionInternaRpt doc = new NotificacionInternaRpt();

            List <NotificacionInternaPrint> pList = new List <NotificacionInternaPrint>();

            NotificacionInternaPrint print = comunicado.GetPrintObject(empresa, item);

            pList.Add(comunicado.GetPrintObject(empresa, item));

            doc.SetDataSource(pList);

            doc.SetParameterValue("ReferenciaTitulo", item.Referencia);
            doc.SetParameterValue("ReferenciaInforme", item.Referencia +
                                  " (" + print.NumeroAuditoria + ") " + print.NombreAuditoria);
            doc.SetParameterValue("PieInforme", string.Format(Resources.Messages.PIE_COMUNICADO_CIERRE_DISCREPANCIAS, print.DeptoAuditor.ToUpper(), print.Auditor.ToUpper()));

            //FormatReport(doc);

            return(doc);
        }
Exemplo n.º 2
0
        protected override void PrintComunicado()
        {
            if ((EstadoAuditoria)_entity.Estado >= EstadoAuditoria.COMUNICADA)
            {
                AuditoriaReportMng reportMng = new AuditoriaReportMng(AppContext.ActiveSchema);

                if (_entity.Notificaciones.Count > 0)
                {
                    NotificacionInternaInfo comunicado = _entity.Notificaciones[0].GetInfo();

                    NotificacionInternaRpt rpt = reportMng.GetDetailNotificacionAuditoriaReport(comunicado, EntityInfo, CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                    ReportViewer.SetReport(rpt);
                    ReportViewer.ShowDialog();
                }

                /*if (_entity.Informes.Count > 0)
                 * {
                 *  InformeDiscrepanciaRpt Dreport = reportMng.GetDetailReport(_entity.GetInfo(true).Informes[0].Discrepancias);
                 *
                 *  ReportViewer.SetReport(Dreport);
                 *  ReportViewer.ShowDialog();
                 *
                 *  InformeAccionesCorrectorasRpt Creport = reportMng.GetDetailReport(_entity.GetInfo(true).Informes[0].Correctores[0]);
                 *
                 *  ReportViewer.SetReport(Creport);
                 *  ReportViewer.ShowDialog();
                 *
                 *  ControlNoConformidadRpt Nreport = reportMng.GetNoConformidadDetailReport(_entity.GetInfo(true).Informes[0].Discrepancias);
                 *
                 *  ReportViewer.SetReport(Nreport);
                 *  ReportViewer.ShowDialog();
                 * }*/
            }
        }
Exemplo n.º 3
0
        public NotificacionInternaRpt GetDetailNotificacionDiscrepanciasReport(NotificacionInternaInfo comunicado, AuditoriaInfo item, CompanyInfo empresa)
        {
            if (item == null)
            {
                return(null);
            }
            NotificacionInternaRpt doc = new NotificacionInternaRpt();

            List <NotificacionInternaPrint> pList = new List <NotificacionInternaPrint>();

            NotificacionInternaPrint print = comunicado.GetPrintObject(empresa, item);

            pList.Add(comunicado.GetPrintObject(empresa, item));

            doc.SetDataSource(pList);

            doc.SetParameterValue("ReferenciaTitulo", item.Referencia);
            doc.SetParameterValue("ReferenciaInforme", item.Referencia +
                                  " (" + print.NumeroAuditoria + ") " + print.NombreAuditoria);
            doc.SetParameterValue("PieInforme", string.Empty);

            //FormatReport(doc);

            return(doc);
        }
Exemplo n.º 4
0
        protected override void PrintComunicado()
        {
            if ((EstadoAuditoria)_entity.Estado > EstadoAuditoria.CREADA)
            {
                AuditoriaReportMng reportMng = new AuditoriaReportMng(AppContext.ActiveSchema);

                NotificacionInternaInfo notificacion = _entity.Notificaciones[0];

                NotificacionInternaRpt rpt = reportMng.GetDetailNotificacionAuditoriaReport(notificacion, _entity, CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(rpt);
                ReportViewer.ShowDialog();
            }
        }
        private void Imprimir_BT_Click(object sender, EventArgs e)
        {
            AuditoriaReportMng reportMng = new AuditoriaReportMng(AppContext.ActiveSchema);

            switch (_entity.TipoAsociado)
            {
            case (long)TipoNotificacionAsociado.COMUNICADO_AUDITORIA:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionAuditoriaReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            } break;

            case (long)TipoNotificacionAsociado.INFORME_DISCREPANCIAS:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            case (long)TipoNotificacionAsociado.INFORME_ACCIONES_CORRECTORAS:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            case (long)TipoNotificacionAsociado.INFORME_FIN_AUDITORIA:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionCierreDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            case (long)TipoNotificacionAsociado.SOLICITUD_AMPLIACION:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            case (long)TipoNotificacionAsociado.CONCESION_AMPLIACION:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            case (long)TipoNotificacionAsociado.DENEGACION_AMPLIACION:
            {
                NotificacionInternaRpt comunicado = reportMng.GetDetailNotificacionDiscrepanciasReport(EntityInfo, Auditoria.GetInfo(false), CompanyInfo.Get(AppContext.ActiveSchema.Oid, false));

                ReportViewer.SetReport(comunicado);
                ReportViewer.ShowDialog();
            }
            break;

            default:
                break;
            }
        }