using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace DataBindingFundamentalsSample { public partial class ComplexBindingSourceDataBindingForm : Form { public ComplexBindingSourceDataBindingForm() { InitializeComponent(); } private void complexBindingSourceDataBindingForm_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.Employees); } private void complexBindingSourceDataBindingForm_FormClosing(object sender, FormClosingEventArgs e) { // Save updates back to the Northwind database's Employees table this.Validate(); this.employeesBindingSource.EndEdit(); this.employeesTableAdapter.Update(this.northwindDataSet.Employees); } } }