Example #1
0
        public JsonResult AddRoleUser(FormCollection form)
        {
            JsonReturnMessages msg = new JsonReturnMessages();

            try
            {
                int roleid = Convert.ToInt32(form["RoleID"]);
                //TODO:验证是否能管理这个角色
                string userids = form["userids"];
                sysManageService.AddRoleUser(roleid, userids, base.UserId, base.CurrentUser.FullName);

                msg.IsSuccess = true;
                msg.Msg       = "操作成功";
            }
            catch (BizException bizex)
            {
                msg.IsSuccess = false;
                msg.Msg       = bizex.Message;
            }
            catch (Exception ex)
            {
                msg.IsSuccess = false;
                msg.Msg       = "操作失败:" + ex.Message;
            }
            return(Json(msg));
        }