Esempio n. 1
0
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     if (selectedItem != null)
     {
         bool wasSucessful = selectedItem.DeleteDatabaseItem(selectedItem);
         if (wasSucessful)
         {
             MessageBox.Show("Item Successfully Deleted");
         }
         DataTable databaseTable = anItem.Select();
         dataGridItem.DataSource = databaseTable;
     }
     else
     {
         MessageBox.Show("Please Select an Item");
     }
 }