public async Task <ActionResult <ResumeView> > GetOneResumeAsync(Guid resumeId) { ResumeView resumeView = await dbContext.Resumes .ProjectTo <ResumeView>(mapper.ConfigurationProvider) .SingleAsync(res => res.Id == resumeId); if (resumeView == null) { logger.LogDebug($"Can't find resume {resumeId}"); return(NotFound("Can't find resume")); } return(Ok(resumeView)); }
public IActionResult SearchResult(string filename, string key) { // DirectoryInfo mydir = new DirectoryInfo(@"C:/Users/BS049/source/repos/CV Parsing/Resume4/wwwroot/Updates"); DirectoryInfo mydir = new DirectoryInfo(@"./wwwroot/Updates"); string path = "./wwwroot/Updates/"; ResumeView model = new ResumeView(); int MaxMatch = 0; FileInfo[] f = mydir.GetFiles(); List <int> LengthList = new List <int>(); SearchResultView obj = new SearchResultView(); string filePath = path + filename; obj.Filename = filename; model.Text = Helper.GetText(filePath); model.Text = Helper.GetHtml(model.Text); obj.Len = model.Text.Length; obj.htmlText = LCS.SearchFinalResult(model.Text, key); return(Ok(obj)); }
public ActionResult <string> GetFileData(string fileName) { DirectoryInfo mydir = new DirectoryInfo(@"./wwwroot/Updates"); string path = "./wwwroot/Updates/"; string line = string.Empty; FileInfo[] f = mydir.GetFiles(); ResumeView model = new ResumeView(); foreach (FileInfo file in f) { if (file.Name == fileName) { string filePath = path + file.Name; model.Text = Helper.GetText(filePath); // model.Text = Helper.GetHtml(model.Text); } } return(Ok(new { fileName = fileName, text = model.Text })); }
void ReleaseDesignerOutlets() { if (CommentsView != null) { CommentsView.Dispose(); CommentsView = null; } if (CommentTextBox != null) { CommentTextBox.Dispose(); CommentTextBox = null; } if (CostLabel != null) { CostLabel.Dispose(); CostLabel = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DistanceLabel != null) { DistanceLabel.Dispose(); DistanceLabel = null; } if (DriverLabel != null) { DriverLabel.Dispose(); DriverLabel = null; } if (EndLabel != null) { EndLabel.Dispose(); EndLabel = null; } if (FromLabel != null) { FromLabel.Dispose(); FromLabel = null; } if (MakerLabel != null) { MakerLabel.Dispose(); MakerLabel = null; } if (ModelLabel != null) { ModelLabel.Dispose(); ModelLabel = null; } if (RateLabel != null) { RateLabel.Dispose(); RateLabel = null; } if (ResumeView != null) { ResumeView.Dispose(); ResumeView = null; } if (SegmentedControl != null) { SegmentedControl.Dispose(); SegmentedControl = null; } if (StartLabel != null) { StartLabel.Dispose(); StartLabel = null; } if (ToLabel != null) { ToLabel.Dispose(); ToLabel = null; } if (VehicleImage != null) { VehicleImage.Dispose(); VehicleImage = null; } }