Course Design Report: College: 信息与电子工程学院 Class: 172 Name: Sam Sopheap ID: 9170214016 Employee Management System
Course Design Report: College: 信息与电子工程学院 Class: 172 Name: Sam Sopheap ID: 9170214016 Employee Management System
Class: 172
ID: 9170214016
1
Course Design Report
Contents
ABSTRACT...................................................................................................................3
I. REQUIREMENT.................................................................................................4
II. FUNCTION LIST................................................................................................5
III. TASK LIST.......................................................................................................6
IV. DATABASE DESIGN......................................................................................8
V. SYSTEM IMPLEMENTS.................................................................................11
VI. RUNNING RESULT......................................................................................16
VII. SUMMARY.....................................................................................................18
2
Course Design Report
Abstract
managing the staff data within a small company or organization. The system as such
functionally related GUI (application program) and database. The choice of the
fields, primary key, foreign key, relationship, sql queries, objects, classes, controls.
3
Course Design Report
I. Requirement
This report gives a brief theoretical preview upon the database information
systems and goes through the essence of the problem that should be resolved.
Most of the contemporary Information systems are based on the Database
allowing the users to define, create, maintain and control access to the database. The
actually the bridge between the users and the database, where the data is stored.
Thus, the well-developed application program and database are very important for
the reliability, flexibility and functionality of the system. The so defined systems
differentiate to each other and their development comprises a great variety of tasks to
4
Course Design Report
data transformation into useful information; computer hardware and software are
designed and used [2]. A particular case is the Human Resources Information System
development. This kind of systems are responsible for storing data of the staff within
implementation).
The next step that should be taken is connecting the program with the
controls.
6. Tests
To ensure that everything works properly and as it has been expected, test
project. Before proceeding to the explanatory notes of how I have developed the
(environments) that have been used during this project’s development course.
Database Environment: Access is a typical environment for
constructing relational databases. The database is the skeleton and the
three phases: The Manual-filing System, the File-based systems, and the
6
Course Design Report
industry for a more efficient data access [1]. The basic idea into
7
Course Design Report
The database for the system should include information of company’s staff,
respectively of its employees. The data is subdivided into the following groups:
8
Course Design Report
Information
Employee_ID_Number Employee_ID_Number Employee_ID_Number
ms_From_Date_Year
ms_To_Date_Day
ms_To_Date_Month
ms_To_Date_Year
Weekly_Salary
Weekly_Money_Currency
weekly_Taxes
weekly_Deductions
weekly_Insurances
ws_From_Date_Day
ws_From_Date_Month
ws_From_Date_Year
ws_To_Date_Day
ws_To_Date_Month
ws_To_Date_Year
I have constructed a database that consists of six data tables. There will be one
9
Course Design Report
main table (parent table) and five child tables, related to each other. Patently, for this
purpose the necessary primary and foreign keys should be defined into the
responding tables. The so defined structure above is made up in conformity with the
user’s needs and demands. Each employee of the staff is intended to have several
Information, Time Information and Holiday Information, and only one record
containing his basic information within the company – his personal details as: date of
birth, gender, marital status, address and phone details, and his current working
record. An employee is supposed to have not only one record of his Working history,
or his Contact Person Information…. For instance, if we take a look to the Time
Information data table – an employee may have several records in case he has some
experience within the current company. It is absolutely the same with the Salary
these values in an ascending order to ensure that they are unique within a table. Some
done as it is tightly related to the input fields of the application program. I decided to
perform it in the following way: those fields that are compulsory to be filled by the
user I have set not to accept any null-values of data and on the other hand, those
the two options, offered into the “Allow Zero Length” field. In the example, shown
above, the Personal_ID_Number field is set not to allow any null-values thus its
field’s length cannot be zero as its value is quite essential for identifying an
employee as an individual and distinctive person. That has been considered and done
for a kind of convenience as the user would wish not to enter all of the data at the
10
Course Design Report
V. SYSTEM IMPLEMENTS
the program. The first general advice when constructing GUIs is to “know thy users”
as there is a large number of rules and requirements, concerning the whole process of
GUI development.
A set of controls is used in order to reach the desired purpose, what concerns the
functionality of the application, including Labels, Text boxes, Combo Boxes, Data
Grid, Buttons, Group Boxes, Panels, Tab controls etc. All of these controls, available
in the program, are fitted to the corresponding forms that are used in the application.
This subsection represents the main approach that has been made up in order to
System.EventHandler(this.dataGrid1_CurrentCellChanged);
That’s the Initialization of the basic properties of this control. In order to perform
11
Course Design Report
some operations upon the functionality of the control (for instance: when the current
cell’s index changes…or when the control’s size is exceeded etc.), I constructed a
function.
As it is shown in Figure 2.6, when the user exceeds the control’s borders, an
message box in Figure 2.7 pops up on the screen every time when we try going
F
Figure 2.7 Warning message
For this purpose, a DataAccessClass has been created and placed into a separate
file – “DataAccessClass.cs”. In this class, not only functions dealing with retrieving
of data are included, there are also functions for saving data into the database,
updating data, etc. On a first time, we have to manage to the connection with the data
12
Course Design Report
components:
- Specifying the connection string:
Source=..\\..\\Employees_Database.mdb";
- Making up a query-string to be performed upon the database:
this.select_query1=" select* from Employees_Details order by
Last_Name,First_Name";
- Creating a data adapter to communicate between the dataset and the
OleDbDataAdapter(this.select_query1, con);
A bit more about the data adapter: “The ADO.NET DataSet is a memory-
model independent of the data source. The DataSet represents a complete set of data
including tables, constraints, and relationships among the tables. Because the DataSet
is independent of the data source, a DataSet can include data local to the application,
dAdapter.Fill(dSet,"Employees_Details");
After getting the connection established and populating the desired data-fields
into the Dataset, we can connect the Datagrid control with the Dataset by explicitly
13
Course Design Report
Windows Form that are bound to the same data source. For example, suppose that a
form contains two TextBox controls that are bound to the same data source but to
different columns. The data source might be a DataTable that contains customer
names, while the columns might contain the first and last names. The two controls
must be synchronized in order to display the correct first and last names together for
pointer to the current item in the data source. The TextBox controls are bound to the
current item so they display the information for the same row. When the current item
changes, the CurrencyManager notifies all the bound controls, so that they can
refresh their data. Furthermore, you can set the Position property to specify the row
in the DataTable that the controls point to. To determine how many rows exist in the
data source, use the Count property. The Current property returns the current item in
the underlying list. To change the current item, set the Position property to a new
14
Course Design Report
value. The value must be greater than 0 and must be less than the value of the Count
property.
One thing should always be taken into an account when we perform such
operations: We are not allowed to perform a data binding operation more than once at
a time; thus, a function should be made up for clearing the control’s collection of any
would be thrown and we have just to quit the program. Such kind of exceptions are
not only undesirable, they are not allowable in the practice as well. After loading the
available data records from the database, we are already able to take a preview upon
them:
as we are now in the first and second tab-pages of the tab-control. If we switch to the
next tab-page (s), the responding data table’s information will be uploaded into the
dataGrid control and shown as text into the corresponding text fields, located on the
same form. The available record (if such one exists) is uploaded into the data grid
Figure 2.12 A certain data record uploaded into the data grid
All data included into the data grid control above is uploaded into editable text fields
15
Course Design Report
as well - Appendix B: Figure 11. We can walk through all the tab-pages, taking a
16
Course Design Report
17
Course Design Report
SUMMARY
emphasized on the basic steps, consequently taken during the project’s development
course as a particular attention was turned to the basic operative functions performed
upon the data into the database. The report’s content comprises the whole task
solution, starting from the programming environments have been selected, going
through the database, the applications analyze and construction, and finishing with
As a future work, some additional stuff could be implemented and integrated into the
application code making it much more reliable and flexible; especially what concerns
a pay-roll module, for instance. Apparently, the role of such systems is basic and
essential within each company that wants to keep a really good control and record
concerning its personnel data, functionality and performance on all levels in its
structure. Every organization, in nowadays, has the necessity of managing its staff on
a really good level as the staff has definitely the greatest merit of building up a
company as such as it is. The well managed staff means giving the appropriate
financial award-ness and all kind of benefits as such as they have been deserved.
That’s why the development of such systems is not just a programming business – a
lot of people are ordinarily involved in such projects and one of the basic
requirements is the reliability of the system, especially what concerns the storage of
data and all of the operations that will be performed upon it.
18
Course Design Report
Mark:
19