示例#1
0
        public async Task <ActionResult> BookmarkJob(int jobId)
        {
            var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId()));

            using (JobSeekerBLL jsbll = new JobSeekerBLL())
            {
                await jsbll.BookmarkJob(jobSeekerUser.JobSeekerID.Value, jobId);

                return(RedirectToAction("Index"));
            }
        }
示例#2
0
        public async Task <ActionResult> ApplyConfirmed(int id)
        {
            var jobSeekerUser = (JobSeekerUser)(await UserManager.FindByIdAsync(User.Identity.GetUserId()));

            using (JobSeekerBLL jsbll = new JobSeekerBLL())
            {
                var application = await jsbll.GetApplication(jobSeekerUser.JobSeekerID.Value, id);

                if (application == null)
                {
                    await jsbll.Apply(jobSeekerUser.JobSeekerID.Value, id);
                }
            }
            return(RedirectToAction("Index"));
        }