private async Task CreateTechnicalExpertises(DocX doc, TechnicalExpertiseDto technicalExpertises) { string Headingtitle = "TECHNICAL EXPERTISES"; var p = doc.InsertParagraph(Headingtitle); p.StyleName = "Heading1"; p.FontSize(12); p.Font("Times new roman"); p.SpacingBefore(5); Formatting symbolFormatting = new Formatting(); symbolFormatting.FontFamily = new Xceed.Document.NET.Font("Symbol"); symbolFormatting.Size = 10; Formatting courierFormatting = new Formatting(); courierFormatting.FontFamily = new Xceed.Document.NET.Font("Courier New"); courierFormatting.Size = 10; char tickParent = (char)183; char tickChild = '\u25CB'; foreach (var grpSkill in technicalExpertises.GroupSkills) { doc.InsertParagraph().Append(tickParent.ToString(), symbolFormatting).Spacing(15).Append($"{grpSkill.Name}").FontSize(12).Bold().SpacingBefore(5).IndentationBefore = 20; foreach (var cvSkill in grpSkill.CVSkills) { doc.InsertParagraph().Append(tickChild.ToString(), courierFormatting).Spacing(15).Append($"{cvSkill.SkillName}").FontSize(12).SpacingBefore(5).IndentationBefore = 40; } } }
public async Task UpdateTechnicalExpertise(TechnicalExpertiseDto input) { if (AbpSession.UserId != input.UserId) { throw new UserFriendlyException(ErrorCodes.Forbidden.EditOtherProfile); } var dbCVSkills = WorkScope.GetRepo <CVSkills, long>(); List <long> listCurrentId = new List <long>(); foreach (var grs in input.GroupSkills) { var cvSkills = grs.CVSkills; foreach (var s in cvSkills) { listCurrentId.Add(await dbCVSkills.InsertOrUpdateAndGetIdAsync(new CVSkills { CvemployeeId = input.UserId, GroupSkillId = grs.GroupSkillId, Id = s.Id ?? 0, Level = s.Level, SkillId = s.SkillId, SkillName = s.SkillName })); } } await dbCVSkills.DeleteAsync(c => !listCurrentId.Contains(c.Id) && c.CvemployeeId == input.UserId); }