Beispiel #1
0
 public IActionResult JobPosting()
 {
     try
     {
         string msg = Convert.ToString(TempData["msg"]);
         if (msg != "" || msg != null)
         {
             ViewData["SuccessMessage"] = msg;
         }
         ViewBag.JobTitle        = jobpastHandler.GetJobTitleDetails();
         ViewBag.JobIndustryArea = jobpastHandler.GetJobIndustryAreaDetails();
         //ViewBag.Gender = jobpastHandler.GetGenderListDetail();
         ViewBag.EmploymentStatus = jobpastHandler.GetJobJobEmploymentStatusDetails();
         ViewBag.EmploymentType   = jobpastHandler.GetJobJobEmploTypeDetails();
         ViewBag.Country          = jobpastHandler.GetCountryDetails();
         ViewBag.JobTypes         = jobpastHandler.GetJobTypes();
         return(View());
     }
     catch (DataNotFound ex)
     {
         Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(JobManagementController), ex);
         ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
     }
     return(View());
 }
Beispiel #2
0
 public IActionResult Profile()
 {
     try
     {
         ViewBag.JobIndustryArea  = jobpastHandler.GetJobIndustryAreaDetails();
         ViewBag.EmploymentStatus = jobpastHandler.GetJobJobEmploymentStatusDetails();
         ViewBag.Country          = jobpastHandler.GetCountryDetails();
         ViewBag.Coursecategory   = jobpastHandler.GetCourseCategory();
         ViewBag.JobTypes         = userProfileHandler.GetJobTypes();
         ViewBag.AllJobTitle      = jobpastHandler.GetJobTitleDetails();
     }
     catch (DataNotFound ex)
     {
         Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(JobSeekerManagementController), ex);
         ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
     }
     catch (InvalidUserCredentialsException ex)
     {
         Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(JobSeekerManagementController), ex);
         ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
     }
     return(View());
 }
        public IActionResult AdvanceResumeSearch()
        {
            var user = HttpContext.Session.Get <UserViewModel>(Constants.SessionKeyUserInfo);

            user                       = user ?? new UserViewModel();
            ViewBag.JobTitle           = jobpastHandler.GetJobTitleDetails();
            ViewBag.JobIndustryArea    = jobpastHandler.GetJobIndustryAreaDetails();
            ViewBag.EmploymentStatus   = jobpastHandler.GetJobJobEmploymentStatusDetails();
            ViewBag.EmploymentType     = jobpastHandler.GetJobJobEmploTypeDetails();
            ViewBag.JobTypes           = jobpastHandler.GetJobTypes();
            ViewBag.CityData           = searchresumehandler.GetCityList();
            ViewBag.GenderData         = searchresumehandler.GetGenders();
            ViewBag.EmployersData      = searchresumehandler.GetEmployers(true);
            ViewBag.AdvanceSearchStats = searchresumehandler.AdvanceSearchStates(user.UserId);
            return(View());
        }
