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 TypeDataSetDataBindingForm : Form { public TypeDataSetDataBindingForm() { InitializeComponent(); } private void bindingNavigatorSaveItem_Click(object sender, EventArgs e) { if( this.Validate() ) { this.employeesBindingSource.EndEdit(); this.employeesTableAdapter.Update(this.northwindDataSet.Suppliers); } else { System.Windows.Forms.MessageBox.Show(this, "Validation errors occurred.", "Save", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning); } } private void TypeDataSetDataBindingForm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'northwindDataSet.Employees' table. You can move, or remove it, as needed. this.employeesTableAdapter.Fill(this.northwindDataSet.Suppliers); } } }