Esempio n. 1
0
        public ActionResult DeleteUserRole(string roleid, string userid)
        {
            bool   _success = false;
            string _error   = "";

            try
            {
                if (!String.IsNullOrWhiteSpace(roleid) && !String.IsNullOrWhiteSpace(userid))
                {
                    _success = _userRoleService.DeleteUserRoleByUserIdAndRoleId(userid, roleid);
                }
            }
            catch (Exception e)
            {
                _success = false;
                Commons.Logger.GenerateError(e, System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "roleid = " + roleid + " and userid = " + userid);
            }
            return(Json(new { Result = _success, Error = _error }));
        }