using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace AppliedDataBindingSample { public partial class HierarchicalDataForm : Form { public HierarchicalDataForm() { InitializeComponent(); } private void bindingNavigatorSaveItem_Click(object sender, EventArgs e) { if( this.Validate() ) { this.customersBindingSource.EndEdit(); this.customersTableAdapter.Update(this.northwindDataSet.Customers); } else { System.Windows.Forms.MessageBox.Show(this, "Validation errors occurred.", "Save", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning); } } private void HierarchicalDataForm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'northwindDataSet.Customers' table. You can move, or remove it, as needed. this.customersTableAdapter.Fill(this.northwindDataSet.Customers); this.ordersTableAdapter.Fill(this.northwindDataSet.Orders); this.order_DetailsTableAdapter.Fill(this.northwindDataSet.Order_Details); } } }