Exemplo n.º 1
0
        public ActionResult PostYourRequirement(PostYourRequirement candidateViewModel)
        {
            ResponseOut responseOut = new ResponseOut();

            ICandidateBL candidateBL = new CandidateEngine();

            try
            {
                if (candidateViewModel != null)
                {
                    int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);

                    responseOut = candidateBL.PostRequirement(candidateViewModel, user_id);
                }
                else
                {
                    responseOut.message = ActionMessage.ProbleminData;
                    responseOut.status  = ActionStatus.Fail;
                }
            }
            catch (Exception ex)
            {
                Log.Error("Error in Home Controller/PostYourRequirement", ex);

                responseOut.message = ActionMessage.ApplicationException;
                responseOut.status  = ActionStatus.Fail;
            }
            return(Json(responseOut, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public PartialViewResult GetSingleApprovedRequirement(int post_id)
        {
            PostYourRequirement requirementDetail = new PostYourRequirement();
            ICandidateBL        candidateBL       = new CandidateEngine();

            try
            {
                requirementDetail = candidateBL.GetSingleApprovedRequirement(post_id);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(PartialView(requirementDetail));
        }
Exemplo n.º 3
0
        public ActionResult GetAllLeads(string requirement = null, string status = null)
        {
            List <PostYourRequirement> requirementList = new List <PostYourRequirement>();
            ICandidateBL candidateBL = new CandidateEngine();

            try
            {
                int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                requirementList = candidateBL.GetApprovedRequirements(user_id, requirement, status);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(PartialView(requirementList));
        }
Exemplo n.º 4
0
        public ActionResult PostedRequirements()
        {
            List <PostYourRequirement> postedRequirements = new List <PostYourRequirement>();
            ICandidateBL candidateBL = new CandidateEngine();

            try
            {
                int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                postedRequirements = candidateBL.GetAllPostedRequirement(user_id);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View(postedRequirements));
        }
Exemplo n.º 5
0
        public ActionResult SentInterests()
        {
            List <InterestedToCandidateViewModel> interestedUserList = new List <InterestedToCandidateViewModel>();
            ICandidateBL candidateBL = new CandidateEngine();

            try
            {
                int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                interestedUserList = candidateBL.GetInterestedUsers(user_id);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View(interestedUserList));
        }
Exemplo n.º 6
0
        public ActionResult CandidateProfileList(string[] title = null, string locality = null, int?experience = null, string sort_by_level = null, string sort_by_availability = null, string sort_by_new_old = null, string sort_by_profile_pic = null, string job_type = null)
        {
            List <CandidatesListViewModel> candidatesResultSet = new List <CandidatesListViewModel>();
            ICandidateBL candidateBL = new CandidateEngine();

            try
            {
                int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);
                candidatesResultSet = candidateBL.GetCandidatesList(title, locality, experience, user_id, sort_by_level, sort_by_availability, sort_by_new_old, sort_by_profile_pic, job_type);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(PartialView(candidatesResultSet));
        }
Exemplo n.º 7
0
        public ActionResult AddUpdateCandidateProfile(CandidateProfile data)
        {
            ICandidateBL candidateBL = new CandidateEngine();
            ResponseOut  responseOut = new ResponseOut();

            try
            {
                responseOut = candidateBL.AddUpdateCandidateProfile(data);
            }
            catch (Exception ex)
            {
                Log.Error("Error in CandidateController/AddUpdateCandidateProfile", ex);
                responseOut.message = ActionMessage.ApplicationException;
                responseOut.status  = ActionStatus.Fail;
            }
            return(Json(responseOut, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 8
0
        public JsonResult GetCandidateProfile(int?id = null)
        {
            CandidateProfile candidate;
            ICandidateBL     candidateBL = new CandidateEngine();
            int user_id = Convert.ToInt32(HttpContext.Session[SessionKey.CurrentUserID]);

            if (id != null && id != 0)
            {
                user_id = Convert.ToInt32(id);
            }
            try
            {
                candidate       = candidateBL.GetCandidateProfile(user_id);
                ViewBag.user_id = user_id;
            }
            catch (Exception ex)
            {
                Log.Error("Error in CandidateController/GetCandidateProfile", ex);
                throw ex;
            }
            return(Json(candidate, JsonRequestBehavior.AllowGet));
        }