Ejemplo n.º 1
0
        public ActionResult Jobs(int[] skillsId, string keyWords, int priceFrom = 0)
        {
            int[] employeeSkills = null;

            if (User.Identity.IsAuthenticated)
            {
                string userId         = User.Identity.GetUserId();
                bool   employeeExists = _employeeService.EmployeeProfileExists(userId);

                if (employeeExists)
                {
                    var employee = _employeeService.FindEmployee(userId);
                    employeeSkills = employee.Skills.Select(p => p.Id).ToArray();
                }
            }

            var jobs = _jobService.FindRelevantJobs(skillsId, keyWords, priceFrom, employeeSkills);

            return(Json(jobs));
        }
Ejemplo n.º 2
0
        public ActionResult ProfileExists(string userId)
        {
            bool exists = _employeeService.EmployeeProfileExists(userId);

            return(Json(exists));
        }