private void btnSaveClick(object sender, RoutedEventArgs e) { if (this.tempds.Count > 0) { Database.SongCollection songs = new Database.SongCollection(); foreach (Database.Song row in this.tempds) { songs.Add(row); } ds.Songs.Update(songs); } }
private void btnApplyClick(object sender, RoutedEventArgs e) { Tokenizer t = new Tokenizer(); string path = txtPath.Text; string file = txtFile.Text; path = path.Replace("\\", "\\\\"); path = path.Replace("(", "\\("); path = path.Replace(")", "\\)"); //Fixme: figure out how to use list as a defaultview Database.SongCollection songs = new Database.SongCollection(); foreach (Database.Song row in this.tempds) { songs.Add(row); } //DataTable dt = ds.ToDataTable<Database.Song>(songs); t.Toke(songs, path, file); }