Esempio n. 1
0
 /// <summary>
 ///     更新RoleFunction
 /// </summary>
 /// <param name="roleFunctionDto">RoleFunctionDTO</param>
 private void UpdateRoleFunction(RoleFunctionDTO roleFunctionDto)
 {
     var roleFunction = _roleFunctionRepository.Get(roleFunctionDto.Id);
     roleFunction.UpdateRoleFunction(roleFunctionDto.RoleId, roleFunctionDto.FunctionItemId);
 }
Esempio n. 2
0
 /// <summary>
 ///     插入角色功能
 /// </summary>
 /// <param name="role">角色</param>
 /// <param name="roleFunctionDto">角色功能DTO</param>
 private void InsertRoleFunction(Role role, RoleFunctionDTO roleFunctionDto)
 {
     var persist = _roleFunctionRepository.Get(roleFunctionDto.Id);
     if (persist != null) return;
     var roleFunction = new RoleFunction(role.Id, roleFunctionDto.FunctionItemId);
     _roleFunctionRepository.Add(roleFunction);
 }