Esempio n. 1
0
        // Update Job
        public ActionResult UpdateJob(int JobId)
        {
            var model = new JobUpdateViewModel
            {
                Job = _jobService.GetById(JobId),
            };

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Update(int JobId)
        {
            Job job = _jobService.GetById(JobId);
            JobUpdateViewModel model = new JobUpdateViewModel();

            model.Job       = job;
            model.CompanyID = job.CompanyID;

            return(View(model));
        }
Esempio n. 3
0
        public IActionResult UpdateJob(int id)
        {
            TempData["Active"] = "Job";
            var gtJob = _JobService.GetById(id);

            ViewBag.Urgencyler = new SelectList(_UrgencyService.GetAll(), "Id", "Description", gtJob.UrgencyId);
            JobUpdateViewModel model = new JobUpdateViewModel()
            {
                Description = gtJob.Description, ad = gtJob.Name, UrgencyId = gtJob.UrgencyId, Id = gtJob.ID
            };

            return(View(model));
        }
Esempio n. 4
0
        public IActionResult UpdateJob(JobUpdateViewModel model)
        {
            if (ModelState.IsValid)
            {
                _JobService.Update(new Job()
                {
                    ID          = model.Id,
                    Name        = model.ad,
                    Description = model.Description,
                    UrgencyId   = model.UrgencyId,
                    //Status = model.Status,
                    //Report = model.Report
                });
                return(RedirectToAction("Index"));
            }

            return(View(model));
        }