public bool GetAlbumIDs(int userID, out List <int> albumIDs, out string errorString) { albumIDs = null; errorString = string.Empty; IUsersDataManager usersDataMan = managersFactory.CreateUsersDataManagerr(); if (usersDataMan == null) { errorString = "Failed retrieving UsersDataManager"; return(false); } return(usersDataMan.GetAlbumIDs(userID, out albumIDs, out errorString)); }
public bool GetAlbumsData(int userId, out List <AlbumData> albumsData, out string errorString) { albumsData = null; errorString = string.Empty; IUsersDataManager usersDataMan = managersFactory.CreateUsersDataManagerr(); if (usersDataMan == null) { errorString = "Failed retrieving UsersDataManager"; return(false); } List <int> albumIds = null; if (!usersDataMan.GetAlbumIDs(userId, out albumIds, out errorString)) { return(false); } IAlbumsDataManager albumsDataMan = managersFactory.CreateAlbumsManager(); if (albumsDataMan == null) { errorString = "Failed retrieving AlbumsDataManager"; return(false); } List <Album> albums = null; if (!albumsDataMan.GetAlbums(albumIds, out albums, out errorString)) { return(false); } albumsData = new List <AlbumData>(); foreach (Album album in albums) { AlbumData albumData = new AlbumData(); albumData.ID = album.AlbumId; albumData.Name = album.Name; albumsData.Add(albumData); } return(true); }