public ActionResult DeleteConfirmed(string id) { roysched roysched = db.royscheds.Find(id); db.royscheds.Remove(roysched); db.SaveChanges(); return RedirectToAction("Index"); }
public ActionResult DeleteConfirmed(string title_id, int royalty_id) { roysched roysched = db.roysched.Find(title_id, royalty_id); db.roysched.Remove(roysched); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched) { if (ModelState.IsValid) { db.Entry(roysched).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id); return(View(roysched)); }
public ActionResult Create([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched) { if (ModelState.IsValid) { db.roysched.Add(roysched); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id); return(View(roysched)); }
// GET: royscheds/Delete/5 public ActionResult Delete(string id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } roysched roysched = db.royscheds.Find(id); if (roysched == null) { return HttpNotFound(); } return View(roysched); }
// GET: royscheds/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } roysched roysched = db.royscheds.Find(id); if (roysched == null) { return(HttpNotFound()); } return(View(roysched)); }
// GET: royscheds/Edit/5 public ActionResult Edit(string id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } roysched roysched = db.royscheds.Find(id); if (roysched == null) { return HttpNotFound(); } ViewBag.title_id = new SelectList(db.titles, "title_id", "title1", roysched.title_id); return View(roysched); }
// GET: royscheds/Details/5 public ActionResult Details(string title_id, int royalty_id) { if (title_id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } roysched roysched = db.roysched.Find(title_id, royalty_id); if (roysched == null) { return(HttpNotFound()); } return(View(roysched)); }
public ActionResult DeleteConfirmed(string id) { roysched roysched = db.royscheds.Find(id); db.royscheds.Remove(roysched); try { db.SaveChanges(); } catch (Exception e) { return(RedirectToAction("../Home/Error")); } return(RedirectToAction("Index")); }
// GET: royscheds/Edit/5 public ActionResult Edit(string title_id, int royalty_id) { if (title_id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } roysched roysched = db.roysched.Find(title_id, royalty_id); if (roysched == null) { return(HttpNotFound()); } ViewBag.title_id = new SelectList(db.titles, "title_id", "title", roysched.title_id); return(View(roysched)); }
public ActionResult Create([Bind(Include = "title_id,lorange,hirange,royalty")] roysched roysched) { if (ModelState.IsValid) { db.royscheds.Add(roysched); try { db.SaveChanges(); } catch (Exception e) { return(RedirectToAction("../Home/Error")); } return(RedirectToAction("Index")); } ViewBag.title_id = new SelectList(db.titles, "title_id", "title1", roysched.title_id); return(View(roysched)); }