C# ПІДРУЧНИКИ / c# / Premier Press - C# Professional Projects
.pdf128 Project 1 CREATING A CUSTOMER MAINTENANCE PROJECT
The tblWorker Table
The tblWorker table is used to store information about a worker. Table 7-11 shows the details of the tblWorker table.
Table 7-11 Details of the tblWorker Table
Column Name |
Data Type |
|
|
Length |
Allow Nulls |
||
WorkerID |
int |
|
|
|
Y |
No |
|
Name |
nvarchar |
|
L |
50 |
Yes |
||
|
|
|
|||||
|
|
|
F |
|
|
||
|
|
M |
|
|
|
||
The tblCustomer Table |
|
|
|
|
|
||
|
A |
|
|
|
|
||
The tblCustomer table stores information about the customers of the organiza- |
|||||||
tion. Table 7-12 displays the details of the tblCustomer table. |
|
||||||
|
T |
|
|
|
|
|
|
Table 7-12 Details of the tblCustomer Table |
|
|
|
||||
|
E |
|
|
|
|
||
Column Name |
Data Type |
|
|
Length |
Allow Nulls |
||
CarNo |
nvarchar |
|
|
|
15 |
No |
|
Name |
nvarchar |
|
|
|
255 |
Yes |
|
Address |
nvarchar |
|
|
|
255 |
Yes |
|
Make |
nvarchar |
|
|
|
50 |
Yes |
|
|
|
|
|
|
|
|
|
The tblJobDetails Table
The tblJobDetails table stores information about the job done by a worker in a particular month. It also stores the information about the amount of work done on a car in a particular month. Table 7-13 displays the details of the tblJobDetails table.
Team-Fly®
|
PROJECT CASE STUDY |
|
Chapter 7 |
129 |
||
Table 7-13 Details of the tblJobDetails Table |
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
Column Name |
Data Type |
Length |
Allow Nulls |
|
||
|
|
|
|
|
|
|
CarNo |
nvarchar |
15 |
No |
|
||
JobDate |
datetime |
15 |
No |
|
||
WorkerId |
int |
- |
No |
|
||
KMs |
int |
- |
Yes |
|
||
Tuning |
int |
- |
Yes |
|
||
Alignment |
int |
- |
Yes |
|
||
Balancing |
int |
- |
Yes |
|
||
Tires |
int |
- |
Yes |
|
||
Weights |
int |
- |
Yes |
|
||
OilChanged |
int |
- |
Yes |
|
||
OilQty |
int |
- |
Yes |
|
||
OilFilter |
int |
- |
Yes |
|
||
GearOil |
int |
- |
Yes |
|
||
GearOilQty |
int |
- |
Yes |
|
||
Point |
int |
- |
Yes |
|
||
Condenser |
int |
- |
Yes |
|
||
Plug |
int |
- |
Yes |
|
||
PlugQty |
int |
- |
Yes |
|
||
FuelFilter |
int |
- |
Yes |
|
||
AirFilter |
int |
- |
Yes |
|
||
Remarks |
int |
- |
Yes |
|
||
|
|
|
|
|
|
|
After discussing the database design, the next section will look at the design of the forms that display data from the tables in the databases.The next section discusses the forms used in the Customer Maintenance project.
130 Project 1 CREATING A CUSTOMER MAINTENANCE PROJECT
Designing the Windows Forms Used
in Customer Maintenance Project
The Customer Maintenance project includes the WorkerForm, CustomerForm, and
JobDetails forms to access data from the tblWorker, tblCustomer, and tblJobDe-
tails tables, respectively. In addition,the Customer Maintenance project includes the main form, Form1, and the Reports form.
Form1
Form1 contains links that a user uses to view different forms created in the Customer Maintenance project. Figure 7-2 shows the layout of Form1.
FIGURE 7-2 Layout of Form1
The WorkerForm Form
The layout of the WorkerForm form is displayed in Figure 7-3.
FIGURE 7-3 Layout of the WorkerForm form
PROJECT CASE STUDY |
Chapter 7 |
131 |
|
|
|
The CustomerForm Form
The layout of the CustomerForm form is displayed in Figure 7-4.
FIGURE 7-4 Layout of the CustomerForm form
The JobDetails Form
The layout of the JobDetails form is displayed in Figure 7-5.
FIGURE 7-5 Layout of the JobDetails form
132 Project 1 CREATING A CUSTOMER MAINTENANCE PROJECT
The Reports Form
The Reports form contains links to various reports created in the Customer Maintenance project. The layout of the Reports form is displayed in Figure 7-6.
FIGURE 7-6 Layout of the Reports form
Low-Level Design
In the low-level design phase, a detailed design of the software modules, based on the high-level design, is produced. In addition, the team lays down specifications for various software modules of an application. Modules defined in the high-level design phase are used to create a detailed structure of a system. The system contains subsystems, which are partitioned into one or more design units or modules.
In the low-level design phase, the flow of the different modules in the Customer Maintenance project and the interactions between various interfaces are defined. The flow and the interaction between the interfaces are shown in the following figures.
The Form1 Module
The Form1 module deals with Form1. Figure 7-7 shows the flowchart and the interaction of Form1 with the other modules.
PROJECT CASE STUDY |
Chapter 7 |
|
133 |
|
|||
|
|
|
|
FIGURE 7-7 Flowchart of the Form1 module
The Worker Module
The Worker module consists of WorkerForm that contains information about workers. The flowchart of WorkerForm is displayed in Figure 7-8.
134 Project 1 CREATING A CUSTOMER MAINTENANCE PROJECT
FIGURE 7-8 Flowchart of the Worker module
The Customer Module
The Customer module contains CustomerForm. Figure 7-9 displays the flowchart of the Customer module.
PROJECT CASE STUDY |
Chapter 7 |
|
135 |
|
|||
|
|
|
|
FIGURE 7-9 Flowchart of the Customer module
The Job Details Module
The Job Details module contains the JobDetails form. Figure 7-10 displays the flowchart of the Job Details module.
136 Project 1 CREATING A CUSTOMER MAINTENANCE PROJECT
FIGURE 7-10 Flowchart of the Job Details module
The Reports Module
The Reports module contains the Reports form. The flowchart of the Reports module is displayed in Figure 7-11.
PROJECT CASE STUDY |
Chapter 7 |
137 |
|
|
|
FIGURE 7-11 Flowchart of the Reports module
Construction
In the construction phase, different software modules are built.This phase uses the output of the low-level design to produce software components. During the construction phase, task responsibilities are assigned to team members. Some team members may need to design and develop an interface, while the others may be required to write the code for database connectivity and business rules.