コード例 #1
0
        /// <summary>
        /// Update the database using table adapters update and fill methods
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonUpdate_Click(object sender, EventArgs e)
        {
            inventoryTableAdapter.Update(inventoryTable);
            customersTableAdapter.Update(customersTable);
            ordersTableAdapter.Update(ordersTable);

            inventoryTableAdapter.Fill(inventoryTable);
            customersTableAdapter.Fill(customersTable);
            ordersTableAdapter.Fill(ordersTable);
        }
コード例 #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         invTableAdapter.Update(autoLotDS.Inventory);
         custTableAdapter.Update(autoLotDS.Customers);
         ordersTableAdapter.Update(autoLotDS.Orders);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }