Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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 }));
        }
Пример #4
0
 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;
     }
 }