示例#1
0
        public ActionResult DeleteConfirmed(string id)
        {
            SPMRole sPMRole = db.IdentityRoles.Find(id);

            db.IdentityRoles.Remove(sPMRole);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Name")] SPMRole sPMRole)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sPMRole).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sPMRole));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,Name")] SPMRole sPMRole)
        {
            if (ModelState.IsValid)
            {
                db.IdentityRoles.Add(sPMRole);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sPMRole));
        }
示例#4
0
        // GET: SPMRoles/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SPMRole sPMRole = db.IdentityRoles.Find(id);

            if (sPMRole == null)
            {
                return(HttpNotFound());
            }
            return(View(sPMRole));
        }