Esempio n. 1
0
 private void sqlDataAdapter1_RowUpdated(object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e)
 {
     AdventureWorks2019DataSet.StoreRow CustRow = (AdventureWorks2019DataSet.StoreRow)e.Row;
     MessageBox.Show(CustRow.BusinessEntityID.ToString() + " has been updated");
     adventureWorks2019DataSet1.Store.Clear();
     sqlDataAdapter1.Fill(adventureWorks2019DataSet1.Store);
 }
Esempio n. 2
0
        private void sqlDataAdapter1_RowUpdating(object sender, System.Data.SqlClient.SqlRowUpdatingEventArgs e)
        {
            AdventureWorks2019DataSet.StoreRow CustRow = (AdventureWorks2019DataSet.StoreRow)e.Row;
            DialogResult response = MessageBox.Show("Continue updating " + CustRow.BusinessEntityID.ToString() + "?", "Continue Update?", MessageBoxButtons.YesNo);

            if (response == DialogResult.No)
            {
                e.Status = UpdateStatus.SkipCurrentRow;
            }
        }