// GET: LoginRequest/Delete/5 public ActionResult Delete(int id) { vLoginRequest theRequest = db.vLoginRequests.Find(id); if (theRequest == null) { return(HttpNotFound()); } return(View(theRequest)); }
public ActionResult Create(vLoginRequest theRequest) { try { if (ModelState.IsValid) { db.vLoginRequests.Add(theRequest); db.SaveChanges(); return(RedirectToAction("Index")); } } catch (Exception) { ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator."); } return(View(theRequest)); }
public ActionResult Delete(vLoginRequest theRequest) { try { if (ModelState.IsValid) { db.vLoginRequests.Remove(theRequest); db.SaveChanges(); return(RedirectToAction("Index")); } } catch (Exception ex) { ModelState.AddModelError("", $"An error occurred: {ex.Message}"); } return(View(theRequest)); }
public ActionResult Edit(vLoginRequest theRequest) { throw new NotImplementedException(); }