コード例 #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 Alumini.Core.UserPosting_Jobs UpdateJobs(int Jobid, int Status)
 {
     using (var context = _dbContextFactory.CreateConnection())
     {
         UserPosting_Jobs Jobs = context.UserPosting_Jobs.Where(x => x.Jobid == Jobid).FirstOrDefault();
         Jobs.Status    = Status;
         Jobs.UpdatedOn = DateTime.Now;
         context.SaveChanges();
         return(Jobs);
     }
 }
コード例 #3
0
 public Alumini.Core.UserPosting_Jobs Get(int id)
 {
     try
     {
         using (var context = _dbContextFactory.CreateConnection())
         {
             UserPosting_Jobs Jobs = context.UserPosting_Jobs.Where(x => x.Jobid == id && x.Status == 1).SingleOrDefault();
             return(Jobs);
         }
     }
     catch (SystemException ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 public Alumini.Core.UserPosting_Jobs UpdateMyPostedJobs(UserPosting_Jobs obj)
 {
     using (var context = _dbContextFactory.CreateConnection())
     {
         UserPosting_Jobs PostedJobs = context.UserPosting_Jobs.Where(x => x.Jobid == obj.Jobid && x.Status == 1).FirstOrDefault();
         PostedJobs.JobTitle           = obj.JobTitle;
         PostedJobs.ComanyName         = obj.ComanyName;
         PostedJobs.ComanyUrl          = obj.ComanyUrl;
         PostedJobs.ExperienceRequired = obj.ExperienceRequired;
         PostedJobs.Mobile             = obj.Mobile;
         PostedJobs.Email         = obj.Email;
         PostedJobs.Location      = obj.Location;
         PostedJobs.Skills        = obj.Skills;
         PostedJobs.Salary        = obj.Salary;
         PostedJobs.FunctionalId  = obj.FunctionalId;
         PostedJobs.Role          = obj.Role;
         PostedJobs.Qualification = obj.Qualification;
         PostedJobs.Description   = obj.Description;
         PostedJobs.UpdatedOn     = DateTime.Now;
         context.SaveChanges();
         return(PostedJobs);
     }
 }
コード例 #5
0
 public UserPosting_Jobs UpdateMyPostedJobs(UserPosting_Jobs obj)
 {
     return(_IEventCategoryRepo.UpdateMyPostedJobs(obj));
 }