public ActionResult DeleteConfirmed(int id) { tstTechNote tstTechNote = db.tstTechNotes.Find(id); db.tstTechNotes.Remove(tstTechNote); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,TechID,TicketID,Notation,NotationDate")] tstTechNote tstTechNote) { if (ModelState.IsValid) { db.Entry(tstTechNote).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TechID = new SelectList(db.tstEmployees, "ID", "Name", tstTechNote.TechID); ViewBag.TicketID = new SelectList(db.tstTickets, "ID", "TroubleDescription", tstTechNote.TicketID); return(View(tstTechNote)); }
// GET: tstTechNotes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tstTechNote tstTechNote = db.tstTechNotes.Find(id); if (tstTechNote == null) { return(HttpNotFound()); } return(View(tstTechNote)); }
// GET: tstTechNotes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tstTechNote tstTechNote = db.tstTechNotes.Find(id); if (tstTechNote == null) { return(HttpNotFound()); } ViewBag.TechID = new SelectList(db.tstEmployees, "ID", "Name", tstTechNote.TechID); ViewBag.TicketID = new SelectList(db.tstTickets, "ID", "TroubleDescription", tstTechNote.TicketID); return(View(tstTechNote)); }