/// <summary> /// 修改权限角色 /// </summary> /// <param name="permissionRoleView">角色信息</param> /// <param name="operatorAccount">操作员账号</param> public static void UpdatePermissionRole(PermissionRoleView permissionRoleView, string operatorAccount) { if (permissionRoleView == null) { throw new ArgumentNullException("permissionRoleView"); } permissionRoleView.Validate(); var repository = Factory.CreatePermissionRoleRepository(); repository.Update(permissionRoleView); LogHelper.SaveUpdatePermissionRoleLog(permissionRoleView, operatorAccount); }
/// <summary> /// 添加权限角色 /// </summary> /// <param name="permissionRoleView">角色信息</param> /// <param name="company">当前单位Id</param> /// <param name="operatorAccount">操作员账号</param> public static void RegisterPermissionRole(PermissionRoleView permissionRoleView, Guid company, string operatorAccount) { if (permissionRoleView == null) { throw new ArgumentNullException("permissionRoleView"); } permissionRoleView.Validate(); var repository = Factory.CreatePermissionRoleRepository(); repository.Register(company, permissionRoleView); LogHelper.SaveRegisterPermissionRoleLog(permissionRoleView, company, operatorAccount); }