Ive been working on a project which allows forms to edit information for a database. For one form I must have:
• An import button which should start an Open File dialog and using appropriate filtering allow the user to select the house details text file.
• A button which saves the record to the data source (database).
• A button which cancels the new record within the dataset.
• A close button to return to the main menu.
Ive made out the form as seen above. I really don't know how to save the record or cancel a new record. I think Ive got the import function working. Could anyone hear give me a hint towards what could be used to fix this?
The code im currently using is shown below:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
private void Import_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'estateAgentDataSet.house' table. You can move, or remove it, as needed.
this.houseTableAdapter.Fill(this.estateAgentDataSet.house);
}
Bookmarks