コード例 #1
0
        public async Task <string> ExportCVFake(MyProfileDto myProfileDto)
        {
            var fileName = $"CV_{myProfileDto.EmployeeInfo.Surname}{myProfileDto.EmployeeInfo.Name}_{myProfileDto.EmployeeInfo.UserId}";
            var path     = _exportDocService.SetLinkForSaveFile(fileName);
            var doc      = DocX.Create(path);

            doc.SetDefaultFont(new Xceed.Document.NET.Font("Times new roman"));
            CreateHeaderAndFooter(doc);

            Formatting formatting = new Formatting();

            formatting.Bold = true;
            formatting.Size = 14;

            doc.InsertParagraph("Professional Resume", false, formatting).SpacingBefore(5).Alignment = Alignment.right;
            doc.InsertParagraph($"Last updated: {DateTime.Now.ToString("dd MMMM yyyy", new System.Globalization.CultureInfo("en-US"))}").FontSize(12).SpacingBefore(5).Alignment = Alignment.right;

            CreateContactDetails(doc, myProfileDto.EmployeeInfo);
            doc.InsertParagraph().SpacingAfter(20);
            await CreateEducationBackground(doc, myProfileDto.EducationBackGround, myProfileDto.isHiddenYear);

            doc.InsertParagraph().SpacingAfter(20);
            await CreateTechnicalExpertises(doc, myProfileDto.TechnicalExpertises);

            doc.InsertParagraph().SpacingAfter(20);
            await CreatePersonalAtributes(doc, myProfileDto.PersonalAttributes);

            doc.InsertParagraph().SpacingAfter(20);
            await CreateWorkingExperiences(doc, myProfileDto.WorkingExperiences);

            doc.Save();

            var fileDownloadName = _exportDocService.GetFileDownLoadType(path, fileName, myProfileDto.typeOffile);

            return(fileDownloadName);
        }
コード例 #2
0
ファイル: ProfileViewVm.cs プロジェクト: BitArrow/CoffeeIn
 public async void LoadProfile()
 {
     Profile = await _coffeeService.GetProfile();
 }