search student information

17
This program able to displays list of students in Datagridview. The system allows the user to search by last name, first name and course.

Upload: dada-comerciase

Post on 23-Jan-2016

6 views

Category:

Documents


0 download

DESCRIPTION

This program able to displays list of students in Datagridview. The system allows the user to search by last name, first name and course.

TRANSCRIPT

Page 1: Search Student Information

This program able to displays list of students in Datagridview. The system

allows the user to search by last name, first name and course.

Page 2: Search Student Information

Step 1. Open the Visual Studio 2012 or C# Application

Step 2. click new Project

Page 3: Search Student Information

Step 3. Select Visual C# and then select Windows Forms Application then click ok

Edit the name of your project here

Page 4: Search Student Information

You can edit the name of textbox and datagridview and also you can edit the value text of button in theproperties

TextBox1

button2

button1

Step 4.Create a form like this, drag the selected textbox,button to the form, and also The Datagridview from the ToolBox

button4

button3

Datagridview1

Page 5: Search Student Information

Step 5.Select the name of your project here, then select Add after that click Class.

Select Visual C# Items then select Class andName the class as “DBConnect.cs” after that click Add button below.

Page 6: Search Student Information

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

Step 6. Select Reference in solution Explorer and then select Add reference

Page 7: Search Student Information

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 8: Search Student Information

Step 7. 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” follow the Instruction below.

Select This

Click This

Page 9: Search Student Information

Step 8. Here’s 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

Page 10: Search Student Information

Continue coding here

Page 11: Search Student Information

Continue coding here

Page 12: Search Student Information

Step 9. Go to your form1 or design double click the form and insert this code.

Insert this

Start coding here

Page 13: Search Student Information

Continue coding here

Page 14: Search Student Information

Continue coding here

Page 15: Search Student Information

Continue coding here

Page 16: Search Student Information

Step 10. F5 to run the program and the output is look like this. Search by first name, last name and course

Page 17: Search Student Information

References