public ActionResult DeleteConfirmed(int id) { InsiderProfile insiderProfile = db.InsiderProfiles.Find(id); db.InsiderProfiles.Remove(insiderProfile); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "InsiderProfileID,InsiderID")] InsiderProfile insiderProfile) { if (ModelState.IsValid) { db.Entry(insiderProfile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.InsiderID = new SelectList(db.Insiders, "InsiderID", "UserName", insiderProfile.InsiderID); return(View(insiderProfile)); }
public ActionResult Create([Bind(Include = "InsiderProfileID,InsiderID")] InsiderProfile insiderProfile) { if (ModelState.IsValid) { db.InsiderProfiles.Add(insiderProfile); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.InsiderID = new SelectList(db.Insiders, "InsiderID", "UserName", insiderProfile.InsiderID); return(View(insiderProfile)); }
// GET: InsiderProfiles/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } InsiderProfile insiderProfile = db.InsiderProfiles.Find(id); if (insiderProfile == null) { return(HttpNotFound()); } return(View(insiderProfile)); }
// GET: InsiderProfiles/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } InsiderProfile insiderProfile = db.InsiderProfiles.Find(id); if (insiderProfile == null) { return(HttpNotFound()); } ViewBag.InsiderID = new SelectList(db.Insiders, "InsiderID", "UserName", insiderProfile.InsiderID); return(View(insiderProfile)); }