private bool RoleExists(RoleEntity entity, RoleEntity[] entitys)
        {
            foreach (RoleEntity e in entitys)
            {
                if (e.RoleName == entity.RoleName)
                {
                    return true;
                }
            }

            return false;
        }
        public RoleEntity GetRoleByRoleName(string roleName)
        {
            ExtendedRole role = ExtendedRoles.GetRole(roleName);
            RoleEntity entity = new RoleEntity();
            entity.RoleName = role.RoleName;
            entity.Description = role.Description;
            entity.VersionNo = role.AuditData.VersionNo;
            entity.Status = role.Flag;

            return entity;
        }
Exemple #3
0
 /// <summary>
 /// LoadRoleData
 /// </summary>
 /// <param name="roleEntity"></param>
 public void LoadRoleData(RoleEntity roleEntity)
 {
     this.txt_rolename.Text = roleEntity.RoleName;
     this.txt_description.Text = roleEntity.Description;
     _versionNo = roleEntity.VersionNo;
 }