Пример #1
0
        public JsonResult RoleFormSubmit(string orgId, string name, string remark)
        {
            var module = new RoleModule(CurrentUser);
            var role   = new Role
            {
                IsDel   = (short)DeleteStatus.No,
                Name    = name,
                OrgId   = orgId,
                Remarks = remark,
                Status  = (short)AccountStatus.Normal
            };
            var data = module.Add(role);

            return(Json(new { code = 0, msg = "Ok", data = data }, "text/html"));
        }
Пример #2
0
        public JsonResult AddFeatureItem(string roleId, string menuId, string featureId)
        {
            var module  = new RoleModule(CurrentUser);
            var ftype   = FeatureTypeHelper.Items.First(t => t.Name == featureId);
            var feature = new Feature
            {
                ActId     = featureId,
                ActRemark = ftype.Summary,
                IsDel     = (short)DeleteStatus.No,
                MenuId    = menuId,
                RoleId    = roleId,
                Status    = 0
            };
            var data = module.Add(feature);

            return(Json(new { code = 0, msg = "Ok", data = data }, "text/html"));
        }