public ActionResult DeleteConfirmed(int id) { hWorkType hWorkType = db.hWorkType.Find(id); db.hWorkType.Remove(hWorkType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "WorkTypeId,Description,SkillId")] hWorkType hWorkType) { if (ModelState.IsValid) { db.Entry(hWorkType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SkillId = new SelectList(db.hSkill, "SkillId", "Description", hWorkType.SkillId); return(View(hWorkType)); }
public ActionResult Create([Bind(Include = "WorkTypeId,Description,SkillId")] hWorkType hWorkType) { if (ModelState.IsValid) { db.hWorkType.Add(hWorkType); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SkillId = new SelectList(db.hSkill, "SkillId", "Description", hWorkType.SkillId); return(View(hWorkType)); }
// GET: hWorkTypes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } hWorkType hWorkType = db.hWorkType.Find(id); if (hWorkType == null) { return(HttpNotFound()); } return(View(hWorkType)); }
// GET: hWorkTypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } hWorkType hWorkType = db.hWorkType.Find(id); if (hWorkType == null) { return(HttpNotFound()); } ViewBag.SkillId = new SelectList(db.hSkill, "SkillId", "Description", hWorkType.SkillId); return(View(hWorkType)); }