public ActionResult DeleteConfirmed(int id) { Staff_Position staff_Position = db.Staff_Positions.Find(id); db.Staff_Positions.Remove(staff_Position); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: Staff_Position/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staff_Position staff_Position = db.Staff_Positions.Find(id); if (staff_Position == null) { return(HttpNotFound()); } return(View(staff_Position)); }
public ActionResult Edit([Bind(Include = "Staff_ID,Contract_Position_ID,IsActive,Planned_Start_Date,Active_Start_Date,Active_End_Date,Telework_Agreement_ID,Resume_Status_ID,Is_Resume_Compliant,Is_LCAT_Compliant,Compliance_Notes,Email_Address,Desk_Phone,Cell_Phone,Created_On,Created_By,Modified_On,Modified_By")] Staff_Position staff_Position) { if (ModelState.IsValid) { db.Entry(staff_Position).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DateTime = DateTime.Now; ViewBag.Resume_Status_ID = new SelectList(db.Adm_Resume_Status, "ID", "Status", staff_Position.Resume_Status_ID); ViewBag.Contract_Position_ID = new SelectList(db.Contract_Positions, "ID", "Contract_WBS_ID", staff_Position.Contract_Position_ID); ViewBag.Telework_Agreement_ID = new SelectList(db.Ref_Telework_Agreements, "ID", "Telework_Agreement", staff_Position.Telework_Agreement_ID); ViewBag.Staff_ID = new SelectList(db.Staffs, "ID", "Staff_Name", staff_Position.Staff_ID); return(View(staff_Position)); }
// GET: Staff_Position/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staff_Position staff_Position = db.Staff_Positions.Find(id); if (staff_Position == null) { return(HttpNotFound()); } ViewBag.DateTime = DateTime.Now; ViewBag.Resume_Status_ID = new SelectList(db.Adm_Resume_Status, "ID", "Status", staff_Position.Resume_Status_ID); ViewBag.Contract_Position_ID = new SelectList(db.Contract_Positions, "ID", "Contract_WBS_ID", staff_Position.Contract_Position_ID); ViewBag.Telework_Agreement_ID = new SelectList(db.Ref_Telework_Agreements, "ID", "Telework_Agreement", staff_Position.Telework_Agreement_ID); ViewBag.Staff_ID = new SelectList(db.Staffs, "ID", "Staff_Name", staff_Position.Staff_ID); return(View(staff_Position)); }