private async Task LoadPopularTabs() { PopularTabsList.Clear(); var tabsRequest = new Model.Requests.NotationsSearchRequest { Type = Model.NotationType.Tab }; var tabs = await _serviceNotations.Get <List <Model.Notations> >(tabsRequest, "PopularNotations"); foreach (var item in tabs.GetRange(0, Math.Min(10, tabs.Count))) { if (item.Song.Album.AlbumCover.Length == 0) { item.Song.Album.AlbumCover = File.ReadAllBytes("logo.png"); } PopularTabsList.Add(item); } }
public async Task LoadNotations() { NotationList.Clear(); var request = new Model.Requests.NotationsSearchRequest { UserId = _userId, Filter = (int)ReviewStatus.Approved }; var list = await _serviceNotations.Get <List <Models.NotationBrowseListItem> >(request); NothingToSee = list.Count == 0; foreach (var item in list) { UpdateStarRating(item); NotationList.Add(item); } }
public async Task LoadNotations() { ItemList.Clear(); var request = new Model.Requests.NotationsSearchRequest { Type = NotationType.Chord, Filter = (int)ReviewStatus.Approved, Sort = SortingMode.Value }; var list = await _serviceNotations.Get <List <Models.NotationBrowseListItem> >(request); foreach (var item in list) { UpdateStarRating(item); ItemList.Add(item); } }
private async Task loadNotations() { var request = new Model.Requests.NotationsSearchRequest { SearchTerm = txtSearch.Text, Filter = (cmbStatusFilter.SelectedItem as FilterItem).Id }; var list = await _serviceNotations.Get <List <Model.Notations> >(request); foreach (var item in list) { if (item.Status == Model.ReviewStatus.Rejected) { item.Status = Model.ReviewStatus.Pending; } } dgvNotations.AutoGenerateColumns = false; dgvNotations.DataSource = list; }
public async Task LoadNotations() { NotationList.Clear(); var request = new Model.Requests.NotationsSearchRequest { ArtistId = _artistId, Filter = (int)ReviewStatus.Approved }; var list = await _serviceNotations.Get <List <Models.NotationBrowseListItem> >(request); NothingToSeeNotations = list.Count == 0; int counter = 0; foreach (var item in list.GetRange(0, Math.Min(list.Count, 5))) { UpdateStarRating(item); item.Counter = ++counter; NotationList.Add(item); } }
public List <Model.Notations> GetPopularNotations([FromQuery] Model.Requests.NotationsSearchRequest request) { return(_service.GetPopularNotations(request)); }