Example #1
0
        public FileStreamResult ResumePdfFile()
        {
            var htmlView       = new StringBuilder();
            var currentCulture = Thread.CurrentThread.CurrentCulture;

            var contacts = new Contacts(currentCulture);

            htmlView.AppendLine(this.RenderView("ContactsPdfView", contacts));

            var targetDescription = new TargetDescription(currentCulture);

            htmlView.AppendLine(this.RenderView("TargetDescriptionView", targetDescription));

            var education = new Education(currentCulture);

            htmlView.AppendLine(this.RenderView("EducationPdfView", education));

            var stages = new Stages(currentCulture);

            htmlView.AppendLine(this.RenderView("StagesPdfView", stages));

            var skillsAndAbilities = new SkillsAndAbilities(currentCulture);

            htmlView.AppendLine(this.RenderView("SkillsAndAbilitiesPdfView", skillsAndAbilities));

            var aboutMe = new AboutMe(currentCulture);

            htmlView.AppendLine(this.RenderView("AboutMePdfView", aboutMe));

            var pdfArray = PdfSharpConvert(htmlView.ToString());

            var pdfStream        = new MemoryStream(pdfArray);
            var fileStreamResult = new FileStreamResult(pdfStream, "application/pdf")
            {
                FileDownloadName = "DenisKosolapov.pdf"
            };

            return(fileStreamResult);
        }
Example #2
0
        public ViewResult SkillsAndAbilitiesView()
        {
            var skillsAndAbilities = new SkillsAndAbilities();

            return(View(skillsAndAbilities));
        }