post 1
-
Upload
rosemarie-de-rosas -
Category
Documents
-
view
4 -
download
1
description
Transcript of post 1
![Page 1: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/1.jpg)
This program automatically load the
database table to a listbox control and the
selected value in listbox will dispaly in DataGridView.
POST #1:
Submitted By:Rosemarie M. De Rosas
IT3B1
![Page 2: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/2.jpg)
Step 1. Open the Visual Studio 2012 or C# Application
Step 2. click new Project
![Page 3: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/3.jpg)
Step 3. Select Visual C# and then select Windows Forms Application then click ok
Edit the name
Of your project
here
![Page 4: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/4.jpg)
Step 4.Create a form like this, drag the selected listBox to the form, and also The Datagridview from the ToolBox
You can edit the name of the lisbox and datagridview
by selectingListbox or Datagridview and select properties
![Page 5: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/5.jpg)
Step 5.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 “DBConnect.cs” after that click Add button below.
![Page 6: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/6.jpg)
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.
Click browse then go to
C:\Program Files (x86)\MySQL\Connector NET 6.7.4\Assemblies\v4.5
If v4.5 didn't work choose v2.0 or v4.0 version
After that select the MySql.Data.dll
And MySql.Data.Entity.dll
![Page 7: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/7.jpg)
Step 8. Go to Desktop and Open the MySQL Workbench application if you don’t have then try to install the installer inside the folder of “Automatic load database ”
Then use password: admin when the installation is near to complete, after that open the MySQL Workbench application then click or open the “Local instance” then type the password: admin after that, go to management
Then select “Data Import/Restore” the follow the Instruction below.
Select this
Click this
![Page 8: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/8.jpg)
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
![Page 9: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/9.jpg)
Insert this code
Start coding here
![Page 10: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/10.jpg)
Continue coding here
![Page 11: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/11.jpg)
Continue coding here
![Page 12: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/12.jpg)
Step 9. Go to your form1 or design double click the form and insert this code.
Insert this
Start coding here
![Page 13: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/13.jpg)
Continue coding here
![Page 14: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/14.jpg)
Step 10. F5 to run the program and the output is look like this.
![Page 15: post 1](https://reader035.fdocuments.in/reader035/viewer/2022062712/563db82e550346aa9a914bb9/html5/thumbnails/15.jpg)
References