ConaWendyPostNo 1
ConaWendyPostNo 1
1:
The program will automatically loads
database table into a listbox control and
the selected value in the listbox will
appear in DataGridView.
Cona, Wendy
BSIT3_b1
Step 4.Create a form like this, drag the selected listBox to the form, and also The
Datagridview from the ToolBox
ListBox1
Datagridview1
Step 5.Select the name of project here, then right click select Add then click Class.
Select Visual C# Items then select Class and
Name the class as DBConnect.cs after that click Add button
below dont forget the extension .cs and the click Add button.
Step 6. this step is almost the to step 5 except the name of the class,
Select the name of your project here, then select Add after that click
Class.
Select Visual C# Items then select Class and
Name the class as ClassStudents.cs after that click Add
button below.
Step 7. Select Reference in solution Explorer and then select Add reference
Select this
2.
3.
Step 9. Heres the coding portion, go back to the Visual Studio 2012 Application and go to
DBConnect.cs and insert this code.
Insert this
code
Start coding
here
Coding continue
Insert this
Code continue
ThankYou
Hope you like it.
References/installer: