Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #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));
        }