public ResumeController(IResumeQuerier resumeQuerier, IJobQuerier jobQuerier, IDictionaryQuerier dictionaryQuerier, IUserQuerier userQuerier, JobManager jobManager, ResumeManager resumeManager, ResumeAuditSettingManager resumeAuditSettingManager, ConfigurationManager configurationManager, IConfiguration configuration, IEmailSender emailSender, IServiceProvider serviceProvider, IWebHostEnvironment webEnvironment, DictionaryManager dictionaryManager) : base(serviceProvider) { _resumeQuerier = resumeQuerier; _dictionaryQuerier = dictionaryQuerier; _jobQuerier = jobQuerier; _jobManager = jobManager; _resumeManager = resumeManager; _resumeAuditSettingManager = resumeAuditSettingManager; _configurationManager = configurationManager; _userQuerier = userQuerier; _emailSender = emailSender; _configuration = configuration; _dictionaryManager = dictionaryManager; _webEnvironment = webEnvironment; InitResumeSetting(); }
public ActionResult Index(string url) { List <Candidate> candidates = new List <Candidate>(); string message = String.Empty; if (!String.IsNullOrEmpty(url)) { if (ResumeManager.IfUrlExists(url)) { Log.For(ThisType).Info(" (!!!) START processing. Url: " + url); candidates = ResumeManager.GetCandidates(url); if (candidates == null || candidates.Count == 0) { message = MsgErrorGettingData; } else { DBManager.CreateTableIfNotExists(); DBManager.SaveCandidatesToDB(candidates); Log.For(ThisType).Info(" (!!!) FINISH processing. Url: " + url); message = url; } } else { message = MsgDeniedSite; } return(View("Info", (object)message)); } else { return(RedirectToAction("Index")); } }
public async Task <ActionResult> History() { var userId = User.Identity.GetUserId(); ViewBag.Resumes = await ResumeManager.GetAllEntities() .Where(e => e.RecieveTeacher.TeacherId == userId) .ToListAsync(); return(View()); }
public InterviewController( IInterviewQuerier interviewQuerier, IJobQuerier jobQuerier, IUserQuerier userQuerier, ResumeManager resumeManager, InterviewManager interviewManager, IServiceProvider serviceProvider) : base(serviceProvider) { _interviewQuerier = interviewQuerier; _jobQuerier = jobQuerier; _userQuerier = userQuerier; _resumeManager = resumeManager; _interviewManager = interviewManager; }
public static ResumeManagerModel ToModel(this ResumeManager entity) { if (entity == null) { throw new NullReferenceException("ResumeManager is null"); } return(new ResumeManagerModel() { Id = entity.Id, CreatedAt = entity.CreatedAt, ProfessionId = entity.ProfessionId, UserId = entity.UserId }); }
public InvestigationController(IServiceProvider serviceProvider, IInvestigationQuerier investigationQuerier, IJobQuerier jobQuerier, IUserQuerier userQuerier, IResumeQuerier resumeQuerier, ResumeManager resumeManager, InvestigationManager investigationManager) : base(serviceProvider) { _investigationQuerier = investigationQuerier; _jobQuerier = jobQuerier; _userQuerier = userQuerier; _resumeQuerier = resumeQuerier; _resumeManager = resumeManager; _investigationManager = investigationManager; }
public static ResumeManagerPrintModel ToPrintModel(this ResumeManager entity) { if (entity == null) { throw new NullReferenceException("ResumeManager is null"); } return(new ResumeManagerPrintModel() { Id = entity.Id, CreatedAt = entity.CreatedAt, Link = entity.Link, UserId = entity.UserId, Guid = entity.Guid }); }
private int PrepareFileList(IEnumerable <PictureFile.PictureFile> files, out List <PictureFile.PictureFile> pictureFiles) { var shownFiles = new List <PictureFile.PictureFile>(); var notShownFiles = new List <PictureFile.PictureFile>(); foreach (PictureFile.PictureFile file in files) { if (ResumeManager.IsShown(file)) { shownFiles.Add(file); } else { notShownFiles.Add(file); } } if (notShownFiles.Count == 0) { ResumeManager.SetToNotShown(shownFiles); notShownFiles = shownFiles; shownFiles = new List <PictureFile.PictureFile>(); } pictureFiles = new List <PictureFile.PictureFile>(); if (Shuffle) { pictureFiles.AddRange(shownFiles.GetShuffled()); pictureFiles.AddRange(notShownFiles.GetShuffled()); } else { pictureFiles.AddRange(shownFiles); pictureFiles.AddRange(notShownFiles); } return(shownFiles.Count); }
private void SetupGraphicsDeviceEvents() { // Find the IGraphicsDeviceSerive. graphicsDeviceService = Services.GetService(typeof(IGraphicsDeviceService)) as IGraphicsDeviceService; // If there is no graphics device service, don't go further as the whole Game would not work if (graphicsDeviceService == null) { throw new InvalidOperationException("Unable to create a IGraphicsDeviceService"); } if (graphicsDeviceService.GraphicsDevice == null) { throw new InvalidOperationException("Unable to find a GraphicsDevice instance"); } resumeManager = new ResumeManager(Services); graphicsDeviceService.DeviceCreated += graphicsDeviceService_DeviceCreated; graphicsDeviceService.DeviceResetting += graphicsDeviceService_DeviceResetting; graphicsDeviceService.DeviceReset += graphicsDeviceService_DeviceReset; graphicsDeviceService.DeviceDisposing += graphicsDeviceService_DeviceDisposing; }
private static void Main(string[] args) { // Make our console window pretty and fit the content, set title, and hide the cursor. Console.WindowHeight = 54; Console.Title = "Resume"; Console.CursorVisible = false; // Create new resume manager, it will automatically check for existing resumes in startup directory. string initErr; var resumeManager = new ResumeManager(out initErr); if (!string.IsNullOrEmpty(initErr)) { Console.WriteLine("[ERROR CREATING RESUME MANAGER]:\n{0}", initErr); } else { // Check if there are any resumes in memory. if (resumeManager.Resumes.Count <= 0) { resumeManager.AddResume(CurriculumVitae.Maxwolf()); Console.WriteLine("Added default resume."); } else { Console.WriteLine("Loaded {0}", ResumeManager.RESUME_FILE); } // Loop through has set of resumes and write them out to console. var resumeCount = 0; foreach (var resume in resumeManager.Resumes) { // Count resumes displayed, update console title. resumeCount++; Console.Title = $"Resume - {resume.Applicant.FirstName} {resume.Applicant.LastName} " + $"({resumeCount} of {resumeManager.Resumes.Count})"; // Print resume to screen. Console.Write(resume); // Change what we say based on how many resumes we are showing. Console.WriteLine(resumeManager.Resumes.Count > 1 ? "Press ANY KEY to show next resume..." : "Press ANY KEY save and close resume..."); // Wait for user input before showing next resume. Console.ReadKey(); } // Save loaded resumes to disk. string errText; if (!resumeManager.SaveResumes(out errText) || !string.IsNullOrEmpty(errText)) { Console.WriteLine("[ERROR SAVING RESUME JSON FILE]:\n{0}", errText); } else { Console.WriteLine("Saved {0} to disk in application startup folder.", ResumeManager.RESUME_FILE); } } }