This Program Automatically Loads Database Table To A Listbox Control and The Selected Value in Listbox Will Appear in Datagridview
This Program Automatically Loads Database Table To A Listbox Control and The Selected Value in Listbox Will Appear in Datagridview
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 your project here, then select Add after that click Class.
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
Click this
Then go to the folder you download including this Power point and
select the student_students.sql file then ok and
Click button Start Import
Click this
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
Continue coding
here
Continue coding
here
Insert this
Continue coding
here
Step 10. F5 to run the program and the output is look like
this.
Reference of the
program:
Thank you
I hope
You learn a lot