public ActionResult DeleteConfirmed(int id) { Staff_Clearance_Workflow staff_Clearance_Workflow = db.Staff_Clearance_Workflows.Find(id); db.Staff_Clearance_Workflows.Remove(staff_Clearance_Workflow); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Staff_Clearance_ID,Security_Workflow_ID,Is_Active,Entry_Date,Exit_Date,Created_On,Created_By,Modified_On,Modified_By")] Staff_Clearance_Workflow staff_Clearance_Workflow) { if (ModelState.IsValid) { db.Entry(staff_Clearance_Workflow).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DateTime = DateTime.Now; ViewBag.Security_Workflow_ID = new SelectList(db.Security_Workflows, "ID", "Workflow", staff_Clearance_Workflow.Security_Workflow_ID); ViewBag.Staff_Clearance_ID = new SelectList(db.Staff_Clearances, "ID", "Created_By", staff_Clearance_Workflow.Staff_Clearance_ID); return(View(staff_Clearance_Workflow)); }
// GET: Staff_Clearance_Workflow/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staff_Clearance_Workflow staff_Clearance_Workflow = db.Staff_Clearance_Workflows.Find(id); if (staff_Clearance_Workflow == null) { return(HttpNotFound()); } return(View(staff_Clearance_Workflow)); }
// GET: Staff_Clearance_Workflow/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Staff_Clearance_Workflow staff_Clearance_Workflow = db.Staff_Clearance_Workflows.Find(id); if (staff_Clearance_Workflow == null) { return(HttpNotFound()); } ViewBag.DateTime = DateTime.Now; ViewBag.Security_Workflow_ID = new SelectList(db.Security_Workflows, "ID", "Workflow", staff_Clearance_Workflow.Security_Workflow_ID); ViewBag.Staff_Clearance_ID = new SelectList(db.Staff_Clearances, "ID", "Created_By", staff_Clearance_Workflow.Staff_Clearance_ID); return(View(staff_Clearance_Workflow)); }