Exemplo n.º 1
0
 public ActionResult Edit(sp_RoleSelect_Result model)
 {
     if (RoleBusinessLogic.getInstance().UpdateRole(model) == -1)
     {
         TempData["Success"] = "Role was successfully updated";
     }
     else
     {
         TempData["Error"] = "Role was unsuccessfully updated";
     }
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
        public ActionResult Edit(string id)
        {
            sp_RoleSelect_Result model = new sp_RoleSelect_Result();
            var roleData = RoleBusinessLogic.getInstance().getRoleById(id);

            model.RoleId    = roleData.RoleId;
            model.RoleName  = roleData.RoleName;
            model.Maker     = roleData.Maker;
            model.Checker   = roleData.Checker;
            model.Approval  = roleData.Approval;
            model.SuperUser = roleData.SuperUser;
            return(View(model));
        }
Exemplo n.º 3
0
 public int UpdateRole(sp_RoleSelect_Result model)
 {
     return(_db.sp_RoleUpdate(model.RoleId, model.RoleName, model.Maker, model.Checker, model.Approval, model.SuperUser, SessionManager.userId()));
 }