Example #1
0
        private void PopulateGridView()
        {
            var getSongs = new GetSongOperation();
            var data     = getSongs.Execute().Data as IEnumerable <SongDto>;

            this.dgv_songs.DataSource = data;
        }
Example #2
0
 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);
     }
 }