Windows Forms GUI insight

1 day ago 3
ARTICLE AD BOX

We have been practicing for our Windows Forms GUI test with our class, and wanted to inquire about if this would work.

First, we create a Windows Forms(.NET Framework) You need to right click on the right side in Viewer and Add -> New Item -> Data -> Service-based Database You create fields You have to highlight Id and set it to "Is Identity" You go to Toolbox, DataGridView and drag it out onto the main page Click on the top right of it, Choose Data Source and pick the one you made After that, to create fields with the data in it, go to Data Sources on the left, Tables and drag out the fields to create new Textboxes Add 4 buttons (close, modify, update, add) These are the code snippets for it.

Would this work?

private void kilepes_Click(object sender, EventArgs e) { Application.Exit(); //this.Close(); } private void torles_Click(object sender, EventArgs e) { tableBindingSource.RemoveCurrent(); tableTableAdapter.Update(this.database1DataSet.Table); } private void modosit_Click(object sender, EventArgs e) { tableBindingSource.EndEdit(); tableTableAdapter.Update(this.database1DataSet.Table); } private void hozzaad_Click(object sender, EventArgs e) { tableTableAdapter.Insert(nevTextBox.Text, int.Parse(telszamTextBox.Text), szul_idoDateTimePicker.Value); tableTableAdapter.Fill(this.database1DataSet.Table); }
Read Entire Article