Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            GrantPermissions grantPermissions = db.GrantPermissions.Find(id);

            db.GrantPermissions.Remove(grantPermissions);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "PermissionID,PemissionName,Descrpition,UserID")] GrantPermissions grantPermissions)
 {
     if (ModelState.IsValid)
     {
         db.Entry(grantPermissions).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserID = new SelectList(db.Administrators, "UserID", "UserName", grantPermissions.UserID);
     return(View(grantPermissions));
 }
Exemple #3
0
        // GET: Admin/GrantPermissions/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GrantPermissions grantPermissions = db.GrantPermissions.Find(id);

            if (grantPermissions == null)
            {
                return(HttpNotFound());
            }
            return(View(grantPermissions));
        }
Exemple #4
0
        // GET: Admin/GrantPermissions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GrantPermissions grantPermissions = db.GrantPermissions.Find(id);

            if (grantPermissions == null)
            {
                return(HttpNotFound());
            }
            ViewBag.UserID = new SelectList(db.Administrators, "UserID", "UserName", grantPermissions.UserID);
            return(View(grantPermissions));
        }