/// <summary> /// Gets the userProfiles. /// </summary> /// <param name="request">The request.</param> /// <returns></returns> public UserProfileResponse GetUserProfiles(UserProfileRequest request) { var response = new UserProfileResponse(); if (request.LoadOptions.Contains("UserProfiles")) { response.UserProfiles = request.LoadOptions.Contains("Active") ? UserProfileDao.GetUserProfiles(request.IsActive) : UserProfileDao.GetUserProfiles(); } if (request.LoadOptions.Contains("UserProfile")) { if (request.LoadOptions.Contains("UserProfileName")) { var userProfile = UserProfileDao.GetUserProfileByUserProfileName(request.UserProfileName, request.Password); if (userProfile == null) { response.Acknowledge = AcknowledgeType.Failure; response.Message = @"Tên đăng nhập hoặc mật khẩu không hợp lệ !"; return(response); } response.UserProfile = userProfile; } else { response.UserProfile = UserProfileDao.GetUserProfile(request.UserProfileId); } } return(response); }
public List <UserProfileEntity> GetUserProfiles() { return(UserProfileDao.GetUserProfiles()); }