Ejemplo n.º 1
0
        //Override FindView to load PdfView
        protected override ViewEngineResult FindView(ControllerContext context)
        {
            var result = base.FindView(context);
            if (result.View == null)
                return result;

            var pdfView = new PdfView(result);
            return new ViewEngineResult(pdfView, pdfView);
        }
Ejemplo n.º 2
0
        //Override FindView to load PdfView
        protected override ViewEngineResult FindView(ControllerContext context)
        {
            var result = base.FindView(context);
            if (result.View == null)
                return result;

            var pdfView = new PdfView(result);
            return new ViewEngineResult(pdfView, pdfView);
        }
Ejemplo n.º 3
0
        protected override ViewEngineResult FindView(
            ControllerContext context)
        {
            ViewEngineResult result = base.FindView(context);

            if (result.View == null)
            {
                return(result);
            }

            PdfView pdfView = new PdfView(result);

            return(new ViewEngineResult(pdfView, pdfView));
        }
Ejemplo n.º 4
0
        //Override FindView to load PdfView
        protected override ViewEngineResult FindView(ControllerContext context)
        {
            var result = base.FindView(context);

            if (result.View == null)
            {
                return(result);
            }

            var pdfView = new PdfView(result);

            pdfView.Title = this.Title;
            if (string.IsNullOrEmpty(this.Title) && this.ViewBag.Title != null)
            {
                pdfView.Title = string.Format("{0}", this.ViewBag.Title);
            }
            pdfView.OfficeName = this.OfficeName;
            return(new ViewEngineResult(pdfView, pdfView));
        }