示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            InsiderProfile insiderProfile = db.InsiderProfiles.Find(id);

            db.InsiderProfiles.Remove(insiderProfile);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 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));
 }
示例#3
0
        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));
        }
示例#4
0
        // 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));
        }
示例#5
0
        // 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));
        }