public ActionResult DeleteConfirmed(int id) { try { UserInputs60Hz userInputs60Hz = db.userInputs60Hz.Find(id); db.userInputs60Hz.Remove(userInputs60Hz); db.SaveChanges(); return(RedirectToAction("Index")); } catch (Exception e) { DataLink.LogError(e); throw; } }
public ActionResult Edit([Bind(Include = "Id,TransSize,Impedance,SCC,FaultClearing,Voltage,FreeAir,IPAddress")] UserInputs60Hz userInputs60Hz) { try { if (ModelState.IsValid) { db.Entry(userInputs60Hz).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userInputs60Hz)); } catch (Exception e) { DataLink.LogError(e); throw; } }
// ------------------------------- These are the important actionresults// // GET: UserInputs60Hz/Details/5 public ActionResult Details(int?id) { try { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UserInputs60Hz userInputs60Hz = db.userInputs60Hz.Find(id); if (userInputs60Hz == null) { return(HttpNotFound()); } return(View(userInputs60Hz)); } catch (Exception e) { DataLink.LogError(e); throw; } }