public ActionResult ApplyForJob(JobViewModel model)
        {
            if (!Navigator.IsUserLoggedIn(Session))
            {
                @ViewBag.Message = "Sorry! You need to login to view this page.";
                return View("Message");
                //return RedirectToAction("Login", "Account");
            }
            else if (!Navigator.UserRoleValidation(Session, "candidate"))
            {
                @ViewBag.Message = "Access Denied !   You are not allowed to visit this page.";
                return View("Message");
                //return RedirectToAction("Login", "Account");
            }

            User user = (User)Session["user"];
            CandidateDAL.ApplyForJobs(model.selectedJobs, user.user_id);

            return View();
        }
        public ActionResult ViewJobDetails()
        {
            if (!Navigator.IsUserLoggedIn(Session))
            {
                @ViewBag.Message = "Sorry! You need to login to view this page.";
                return View("Message");
                //return RedirectToAction("Login", "Account");
            }
            else if (!Navigator.UserRoleValidation(Session, "candidate"))
            {
                @ViewBag.Message = "Access Denied !   You are not allowed to visit this page.";
                return View("Message");
                //return RedirectToAction("Login", "Account");
            }

            User user = (User)Session["user"];

            CandidateModel candidate = new CandidateModel();
            candidate = CandidateDAL.GetCandidateDetails(user.user_id);
            candidate.experienceDetails = CandidateDAL.GetCandidateExperienceDetails(user.user_id);

            int totalExperience = 0;
            foreach (var item in candidate.experienceDetails)
            {
                totalExperience += item.experience;
            }

            JobViewModel jobViewModel = new JobViewModel();
            jobViewModel.jobs = CandidateDAL.GetApplicableJobs(user.user_id);;
            jobViewModel.qualifications = CandidateDAL.GetQualificationsIdToName();
            jobViewModel.candidateUgQualification = candidate.ugQualifications;
            jobViewModel.candidatePgQualification = candidate.pgQualifications;
            jobViewModel.totalExperience = totalExperience;
            jobViewModel.jobsAlreadyApplied = CandidateDAL.GetNumJobsAppliedFor(user.user_id);
            jobViewModel.appliedJobs = CandidateDAL.GetAppliedJobs(user.user_id);

            return View(jobViewModel);
        }