class CustomTextBox : System.Windows.Forms.TextBox, ISaveableControl
{
public CustomTextBox(string defaultValue) { base.Text = defaultValue; }
public void Save() { ///Go to the database and update the associated record with the associated value } }
class CustomComboBox : System.Windows.Forms.ComboBox, ISaveableControl { public CustomTextBox(string defaultValue) { base.Items.Add(defaultValue); base.Text = defaultValue; }
public void Save() { ///Go to the database and update the associated record with the associated value }
}
|