Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C# Address book app: I need to create an address book app that enables users to

ID: 3856518 • Letter: C

Question

C# Address book app:

I need to create an address book app that enables users to perform the following task, insert new contacts, find contacts whose last names begin with specified letters, update existing contacts and delete contacts. This should display one contact at a time in several textboxes rather than the DataGridView and uses a BindingNavigator at the top of the form to select which row of the table along with the add or delete options, but only allows adding or deleting when browsing only. It should have Address ID, First Name, Last Name, Email, Phone Number along with the Find an entry by Last Name box. I know I need to create the database first for this in a ADO.net data entity data model class library. I am working on this part at the moment, but wondering how to create the form as in the picture and to incorporate the database into the form?

Explanation / Answer

Hi, Creating an address book app using C# with microsoft visual studio is pretty simple. It is a basic app and you can use the already existing template in visual studio.

Let me break this down to several steps so that it will be easy.

Step 1: Start Microsoft Visual Studio and create new Project. Choose Windows Forms Application and configure the project type as Visual C#. You can name your project whatever you want and change location for the project if nessesary.

Step 2: Now you have an empty form to which you need to add the grids or boxes you need as per the requirement. For this you need to go to the Toolbox in the navigation and add Buttons, Labels, TextBoxes, DataGridView, menuStrip as required.If you do not want the DataGridView use the alternative views.

Step 3: After selecting the view, we will have empty columns. Right clikc on these columns and add the column names you want like the Address ID, First Name, Last Name, Email, Phone Number etc you asked for.

Step 4: Decide to which table in the columns need to be linked in the database and enter some data into that table

Step 5: Now connect your form to the database using Server Explorer in Visual Studio.

Start Visual Studio and open the Server Explorer window by clicking View and then Server Explorer from the main menu.

Right-click the Data Connections node and click Add Connection.

From the Add Connection dialog, click Change and select the MySQL Database as a data source.

From the Change Data Source dialog, select MySQL Database from the list of data sources and leave .NET Framework Data Provider for MySQL as the data provider.

Now enter the server host name, password, default schema name and connect it to the desired database.

Using the simple steps above you can create the form with the database you asked for