public ActionResult DeleteConfirmed(int id) { TestProfileSegment testProfileSegment = db.TestProfileSegments.Find(id); string profileId = testProfileSegment.ProfileId; db.TestProfileSegments.Remove(testProfileSegment); db.SaveChanges(); return(RedirectToAction("Index", new { profileId = profileId })); }
public ActionResult Edit([Bind(Include = "Id,ProfileId,SegmentSeqNum,ActionId,CommentAnnotation,DateOfCertifiedRecord,DriversLocationDesc,DurationSeconds,MPH")] TestProfileSegment testProfileSegment) { if (ModelState.IsValid) { db.Entry(testProfileSegment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { profileId = testProfileSegment.ProfileId })); } ViewBag.ActionsList = new SelectList(db.Actions, "ActionId", "ActionDesc"); return(View(testProfileSegment)); }
// GET: TestProfileSegments/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TestProfileSegment testProfileSegment = db.TestProfileSegments.Find(id); if (testProfileSegment == null) { return(HttpNotFound()); } return(View(testProfileSegment)); }
// GET: TestProfileSegments/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TestProfileSegment testProfileSegment = db.TestProfileSegments.Find(id); if (testProfileSegment == null) { return(HttpNotFound()); } ViewBag.ActionsList = new SelectList(db.Actions, "ActionId", "ActionDesc"); return(View(testProfileSegment)); }