Professional Documents
Culture Documents
3382-1665206159275-Practical_11.1[2]
3382-1665206159275-Practical_11.1[2]
1 Introduction
ABC Cooperation
ABC Cooperation is a company which is working in the Food and Beverage industry. Currently
the management is looking forward to computerizing their employee details in order to simplify
the organization operations. Therefore, they have decided to implement a system to manage
employee details.
The proposed system must have to be secured with a proper login and once user logged into
the system, they must be capable of viewing, entering, deleting and managing employee details.
Guidelines
• You need to create a software solution for ABC Cooperation using visual studio.
• Use C# Programming language.
• Follow the structure given in this document. Design given forms and apply value
additions for it according to your requirement.
• Software will contain two forms. Additional forms and features will get additional
marks. (Login form and one Registration form are compulsory)
• Please follow the given instructions before you start the project.
• Design the software system according to the given instructions.
• Use appropriate fonts, colors, and images for Frontend (GUI design) of your software.
• Proposed Software system must have a database and it should be properly
connected to the system. (Database should be designed using SQL Server Management
Studio)
• Databases must contain minimum two tables.
2 Start with Visual Studio
First, you should install the Microsoft Visual Studio to work with Visual C# language.
Therefore, it is recommended you to download and install the Microsoft Visual Studio 2012.
Once you successfully installed the software, please follow the below steps to start your project.
2. After visual studio starts, click the File Menu, and select Project from the list which is
under New category.
Solution Explorer
Form
Property Window
Toolbox
1. Form: This is where all the elements will be placed such as text boxes, buttons etc.
2. Toolbox: Using toolbox you can select elements that necessary in your form design.
Important element in toolbox is listed in below. (You can add elements to your form by
dragging or double clicking on the item as well.)
3. Solution Explorer: Solution explorer is listing the project files related to the project
and it includes forms, classes etc.
4. Properties Window: Property window is also important when making changes to the
Form, Button, Textbox or any other element. It includes properties such as,
In here, we are going to design our employee management system which basically contains
two different forms. We are starting with the Login Form Design. Once you open the project
you will be able to design the form according to given structure.
Picture Box
Group Box
Button
As the first step, you should design the above login form by using the Toolbox and its
components. You can see the elements that are used while designing this form and you are free
to you use any element that are listed and change the properties of each object with suitable
values.
1. First, Right click on the project name from the list which is under Solution Explorer.
Then go to Add and select Windows Form.
Then you can start the designing process of the second form which is known as the
Registration Form by referring the following design.
Radio Button
Button
In order to start creating your database, you must have installed Microsoft SQL Server
Management Studio to your device.
Once you successfully installed the software please follow the below steps to start your
database.
3. Once you successfully logged in to your server you will redirect into the following
interface.
Object Explorer
As you are moving on the database part, you should create an appropriate database in order to
store all the relevant data. Therefore, you should follow the below mentioned steps,
1. Go to Object Explorer right click on Database. Then it will pop up a menu and select
New Database on that menu.
2. After this process, a new window will open and enter the appropriate database name
into Database Name field and click OK. (In this case I have given the name as “ems”)
Then we have to start creating the necessary database tables. In order to do this, you should
expand your database by using the “+” mark right in front of your database and follow below
steps.
1. Then you can right click on the Table option select Table which is listed under the
New option.
2. It will redirect you into a new window where you will be able to enter the table structure
by including Colum Names, Data Types and NULL data availability.
6. Then you can close the table editor with the following button.
7. Then you can see the created table columns and other relevant details by expanding
Table option and expanding the table name that you intended to view.
Then we will start to create another table which is for the employee details. In here, you can
also follow the above steps repeatedly.
1. Then you can right click on the Table option select Table which is listed under the
New option.
2. It will redirect you into a new window where you will be able to enter the table structure
by including Colum Names, Data Types and NULL data availability.
s
Figure 27 - Save table
6. Then you can close the table editor with following button.
7. Then you can see the created table columns and other relevant details by expanding
Table option and expanding the table name that you intended to view.
When connecting Microsoft SQL Server database with Microsoft Visual Studio, you have to
get the server explorer in the Microsoft Visual Studio.
1. Therefore, first get the Microsoft Visual Studio and select the Server Explorer which
listed under the View Menu.
2. Then it will open up a new side bar and right click on the Data Connections and select
Add Connection.
4. Afterward, you have to enter the server details such as Server Name (Can be found in
the MS SQL Server Management Studio), Database Name (Which you have already
created) and click OK.
In here, we are going to start the coding part of our employee management system. First of all,
we will start with the login form.
Therefore, we are starting with the coding of buttons that we have used in this design. In order
to get the coding view, you can either right click on the form and select View Code or you
can just Double click on the objects (Buttons, Linked labels, Combo box and etc.) to move to
the coding view.
a. System using files: Right click on the form and select View Code to get the coding
view and add the following line.
c. Clear button: Go to design view and double click on the clear button to add following
code.
d. Login Button: Go to design view and double click on the login button to add following
code.
e. Exit Buton: Go to design view and double click on the exit linked label to add
following code.
Then we can move on to the Employee Management Form in order to do the necessary coding
with the buttons, linked labels and the other components.
b. Create database connection: Put the below highlighted line after the constructer
method.
c. Register button: Go to design view and double click on the register button to add
following code.
e. Clear button: Go to design view and double click on the clear button to add the
following code.
g. Logout linked label: Go to design view and double click on the logout linked label to
add the following code.
h. Exit linked label: Go to design view and double click on the exit linked label to add
the following code.
a. Registration form load: Go to design view and double click on the form to add
following code.
b. Combo box: Go to design view and double click on the Employee No. Combo box to
add the following code.