Beispiel #4
0
        public IActionResult Index()
        {
            //try
            //{
            ViewBag.JobIndustryArea         = _jobpastHandler.GetJobIndustryAreaDetails();
            ViewBag.AllJobRoles             = _homeHandler.GetAllJobRoles();
            ViewBag.PopulerSearchesCategory = _homeHandler.PopulerSearchesCategory();
            ViewBag.PopulerSearchesCity     = _homeHandler.PopulerSearchesCity();
            ViewBag.TopEmployer             = _homeHandler.TopEmployer();
            List <SearchJobListViewModel> featurejobs = _homeHandler.GetFeaturedJobs();

            featurejobs = featurejobs.OrderBy(o => o.FeaturedJobDisplayOrder).ToList();
            var user = HttpContext.Session.Get <UserViewModel>(Constants.SessionKeyUserInfo);

            if (user != null)
            {
                List <int> appliedjobs = _homeHandler.GetAplliedJobs(user.UserId);
                for (int i = 0; i < featurejobs.Count; i++)
                {
                    //getting the all the jobs applied by user only if the user logged in
                    if (user.UserId != 0 && appliedjobs.Count > 0)
                    {
                        featurejobs[i].IsApplied = appliedjobs.Any(aj => aj == featurejobs[i].JobPostId);
                    }
                }
                ViewBag.FeaturedJobs = featurejobs;
            }
            else
            {
                ViewBag.FeaturedJobs = featurejobs;
            }

            List <SearchJobListViewModel> recentJobs = _homeHandler.GetRecentJobs();

            recentJobs = recentJobs.OrderBy(o => o.FeaturedJobDisplayOrder).ToList();
            if (user != null)
            {
                List <int> appliedjobs = _homeHandler.GetAplliedJobs(user.UserId);
                for (int i = 0; i < recentJobs.Count; i++)
                {
                    //getting the all the jobs applied by user only if the user logged in
                    if (user.UserId != 0 && recentJobs.Count > 0)
                    {
                        recentJobs[i].IsApplied = appliedjobs.Any(aj => aj == recentJobs[i].JobPostId);
                    }
                }
                ViewBag.RecentJobs = recentJobs;
            }
            else
            {
                ViewBag.RecentJobs = recentJobs;
            }

            List <SearchJobListViewModel> walkinJobs = _homeHandler.GetWalkInsJobs();

            ViewBag.WalkinJobs = walkinJobs;

            //    //ViewBag.City = homeHandler.GetCityList();
            //}
            //catch (DataNotFound ex)
            //{
            //    Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(HomeController), ex);
            //    ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
            //}
            return(View());
        }
        public IActionResult Index()
        {
            try
            {
                ViewBag.JobIndustryArea         = _jobpastHandler.GetJobIndustryAreaDetails();
                ViewBag.AllJobRoles             = _homeHandler.GetAllJobRoles();
                ViewBag.PopulerSearchesCategory = _homeHandler.PopulerSearchesCategory();
                ViewBag.PopulerSearchesCity     = _homeHandler.PopulerSearchesCity();
                ViewBag.TopEmployer             = _homeHandler.TopEmployer();
                List <SearchJobListViewModel> featurejobs = _homeHandler.GetFeaturedJobs();
                featurejobs = featurejobs.OrderBy(o => o.FeaturedJobDisplayOrder).ToList();
                var user = HttpContext.Session.Get <UserViewModel>(Constants.SessionKeyUserInfo);
                if (user != null)
                {
                    List <int> appliedjobs = _homeHandler.GetAplliedJobs(user.UserId);
                    for (int i = 0; i < featurejobs.Count; i++)
                    {
                        //getting the all the jobs applied by user only if the user logged in
                        if (user.UserId != 0 && appliedjobs.Count > 0)
                        {
                            featurejobs[i].IsApplied = appliedjobs.Any(aj => aj == featurejobs[i].JobPostId);
                        }
                    }
                    ViewBag.FeaturedJobs = featurejobs;
                }
                else
                {
                    ViewBag.FeaturedJobs = featurejobs;
                }

                List <SearchJobListViewModel> recentJobs = _homeHandler.GetRecentJobs();
                recentJobs = recentJobs.OrderBy(o => o.FeaturedJobDisplayOrder).ToList();
                if (user != null)
                {
                    List <int> appliedjobs = _homeHandler.GetAplliedJobs(user.UserId);
                    for (int i = 0; i < recentJobs.Count; i++)
                    {
                        //getting the all the jobs applied by user only if the user logged in
                        if (user.UserId != 0 && recentJobs.Count > 0)
                        {
                            recentJobs[i].IsApplied = appliedjobs.Any(aj => aj == recentJobs[i].JobPostId);
                        }
                    }
                    ViewBag.RecentJobs = recentJobs;
                }
                else
                {
                    ViewBag.RecentJobs = recentJobs;
                }

                List <SearchJobListViewModel> walkinJobs = _homeHandler.GetWalkInsJobs();
                ViewBag.WalkinJobs        = walkinJobs;
                ViewBag.Comment           = _homeHandler.GetSuccussStory();
                ViewBag.SuccessStoryVideo = _homeHandler.GetSuccussStoryVideos();

                //    //ViewBag.City = homeHandler.GetCityList();

                ViewBag.Section1 = _advertisementsHandler.GetAllData(1).OrderBy(o => o.Order).ToList();
                ViewBag.Section2 = _advertisementsHandler.GetAllData(2).OrderBy(o => o.Order).ToList();
                var ViewLabel = _configuration["LabelCount:Enable"];
                if (ViewLabel == "True")
                {
                    ViewBag.LabelCount = _homeHandler.GetCounterLabelData();
                }
            }
            catch (DataNotFound ex)
            {
                Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(HomeController), ex);
                ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
            }
            catch (Exception ex)
            {
                Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, 0, typeof(HomeController), ex);
                ModelState.AddModelError("ErrorMessage", string.Format("{0}", ex.Message));
            }
            return(View());
        }