/// <summary> /// Recupera los perfiles creados por el usuario. /// </summary> /// <returns></returns> public ResultBM GetProfiles() { try { ProfileDAL profileDal = new ProfileDAL(); List <PermissionDTO> permissionsDto = profileDal.GetProfiles(); List <PermissionMDL> permissionBms = new List <PermissionMDL>(); log.AddLogInfo("Recuperando perfil", "Recuperando perfiles creados por usuarios.", this); foreach (PermissionDTO permission in permissionsDto) { permissionBms.Add(new PermissionMDL(permission.fatherCode, permission.code, permission.description, permission.excluded)); } log.AddLogInfo("Recuperando perfil", "Recuperando perfiles creados por usuarios recuperados.", this); return(new ResultBM(ResultBM.Type.OK, "Lista de perfiles recuperada exitosamente", permissionBms)); } catch (Exception exception) { log.AddLogCritical("Recuperando perfil", exception.Message, this); return(new ResultBM(ResultBM.Type.EXCEPTION, SessionHelper.GetTranslation("RETRIEVING_ERROR") + " " + exception.Message, exception)); } }