public ActionResult DeleteConfirmed(int id) { PUBLISHER pUBLISHER = db.PUBLISHERs.Find(id); db.PUBLISHERs.Remove(pUBLISHER); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PUBLISHERNAME,PUBLISHERLINK")] PUBLISHER pUBLISHER) { if (ModelState.IsValid) { db.Entry(pUBLISHER).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pUBLISHER)); }
public ActionResult Edit([Bind(Include = "ID,PublicationTypeId,NAME,ADDRESS,EMAIL,CONTACT_NO")] PUBLISHER pUBLISHER) { if (ModelState.IsValid) { db.Entry(pUBLISHER).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PublicationTypeId = new SelectList(db.PublicationTypes, "ID", "NAME", pUBLISHER.PublicationTypeId); return(View(pUBLISHER)); }
public ActionResult Create([Bind(Include = "PUBLISHERNAME,PUBLISHERLINK")] PUBLISHER pUBLISHER) { if (ModelState.IsValid) { db.PUBLISHER.Add(pUBLISHER); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pUBLISHER)); }
// GET: PUBLISHERs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PUBLISHER pUBLISHER = db.PUBLISHERs.Find(id); if (pUBLISHER == null) { return(HttpNotFound()); } return(View(pUBLISHER)); }
// GET: PUBLISHERs/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PUBLISHER pUBLISHER = db.PUBLISHER.Find(id); if (pUBLISHER == null) { return(HttpNotFound()); } return(View(pUBLISHER)); }
// GET: PUBLISHERs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PUBLISHER pUBLISHER = db.PUBLISHERs.Find(id); if (pUBLISHER == null) { return(HttpNotFound()); } ViewBag.PublicationTypeId = new SelectList(db.PublicationTypes, "ID", "NAME", pUBLISHER.PublicationTypeId); return(View(pUBLISHER)); }