示例#1
0
        public ActionResult CreateJobOffer(JobOfferModels jo)
        {
            try
            {
                JobOffer j = new JobOffer
                {
                    DateDeb          = jo.DateDeb,
                    DateFin          = jo.DateFin,
                    Experience       = jo.Experience,
                    Function         = jo.Function,
                    JobOfferDesrip   = jo.JobOfferDesrip,
                    JobOfferId       = jo.JobOfferId,
                    Poste_numb       = jo.Poste_numb,
                    Required_Profile = jo.Required_Profile
                };


                if (j.DateDeb < j.DateFin && j.DateDeb > DateTime.Now)
                {
                    Svo.Add(j);
                    Svo.Commit();
                }

                else
                {
                    TempData["msg"] = "<script>alert('Check the start and end date of the offer');</script>";
                }

                return(RedirectToAction("AllJobOffers"));
            }
            catch
            {
                return(View());
            }
        }
示例#2
0
        // GET: JobOffer/Details/5
        public ActionResult Details(int id)
        {
            JobOfferModels g   = new JobOfferModels();
            JobOffer       JBO = Svo.GetById(id);

            g.Experience       = JBO.Experience;
            g.DateDeb          = JBO.DateDeb;
            g.DateFin          = JBO.DateFin;
            g.Function         = JBO.Function;
            g.JobOfferDesrip   = JBO.JobOfferDesrip;
            g.Poste_numb       = JBO.Poste_numb;
            g.Required_Profile = JBO.Required_Profile;

            return(View(g));
        }
示例#3
0
        public ActionResult Edit(int id, JobOfferModels JBO)
        {
            JobOffer g = Svo.GetById(id);

            g.Experience       = JBO.Experience;
            g.DateDeb          = JBO.DateDeb;
            g.DateFin          = JBO.DateFin;
            g.Function         = JBO.Function;
            g.JobOfferDesrip   = JBO.JobOfferDesrip;
            g.Poste_numb       = JBO.Poste_numb;
            g.Required_Profile = JBO.Required_Profile;



            return(RedirectToAction("AllJobOffers"));
        }
示例#4
0
        // GET: JobOffer/Create
        public ActionResult CreateJobOffer()
        {
            JobOfferModels jp = new JobOfferModels();

            return(View(jp));
        }