Пример #1
0
        //aca se debe resolver el generador con un patron de diseño.
        //CGInfoActividades oGenerador = new CGInfoActividades();
        public void ProcessRequest(HttpContext context)
        {
            CGGenActa oGenerador ;
            if (context.Request.QueryString["idacta"] == "4032")
            {
                oGenerador = new CGGenActaInicio();
            }
            else {
                oGenerador = new CGActaParcial();
            }

            oGenerador.IdDocumento = context.Request.QueryString["idacta"];
            if (isValido())
            {
                byte[] Documento = oGenerador.imprimir();
                if (Documento != null)
                {
                    string Adjunto = String.Format("inline; filename=Documento_{0}.pdf", oGenerador.IdDocumento.ToString());
                    context.Response.AddHeader("content-disposition", Adjunto);
                    context.Response.ContentType = "application/pdf";
                    context.Response.BinaryWrite(Documento);
                    context.Response.End();
                }
                else {
                    context.Response.Write(oGenerador.MsgWord);
                    context.Response.End();
                }
            }
            else {
                context.Response.Write("No se especifico N° de Acta");
                context.Response.End();
            }
        }
Пример #2
0
        public void mostrar()
        {
            CGActaParcial oGenerador = new CGActaParcial();
            oGenerador.IdDocumento = "4022";
            ReportDataSource rds = new ReportDataSource();
            rds.Name = "datosActa";

            rds.Value = oGenerador.GetActa();
            rv.LocalReport.DataSources.Clear();
            rv.LocalReport.DataSources.Add(rds);
            rv.LocalReport.Refresh();
        }
Пример #3
0
 /// <summary>
 /// Prueba de Report
 /// </summary>
 /// <returns></returns>
 public List<vDocActasParcial> ActaParcial() {
     CGActaParcial cg = new CGActaParcial();
     return cg.GetActa();
 }