private void Delete_Click(object sender, RoutedEventArgs e) { int EntryID = entrycolumns.EntryID; ent.DeleteEntry(EntryID); NavigationService.Navigate(MenuPage); }
private void DeleteEntry() { if (dataGridView1.SelectedRows.Count > 0) { if (dataGridView1.CurrentRow != null) { Entry entryToDel = (Entry)dataGridView1.CurrentRow.DataBoundItem; Dialog_DelEntry dde = new Dialog_DelEntry(entryToDel); DialogResult res = dde.ShowDialog(); if (res == DialogResult.OK) { _entries.DeleteEntry(_dbXmlDoc, entryToDel); } } } }