// GET: TypeJob/Create public ActionResult Create(int id) { var typejob = new TypeJob(); ViewBag.JobName = _unitOfWork.TypeJobsNameRepository.GetAll(); typejob.PersonId = id; return(View(typejob)); }
public ActionResult DeleteConfirmed(int id) { TypeJob typeJob = db.TypeJobs.Find(id); db.TypeJobs.Remove(typeJob); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(TypeJob job) { if (ModelState.IsValid) { _unitOfWork.TypeJobRepository.Edit(job); return(RedirectToAction("FullInformation", "Home", new { id = job.PersonId })); } ViewBag.JobName = _unitOfWork.TypeJobRepository.GetAll(); return(View(job)); }
public ActionResult Edit([Bind(Include = "type_id,type_name")] TypeJob typeJob) { if (ModelState.IsValid) { db.Entry(typeJob).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeJob)); }
public ActionResult Create([Bind(Include = "type_id,type_name")] TypeJob typeJob) { if (ModelState.IsValid) { db.TypeJobs.Add(typeJob); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeJob)); }
public IActionResult EditShipZone(TypeJob typeJob) { TypeJob ruleUpdate = _ctx.TypeJob.Find(typeJob.TypeJobNo); ruleUpdate.TypeJob1 = typeJob.TypeJob1; ruleUpdate.TypeJobDescription = typeJob.TypeJobDescription; _ctx.TypeJob.Update(ruleUpdate); _ctx.SaveChanges(); return(RedirectToAction("ShipZone")); }
// GET: Admin/TypeJobsAdmin/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TypeJob typeJob = db.TypeJobs.Find(id); if (typeJob == null) { return(HttpNotFound()); } return(View(typeJob)); }
public static void CategoryJob(AppDbContext dbContext) { var Type1 = new TypeJob() { Name = "Full Time" }; var Type2 = new TypeJob() { Name = "Remote" }; var Type3 = new TypeJob() { Name = "Part Time" }; dbContext.TypeJobs.Add(Type1); dbContext.TypeJobs.Add(Type2); dbContext.TypeJobs.Add(Type3); }
public PersonSearchModel() { TypeLanguage = new TypeLanguage(); LanguageLevel = new LanguageLevel(); TypeJob = new TypeJob(); }