CHAPTER 22 ADO.NET PART II: THE DISCONNECTED LAYER
private void btnUpdateInventory_Click(object sender, EventArgs e)
{
try
{
// Save changes with the Inventory table back to the database.
this.inventoryTableAdapter.Update(this.inventoryDataSet.Inventory);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
// Get fresh copy for grid.
this.inventoryTableAdapter.Fill(this.inventoryDataSet.Inventory);
Run your application again; add, delete, or update the records displayed in the grid; and click the
Update button. When you run the program again,