예제 #1
0
        public ActionResult JobPosting(UserPosting_Jobs Jobs, HttpPostedFileBase File)
        {
            if (Session["UserId"] != null)
            {
                if (Jobs.Jobid != 0)
                {
                    Jobs.Userid    = Convert.ToInt64(Session["UserId"].ToString());
                    Jobs.UpdatedOn = DateTime.Now;
                    UserJobPostingservice.UpdateMyPostedJobs(Jobs);
                    TempData["Message"] = "Job details successfully Updated";
                    return(RedirectToAction("MyPostedJobs", "Jobs", new { area = "Faculty" }));
                }
                else
                {
                    var FilePath = "";
                    if (File != null)
                    {
                        var fileName = Path.GetFileName(File.FileName);
                        var path     = Path.Combine(Server.MapPath("~/UserPostingImages/" + fileName));
                        File.SaveAs(path);
                        FilePath = "/UserPostingImages/" + fileName;
                    }
                    Jobs.Userid    = Convert.ToInt64(Session["UserId"].ToString());
                    Jobs.CreatedOn = DateTime.Now;
                    Jobs.Status    = 0;
                    Jobs.Filepath  = FilePath;
                    UserJobPostingservice.Create(Jobs);
                    TempData["Message"] = "you successfully posted the job and awating for the admin approval..";
                }

                return(RedirectToAction("JobPosting", "Jobs", new { area = "Faculty" }));
            }
            return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" }));
        }
예제 #2
0
        public JsonResult UpdateJobs(int Jobid, int Status)
        {
            UserJobPostingservice.UpdateJobs(Jobid, Status);
            var data = UserJobPostingservice.GetPendingApprovals(2);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public JsonResult DeleteMyJob(int Jobid)
        {
            int Status = 3;

            UserJobPostingservice.UpdateJobs(Jobid, Status);
            var Data = UserJobPostingservice.GetJobs();

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
 public ActionResult ViewJobs()
 {
     if (Session["UserId"] != null)
     {
         var model = UserJobPostingservice.GetJobs();
         return(View(model));
     }
     return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" }));
 }
예제 #5
0
        public ActionResult SingleJob(int id)
        {
            JobsModel Jobs = new JobsModel()
            {
                singleJobs = UserJobPostingservice.GetJobsbyId(id)
            };

            return(View(Jobs));
        }
예제 #6
0
 public ActionResult MyPostedJobs()
 {
     if (Session["UserId"] != null)
     {
         var model = UserJobPostingservice.GetUserPosetdJobs(Convert.ToInt32(Session["UserId"].ToString()));
         return(View(model));
     }
     return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" }));
 }
예제 #7
0
 public ActionResult ViewJobs(string JobTitle, string ComapnyName, string Skills)
 {
     if (Session["UserId"] != null)
     {
         var model = UserJobPostingservice.GetJobsonserach(JobTitle, ComapnyName, Skills);
         return(View(model));
     }
     return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" }));
 }
예제 #8
0
 public ActionResult SingleJob(int id)
 {
     if (Session["UserId"] != null)
     {
         JobsModel Jobs = new JobsModel()
         {
             singleJobs = UserJobPostingservice.GetJobsbyId(id)
         };
         return(View(Jobs));
     }
     return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" }));
 }
예제 #9
0
        public ActionResult Index()
        {
            EventsModel Model = new EventsModel()
            {
                UserNews = NewsroomService.GetNews(),
                UserJobs = UserJobPostingservice.GetJobs().ToList().Take(6),

                DisplayHome = EventServices.GetEventsforHome()
            };

            return(View(Model));
        }
예제 #10
0
        public ActionResult JobDetails(int id)
        {
            var Jobs = UserJobPostingservice.Get(id);

            if (id != null)
            {
                Session["Jobid"] = id;
            }
            JobPosting Jobsposted = new JobPosting()
            {
                JobTitle = Jobs.JobTitle,
                JobId    = Jobs.Jobid
            };

            return(View(Jobsposted));
        }
예제 #11
0
        public ActionResult Index()
        {
            if (Session["UserId"] != null)
            {
                Session.Remove("UserId");
                return(RedirectToAction("Index", "Home", new { area = "" }));
            }
            EventsModel Model = new EventsModel()
            {
                UserNews    = NewsroomService.GetNews(),
                UserJobs    = UserJobPostingservice.GetJobs().ToList().Take(6),
                DisplayHome = EventServices.GetEventsforHome(),
                Activities  = GenericMethodsservices.GetActivities()
            };

            return(View(Model));
        }
예제 #12
0
        public ActionResult Jobs(int Status)
        {
            var data = UserJobPostingservice.GetPendingApprovals(Status);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #13
0
        public JsonResult JobsAutosearch(string JobTitle, int Status)
        {
            var Data = UserJobPostingservice.GetUserAutocomplete(JobTitle, Status);

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
예제 #14
0
        public JsonResult GetJobsonid(int id)
        {
            var data = UserJobPostingservice.GetJobsbyId(id);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #15
0
        public JsonResult GetUserpostedJobs()
        {
            var Data = UserJobPostingservice.GetUserPosetdJobs(Convert.ToInt32(Session["UserId"]));

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
예제 #16
0
        public JsonResult Jobs()
        {
            var Data = UserJobPostingservice.GetJobs();

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
예제 #17
0
        public JsonResult Myjobs()
        {
            var data = UserJobPostingservice.MyPostedJobs(Convert.ToInt32(Session["UserId"].ToString()));

            return(Json(data, JsonRequestBehavior.AllowGet));
        }