Esempio n. 1
0
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            int EntryID = entrycolumns.EntryID;

            ent.DeleteEntry(EntryID);
            NavigationService.Navigate(MenuPage);
        }
Esempio n. 2
0
 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);
             }
         }
     }
 }