private void PopulateGridView() { var getSongs = new GetSongOperation(); var data = getSongs.Execute().Data as IEnumerable <SongDto>; this.dgv_songs.DataSource = data; }
private void button1_Click(object sender, EventArgs e) { try { string keyword = txb_search.Text.Trim(); var operation = new GetSongOperation(keyword); var data = operation.Execute().Data as IEnumerable <SongDto>; this.dgv_songs.DataSource = data; } catch (Exception exp) { MessageBox.Show(exp.Message); } }