FPT University - Capstone project - Using QR Code to prevent fake products

194
1 USING QR CODE TO PREVENT FAKE PRODUCT Phan Hng An Lê Kiến Trúc Phan Gia Nht Trn Quang Bình Supervised by Lâm Hu Khánh Phương No. SE04.B – 004

Transcript of FPT University - Capstone project - Using QR Code to prevent fake products

Page 1: FPT University - Capstone project - Using QR Code to prevent fake products

1

USING QR CODE TO PREVENT

FAKE PRODUCT

Phan Hồng An

Lê Kiến Trúc

Phan Gia Nhật

Trần Quang Bình

Supervised by Lâm Hữu Khánh Phương

No. SE04.B – 004

Page 2: FPT University - Capstone project - Using QR Code to prevent fake products

2

MINISTRY OF EDUCATION AND TRAINING

FPT UNIVERSITY

Capstone Project Document

Using QR Code To Prevent Fake Product

SE04.B – 004

Group Members

Phan Hồng An – 60048

Lê Kiến Trúc – 60145

Phan Gia Nhật – 00683

Trần Quang Bình – 60137

Supervisor Lâm Hữu Khánh Phương

Ext Supervisor

Capstone Project

code QR-AntiFake

- Ho Chi Minh City, 8/2012 -

Page 3: FPT University - Capstone project - Using QR Code to prevent fake products

3

Table of Contents 1 Introduction .................................................................................................................................... 7

1.1 Project Information ................................................................................................................. 7

1.2 Purpose ................................................................................................................................... 7

1.3 People ..................................................................................................................................... 7

1.4 Problem ................................................................................................................................... 7

1.5 Why QR Code .......................................................................................................................... 7

1.6 Our Solution ............................................................................................................................ 8

1.7 Existing Systems & Market ...................................................................................................... 8

2 Software Project Planning ............................................................................................................... 9

2.1 Problem Definition .................................................................................................................. 9

2.1.1 Name of this CapStone Project ....................................................................................... 9

2.1.2 Problem Abstract ............................................................................................................ 9

2.1.3 Project Overview ............................................................................................................. 9

2.1.4 The Current System ......................................................................................................... 9

2.1.5 The Proposed System ...................................................................................................... 9

2.1.6 Boundaries of the System ............................................................................................. 10

2.1.7 Development Environment ........................................................................................... 10

2.2 Project organization .............................................................................................................. 10

2.2.1 Software Process Model ............................................................................................... 10

2.2.2 Roles and Responsibilities ............................................................................................. 11

2.2.3 Tools and Techniques .................................................................................................... 11

2.2.4 Tools .............................................................................................................................. 11

2.2.5 Techniques .................................................................................................................... 12

2.3 Project management plan ..................................................................................................... 12

2.3.1 Tasks .............................................................................................................................. 12

2.3.2 Ideation ......................................................................................................................... 12

2.3.3 Project Planning ............................................................................................................ 12

2.3.4 Software Requirement Specification ............................................................................ 12

2.3.5 Software Design Description ......................................................................................... 12

2.3.6 Implementation ............................................................................................................ 13

2.3.7 Quality control .............................................................................................................. 13

Page 4: FPT University - Capstone project - Using QR Code to prevent fake products

4

2.3.8 Software User’s Manual ................................................................................................ 13

2.3.9 Release and Deployment .............................................................................................. 13

2.3.10 Task Sheet: Assignment and Timetable ........................................................................ 13

2.4 Coding Convention ................................................................................................................ 14

2.4.1 Naming conventions ..................................................................................................... 14

2.4.2 Lengths .......................................................................................................................... 14

2.4.3 Other convention .......................................................................................................... 14

3 Software Requirement Specifiation .............................................................................................. 16

3.1 User Requirement Specification ........................................................................................... 16

3.1.1 Overview ....................................................................................................................... 16

3.1.2 Administrator requirements ......................................................................................... 17

3.1.3 Producer requirements ................................................................................................. 17

3.1.4 Consumer requirements ............................................................................................... 17

3.1.5 Item checking requirements ......................................................................................... 17

3.1.6 Out of Scope .................................................................................................................. 18

3.2 System Requirement Specification ....................................................................................... 18

3.2.1 External Interface Requirements .................................................................................. 18

3.2.2 System Features ............................................................................................................ 19

3.3 Entity Relationship Diagram.................................................................................................. 76

4 Software Design Description ......................................................................................................... 77

4.1 Design Overview ................................................................................................................... 77

4.2 System Architectural Design ................................................................................................. 78

4.2.1 Choice of System Architecture ...................................................................................... 78

4.2.2 Discussion of Alternative Designs ................................................................................. 78

4.3 Component Diagram ............................................................................................................. 79

4.4 Detailed Description of Components .................................................................................... 80

4.4.1 CRC Cards (Class-Responsibility-Collaborators) ............................................................ 80

4.4.2 Encryption algorithm .................................................................................................. 101

4.5 Sequence Diagram .............................................................................................................. 101

4.5.1 Login ............................................................................................................................ 101

4.5.2 Template Management .............................................................................................. 101

4.5.3 Producers Management ............................................................................................. 102

4.5.4 Product Categories Management ............................................................................... 104

4.5.5 Products Management................................................................................................ 106

Page 5: FPT University - Capstone project - Using QR Code to prevent fake products

5

4.5.6 Request management ................................................................................................. 109

4.5.7 Items Management ..................................................................................................... 111

4.5.8 Statistic ........................................................................................................................ 112

4.6 User Interface Design .......................................................................................................... 114

4.6.1 Description of the User Interface ................................................................................ 114

4.8 Database Design .................................................................................................................. 128

4.8.1 Producers .................................................................................................................... 128

4.8.2 AccountProfiles ........................................................................................................... 129

4.8.3 Products ...................................................................................................................... 129

4.8.4 Items ........................................................................................................................... 129

4.8.5 CheckingLogs ............................................................................................................... 129

4.8.6 Rating .......................................................................................................................... 129

4.8.7 Requests ...................................................................................................................... 130

4.8.8 Categories ................................................................................................................... 130

4.8.9 InfoTemplates ............................................................................................................. 130

5 Software Test Document ............................................................................................................ 131

5.1 Introduction ........................................................................................................................ 131

5.1.1 System Overview ......................................................................................................... 131

5.1.2 Test Approach ............................................................................................................. 131

5.2 Test Plan .............................................................................................................................. 131

5.2.1 GUI .............................................................................................................................. 131

5.2.2 Functions ..................................................................................................................... 131

5.2.3 Features not to be tested ........................................................................................... 132

5.3 Test cases: ........................................................................................................................... 132

5.3.1 GUI .............................................................................................................................. 132

5.3.2 Functions ..................................................................................................................... 151

5.4 4. Checklists ......................................................................................................................... 171

5.4.1 4.1 Checklist of Validation ........................................................................................... 171

5.4.2 4.2 Submission Checklist ............................................................................................. 171

6 User Manual ................................................................................................................................ 172

6.1 Minimum System Requirements ........................................................................................ 172

6.2 Deployment Manual ........................................................................................................... 172

6.3 Các chức năng và cách sử dụng - Features and how to use ............................................... 173

6.3.1 Dành cho nhà sản xuất – For Producer ....................................................................... 173

Page 6: FPT University - Capstone project - Using QR Code to prevent fake products

6

6.3.2 Dành cho người tiêu dùng – For Consumer ................................................................ 188

7 Appendix ..................................................................................................................................... 192

Page 7: FPT University - Capstone project - Using QR Code to prevent fake products

7

1 Introduction

1.1 Project Information Project name: Using QR Code to prevent fake products

Project name abbreviation: QR Anti-Counterfeit

Project code: QR4AC

Timeline: from May 2012 to Aug 2012

1.2 Purpose We have chosen this project as our capstone project. The first purpose is

to complete the FPT University’s syllabus. The second one is not only to create a software

engineering project but also to implement a business idea useful and interesting for our live.

1.3 People Full Name Roles in Group Contact

Phan Hồng An Developer, Team Leader [email protected]

Lê Kiến Trúc Developer, Business Analyst [email protected]

Phan Gia Nhật Developer, Technical Specialist [email protected]

Trần Quang Bình Developer, QA & Tester [email protected]

Lâm Hữu Khánh Phương Supervisor, Sponsor [email protected]

1.4 Problem

Forgery of goods and using known brand names for fake products is a growing phenomenon, and anti-counterfeit has never been an old problem today. Actually, the topic of brand piracy is practically present in almost every area of daily life. It includes consumer goods like fashion, food, beverages, industrial parts for cars, aircraft and other machines and even medications.

In 2008, the International Chamber of Commerce argued that counterfeiting accounts for around 5% to 7% of world trade. In the same year, the World Customs Organization estimated trade in ‘fakes’ as US$512 billion. The total loss from the counterfeit goods industry, faced by countries around the world is $600 Billion, with the United States facing the economic impact.

It is true that in some cases people want to buy fake products for their lower price, but it is still important that consumers will be able to validate the authenticity of the product they pay for whether fake or not. While many companies lose a lot of money from this phenomenon it may be that with today technology there are means to fight it. We would like to consider in this project the relevance of QR codes for fighting brand piracy.

1.5 Why QR Code Unlike the standard

barcode system in use

today, QR (abbreviated

from Quick Response)

Page 8: FPT University - Capstone project - Using QR Code to prevent fake products

8

codes are far more powerful and can contain much more information. While out current

barcoding system holds information only one-way, QR code holds information both vertically

and horizontally.

QR code is the modern technology helping read and collect digital information accurately, fast and fully. It is also the cheapest method when comparing to some other technologies such as NFC. If you want to know some necessary information for different purposes, all you need is a smartphone armed with a camera for reading the QR code and is able to access to the Internet. One of the main things we mention here is supporting anti-counterfeit. Technically, QR code will include some basic information of an item, a unique number and uncounterfeited confirmation code created based on cryptography algorithms. The only way you can counterfeit is to copy the QR code.

QR codes have only really become popular in 2011 because of the rise in the number of smartphone users and the increasing popularity and usability of the mobile web. Plenty of applications are available to read QR codes and in some handsets, this functionality is pre-installed.

1.6 Our Solution

The core services we provide are for producers. Our producers who use our services can generate and print unique QR code for their products before those products appear on the stores.

A consumer comes to the store. With a smartphone on hand, he or she can validate the authenticity of the product by scanning the QR code stuck on the product and then see the results via our confirmation website. The results we provide for consumers should include some useful information such as “This is a genuine security label”; “You are not in an address of an authorized reseller of us. Please be careful”; “This code is not available on our system”; etc.

1.7 Existing Systems & Market HP has been running Anti-Counterfeit Program using QR Code since 2012. Not every company in the

world has enough resources to create a system like HP. Therefore, we believe that if we run fast, we

would be able to enter a Blue Ocean where there are no competitors.

Page 9: FPT University - Capstone project - Using QR Code to prevent fake products

9

2 Software Project Planning

2.1 Problem Definition

2.1.1 Name of this CapStone Project

The official and formal project name is “Using QR Code to prevent fake product”. The product name

is QR Anti-Counterfeit, and the product code is QR4AC.

2.1.2 Problem Abstract

Be fascinated by the idea that QR code can contain more information than traditional barcode and

so using QR codes can create more secure solutions for anti-counterfeit problems today, the authors

of this project want to find a solution for fighting counterfeit using QR Code. After discussing with

many ideas, we choose the best one to implement. The idea we choose in this project is to provide

services for companies, which will help them manage their product identification on the websites.

Their customers, who want to buy genuine products instead of fake products, can validate the

products using smartphone by just scanning QR code stuck on the products and receive the results

from our website or the company’s website.

2.1.3 Project Overview

2.1.4 The Current System

HP has been running HP Anti-Counterfeit Program, Printing and Personal Systems for their inkjet

cartridges in select geographies. HP places a security seal on the packaging of many of its cartridges

so that it is easy to distinguish between genuine HP versus fake. Most counterfeit HP cartridges also

contain a fake security seal on the packaging. Checking for a security seal is not enough. HP uses an

online solution to make sure the security seal performs exactly as described to ensure that you are

purchasing a genuine HP cartridge. To check the authentication of a product, you can download a QR

code scanner app to your camera-enabled smartphone, and then scan the QR code on the security

seal. You will receive instant verification from HP. If your phone does not have a camera lens, you

can validate HP security seals online by going to HP.com/go/ok and entering the serial number from

the seal.

That is HP’s. We should recognize that not every company have enough resources to build a system

like HP, even some companies do not have websites. Why do not we create a system that is able to

provide services for any companies who want to protect their customers’ interest?

2.1.5 The Proposed System

The purpose of this project is to create a product providing services for all companies who want to

use QR code for their product identification and better quality of services for their customers.

The system will provide the following main features for companies who register our service:

Each company will have one or more authenticated account to login to the system.

Authenticated users can register their products and generate QR codes for their product

items. Each product item matches with only one QR code.

Authenticated users can manage all their products, product items, and QR codes.

Authenticated users can download QR code packages for their product items.

Page 10: FPT University - Capstone project - Using QR Code to prevent fake products

10

Authenticated users can view reports showing that which product checked at which time

and how many times checking.

The system will provide the following features for consumers, who are customers who want to buy

products of the companies using our service:

Consumers can validate the authentication of a product by scanning the QR code stuck on

the product and receive the results displayed on mobile phone.

Consumers can rate a product after checking an item of that product.

Consumers can find related products after checking an item of that product.

Consumers can review products registered on websites.

2.1.6 Boundaries of the System

The system under development of this Capstone Project will include:

The website complete

All the process documents involved

2.1.7 Development Environment

2.1.7.1 Hardware

Laptop or desktop with appropriate environment for developing and testing

Smartphones aimed with cameras for testing

2.1.7.2 Software

Microsoft Windows 7: OS for developing product

Microsoft Visual Studio 2010: used for developing product

Microsoft SQL Server 2008: used for database management for product

Microsoft Windows Server 2008: used for deploying and testing product

2.2 Project organization

2.2.1 Software Process Model

Due to specific characteristics of a Capstone project, the model we use for developing this project is

Waterfall model.

Page 11: FPT University - Capstone project - Using QR Code to prevent fake products

11

2.2.2 Roles and Responsibilities

Name Roles Responsibilities

Lâm Hữu Khánh Phương Supervisor, Sponsor - Advise idea & solutions - Suggest & support technologies

Phan Hồng An Developer, Team leader - Manage, control the project - Create coding framework - Code - Test - Take the responsibility for any

success or failure of the project

Lê Kiến Trúc Developer, Business Analyst, Imagineer

- Imagine, brainstorm - Analyze business & system - Code - Test

Phan Gia Nhật Developer, Technical Specialist

- Research new techniques and technologies

- Fix technical issues - Code - Test

Trần Quang Bình Developer, Tester, QC - Control the quality of project - Code - Test

2.2.3 Tools and Techniques

2.2.4 Tools

Assembla (www.assembla.com): subversion (SVN) repository

Page 12: FPT University - Capstone project - Using QR Code to prevent fake products

12

TortoiseSVN: used for committing source code into SVN

VisualSVN: extension for using SVN inside Visual Studio

Microsoft Project: for team leader to manage project

Gantter (gantter.com): like a web-based Microsoft Project for all team members to access easily

Asana (www.asana.com): for task management

Google Drive: for storing all documents include official documents for report and draft documents

Google Cloud Connect: connect and synchronize the documents

Google+ Hangout: for team meetings

2.2.5 Techniques

ASP.NET MVC 3.0, C# .NET, HTML & CSS, JavaScript & jQuery, AJAX, LINQ

2.3 Project management plan

2.3.1 Tasks

2.3.2 Ideation

Description Study QR code, research market, brainstorm solutions for anti-counterfeit using QR code, define project scope

Deliverables Introduction document, 32 man-days

Resource needed

Dependencies and Constraints

Using QR Code to prevent fake products

Risks Bad business idea can make the produce useless in the market

2.3.3 Project Planning

Description Plan the project, assign tasks to members

Deliverables Software Project Management Plan document, Coding conventions

Resource needed FPT’s templates, 20 man-days

Dependencies and Constraints

Risks Bad leadership or management skills Overestimate or underestimate can make a unqualified project

2.3.4 Software Requirement Specification

Description Specify software requirements

Deliverables Software Requirement Specification document

Resource needed FPT’s templates, 24 man-days

Dependencies and Constraints

Risks Bad analysis might make the product difficult to maintain in future

2.3.5 Software Design Description

Description Describe software design

Deliverables Software Design Description document, Prototype

Page 13: FPT University - Capstone project - Using QR Code to prevent fake products

13

Resource needed FPT’s templates, 40 man-days

Dependencies and Constraints

Risks Bad analysis might make the product difficult to maintain in future GUI is not friendly

2.3.6 Implementation

Description Develop the product

Deliverables Complete product

Resource needed Visual Studio 2010, SQL Server 2008, .NET Framework 4, 80 man-days

Dependencies and Constraints

MVC3, Coding convention

Risks Not all the functions can be done be deadline Decrease of members during implementation

2.3.7 Quality control

Description Control the quality of the product & testing

Deliverables Software Test Documentation

Resource needed FPT’s templates, 40 man-days

Dependencies and Constraints

Risks The product does not work properly as expect

2.3.8 Software User’s Manual

Description Write user’s manual

Deliverables Software User’s Manual

Resource needed FPT’s templates, 20 man-days

Dependencies and Constraints

English

Risks Dry words make user confuse

2.3.9 Release and Deployment

Description Release the complete product and deploy it to the server

Deliverables Complete product installation on server

Resource needed Server, 40 man-days

Dependencies and Constraints

Risks The application does not run properly when going live

2.3.10 Task Sheet: Assignment and Timetable

Task Duration Start - Finish Resources

Ideation 8 days 8/5 17/5

- Imagine, brainstorm, analyze business & research market TrucLK

- Study QR code and some other technologies involved NhatPG

- Write document BinhTQ

- Finalize business idea & define project scope AnPH

Project Planning 5 days 18/5 24/5

- Analyze the current systems on market & propose a new system with specific characteristics

TrucLK

- Write software project management plan & assign tasks to AnPH

Page 14: FPT University - Capstone project - Using QR Code to prevent fake products

14

team members

- Review document & correct if necessary BinhTQ, NhatPG

Software Requirement Specification 6 days 25/5 1/6

- Create use cases for functional requirements AnPH, TrucLK, BinhTQ, NhatPG

- Write non-functional requirements TrucLK

- Finalize document AnPH

Software Design Description 2 weeks 4/6 15/6

- Write document BinhTQ, TrucLK

- Draw diagrams TrucLK, BinhTQ, NhatPG

- Design database AnPH

- Create prototype AnPH, NhatPG

- Integrate, finalize document AnPH

Implementation 4 weeks 18/6 13/7

- Create coding framework AnPH

- Code server-side NhatPG, AnPH, BinhTQ

- Code client-side AnPH, TrucLK, NhatPG

Quality Control 6 weeks 18/6 27/7

- Create test plan 18/6 22/6 BinhTQ

- Create test cases 25/6 29/6 BinhTQ, NhatPG, TrucLK

- Unit Test 16/7 20/7 BinhTQ, NhatPG, AnPH

- System Test 23/7 27/7 AnPH, TrucLK

- Complete Software Test Document (STD) 23/7 27/7 BinhTQ, NhatPG

Software User’s Manual 1 week 30/7 3/8

- Write installation guide NhatPG, AnPH

- Write user guide TrucLK, BinhTQ

Release and Deployment 3 weeks 30/7 17/8

- Input initial data BinhTQ, NhatPG

- Go live AnPH, TrucLK

- Prepare for final presentation AnPH, TrucLK, BinhTQ, NhatPG

2.4 Coding Convention

2.4.1 Naming conventions

Private Fields: underscore followed by lowerCamelCase

Non-private Fields and properties: UpperCamelCase

Local variables: lowerCamelCase

Do not use consecutive underscores in name

Do not use Hungarian style

2.4.2 Lengths

Public name should not be longer than 32 characters or 7 words

Methods should contain no more than 70 lines of code (if it is, it must be divided into

methods)

Methods should contain no more than 5 levels of indentation (if it is, it must be divided into

methods)

A line of code should contain no more than 80 characters

2.4.3 Other convention

Use var keyword whenever possible

Page 15: FPT University - Capstone project - Using QR Code to prevent fake products

15

Remove all unnecessary using in file header

Do not allow empty catch block

Page 16: FPT University - Capstone project - Using QR Code to prevent fake products

16

3 Software Requirement Specifiation

3.1 User Requirement Specification

3.1.1 Overview

As we all know, the counterfeit of goods, especially famous brand names, has grown significantly

year after year and there is no sign that it will decrease in the near future. So how can we fight it?

How can we overcome it? Actually now there is no way to absolutely stop it. However, we can

reduce its development. We can make life more difficult for the ones who just earn money from

people’s hardworking, diligent results. Therefore, we in this project introduce you one way for

decrease your risk at taking fake product. Using QR code, our system will support you in determining

whether a product is a fake or not.

For producers, who are the ones losing the most money due to counterfeit, they can use our system

to somewhat reduce their loss. The process is very simple. First, we can start negotiating. After that,

we sign contract. Then we provide an account for you to generate QR code. From that, you can stick

it to your product.

For consumers, they can use our system to gain guarantee degree for a product on which they will

spend a lot of money.

Page 17: FPT University - Capstone project - Using QR Code to prevent fake products

17

3.1.2 Administrator requirements

Administrators could login to the system using their accounts.

Administrators could add producers into the system.

Administrators could view and search producers on the system.

Administrators could deactivate or reactivate producers.

Administrators could create accounts for producers.

Administrators could view all the accounts of a specific producer.

Administrators could remove producer accounts.

3.1.3 Producer requirements

Producers could login to the system using their accounts.

Producers could view and search all their products on the system.

Producers could deactivate or reactivate their products on the system.

Producers could create information templates for their product information.

Producers could create categories for their product information.

Producers could add product items into the system and generate unique QR codes for those

items.

Producers could view the all the items containing unique QR code of a specific product

registered.

Producers could deactivate or reactivate their items on the system.

Producers could view statistic of all their product items, includes number of checks, which

consumer check at which time, etc.

3.1.4 Consumer requirements

Consumers could validate the authentication of a product item using their smartphone

aimed with a camera, a barcode reader, a mobile browser, and an Internet connection.

Consumers could rate a product after validating its item.

3.1.5 Item checking requirements

3.1.5.1 How QR code could fight against counterfeiting

QR code could store big data with error recovery. Therefore, we can put it easily on item. However,

QR code still can be faked and copy. We will provide some mechanisms to protect the QR code.

3.1.5.2 Prevent fake QR code:

After decode QR code, we will have an URL to our system. This URL is unique for each item. The URL

will contain item ID and a secure password.

We will combine these parameters with secret key and finally hashed to make a secure string. The

security hash string cannot be guest or generate because of secret key. On later version, we could

also use public-key cryptography algorithm. What shall we do if some people completely build

another website with same functionalities for phishing? We need to have a strong brand that easy to

remember and check by consumer.

3.1.5.3 Prevent QR code from stolen for fake product

The QR code can still be vulnerable from identically copying. Therefore, the problem is how to detect

the stolen code.

Page 18: FPT University - Capstone project - Using QR Code to prevent fake products

18

The strategy of counterfeit is mass produce as much as possible and reduce cost to make benefit

from risk. They cannot steal all QR code and make the same. They can just copy a little of QR code

from the market but it will take time and risk. System could use data mining techniques with

patterns and cases to determine stolen QR code from real one. These patterns include time, location,

number, frequently be calculated with a formula then giving a reliability suggestion of product. This

formula would be improved during operation.

3.1.6 Out of Scope

Nowadays, there is a lot of software used for reading QR code on mobile. Therefore, our team will

not go too far in this section. In the other hand, our solution focuses on business processes more

than technologies. The favorite software we would like to use most is Barcode Scanner, which you

can easily find on Google Play or iTunes App Store.

3.2 System Requirement Specification

3.2.1 External Interface Requirements

3.2.1.1 User Interfaces

The look and feel of this website should rely on user requirements, no matter if users access via

mobile or computer. Page layout and navigation should be as intuitive and easy as possible.

Moreover, the design should be responsive. It means that the web components should be scaled

according to a range of resolutions and devices to provide a consistent experience, no matter what.

3.2.1.2 Hardware Interfaces

All things producer needs to access to use our system are a computer and an Internet connection.

Consumer needs to have a smartphone aimed with a camera, a QR code reader, and an Internet

connection in order to scan QR code on the product item and access our system to see the results.

3.2.1.3 Software Interfaces

Our product runs on web platform. It requires being able to run on browsers of both PCs and

mobiles.

Software Version Source

.NET Framework 4.0 Microsoft

SQL Server 2008 Microsoft

Visual Studio 2010 Microsoft

MVC 3.0 Microsoft

Browsers Latest version of any browser (recommended)

Mozilla, Google, Apple, etc.

3.2.1.4 Communications Protocol

The protocol we would use is HTTP. We run our system on the browser using standard protocols for

communication between client and server.

Page 19: FPT University - Capstone project - Using QR Code to prevent fake products

19

3.2.2 System Features

QR4AC System

Consumer

Rate product

Producer

Login

Update profile

Manage products

Administrator

Manage producers

Manage accounts

<<include>>

<<include>>

<<include>>

<<include>>

<<extend>>

Manage items

Validate Item

View ConsumerCheck Statistic

Manage InformationTemplates

Manage Requests

View ProductDetails

Manage Categories

Figure 1 - Overal Use Case Diagram

3.2.2.1 User Authentication

3.2.2.1.1 User Case-User Login Diagram

AdministratorLogin

Producer

QR4AC

<<include>>

Logout

Figure 2 - User Case-User Login Diagram

Page 20: FPT University - Capstone project - Using QR Code to prevent fake products

20

3.2.2.1.2 Use Case-Login Specification

USE CASE- Login SPECIFICATION

Use-case No. UC101 Use-case Version 1.0

Use-case Name Login

Author BinhTQ

Date 31/05/2012 Priority High

Actor:

Administrator, Producer

Summary:

This use case allows administrator or producer to log on into the system

Goal:

Log on into the system

Triggers

Click to open login form on Navigation Bar

Preconditions:

User has an account and has not logged in yet

Post Conditions:

User has logged in

Redirects to List Page

Main Success Scenario:

Step Actor Action System Response

1 Enter the website Display a form for login

2 Fills user name and password

3 Click to “Login” button. Redirects to Home Page

Page 21: FPT University - Capstone project - Using QR Code to prevent fake products

21

Alternative Scenario:

Step Actor Action System Response

1 Enter the website Display a form for login

2 Fills only user name or password

3 Click to “Login” button. Display an error message

Exceptions:

Step Actor Action System Response

1 Enter the website Display a form for login

2 Fills user name and password

3 Click to “Login” button Cannot logged in and display an error

message

Relationships:

N/A

Business Rules:

None

3.2.2.1.3 Use Case-Logout Specification

USE CASE-Logout SPECIFICATION

Use-case No. UC102 Use-case Version 1.0

Use-case Name Logout

Author BinhTQ

Date 31/05/2012 Priority High

Actor:

Administrator, Producer

Page 22: FPT University - Capstone project - Using QR Code to prevent fake products

22

Summary:

This use case allows administrator or producer to logout the system

Goal:

Logout the system

Triggers

Click “Logout” link

Preconditions:

User logged into the system successfully

Post Conditions:

User has logged out

Redirects to Login page

Main Success Scenario:

Step Actor Action System Response

1 Click “Logout” link Redirects to Login page

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

N/A

Business Rules:

None

Page 23: FPT University - Capstone project - Using QR Code to prevent fake products

23

3.2.2.2 Producer Management

3.2.2.2.1 Use Case-Producer Management Diagram

Administrator

List all producers

QR4AC

Register newproducer

Update informationof producerProducer Management

Switch produceractivation

Figure 3 - Use Case-Producer Management Diagram

3.2.2.2.2 Use Case-Add New Producer with Account Specification

USE CASE-Add New Producer SPECIFICATION

Use-case No. UC201 Use-case Version 1.0

Use-case Name Add New Producer

Author AnPH

Date 31/05/2012 Priority High

Actor:

Administrator

Summary:

This use case allows administrator to add a new producer into the system

Page 24: FPT University - Capstone project - Using QR Code to prevent fake products

24

Goal:

Add a new producer into the system

Triggers

Click “Add New Producer” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

System refresh the list of producers on Producer List Page

Main Success Scenario:

Step Actor Action System Response

1 Click on “Add New producer” on Producer

List Page or on Sidebar

Display a form for adding producer

2 Fills all mandatory data fields

3 Click to “Submit” button. Close the form and refresh the list of

producers

Alternative Scenario:

Step Actor Action System Response

1 Click on “Add New producer” on Producer

List Page or on Sidebar

Display a form for adding producer

2 Fills all mandatory data fields

3 Click to “Back to List” button. Close the form

Exceptions:

Step Actor Action System Response

1 Click on “Add New producer” on Producer

List Page or on Sidebar

Display a form for adding producer

2 Fills all mandatory data fields

3 Click to “Submit” button. Shows all required messages for all missing

mandatory data fields

Page 25: FPT University - Capstone project - Using QR Code to prevent fake products

25

Relationships:

Log in use case

Business Rules:

None

3.2.2.2.3 Use Case-List all Producers Specification

USE CASE-List all Producers SPECIFICATION

Use-case No. UC202 Use-case Version 1.0

Use-case Name List all Producers

Author BinhTQ

Date 31/05/2012 Priority High

Actor:

Administrator

Summary:

This use case allows administrator to view the list of all producers

Goal:

View the list of all producers

Triggers

Click on “List all Producers” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

System redirects user to Producer List Page

Main Success Scenario:

Page 26: FPT University - Capstone project - Using QR Code to prevent fake products

26

Step Actor Action System Response

1 Click on “List all Producers” on Sidebar Display the Producer List Page including the

list of all producers

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

3.2.2.2.4 Use Case-Update Producer Information Specification

USE CASE-Update Producer Information SPECIFICATION

Use-case No. UC203 Use-case Version 1.0

Use-case Name Update Producer Information

Author BinhTQ

Date 31/05/2012 Priority High

Actor:

Administrator

Summary:

This use case allows administrator to update information of a producer

Goal:

Update producer information

Page 27: FPT University - Capstone project - Using QR Code to prevent fake products

27

Triggers

Click on “Update” on a row of the Producer List page

Preconditions:

User logged into the system successfully

Post Conditions:

System refreshes the list of producers on Producer List Page

Main Success Scenario:

Step Actor Action System Response

1 Click on “Update” on a row of the

producer list on Producer List Page

Display a form for update producer

information

2 Update some data fields

3 Click to “Save changes” button Redirect to Producer List page

Alternative Scenario:

Step Actor Action System Response

1 Click on “Update” on a row of the

producer list on Producer List Page

Display a form for update producer

information

2 Update some data fields

3 Click to “Back to List” button Redirect to Producer List page

Exceptions:

Step Actor Action System Response

1 Click on “Update” on a row of the

producer list on Producer List Page

Display a form for update producer

information

2 Update some data fields

3 Click to “Save changes” button Shows all required messages for all missing

mandatory data fields

Relationships:

Log in use case

Business Rules:

Page 28: FPT University - Capstone project - Using QR Code to prevent fake products

28

None

3.2.2.2.5 Use Case-Switch Producer Activation Specification

USE CASE-Switch Producer Activation SPECIFICATION

Use-case No. UC204 Use-case Version 1.0

Use-case Name Switch Producer Activation

Author AnPH

Date 31/05/2012 Priority High

Actor:

Administrator

Summary:

This use case allows administrator to deactivate/activate a producer in the system

Goal:

Deactivate/Activate a producer in the system

Triggers

Click on “Deactivate”/”Activate” on the list of all producers on Producer List Page

Preconditions:

User logged into the system successfully

Post Conditions:

Producer status togged and Producer List refreshed

Main Success Scenario:

Step Actor Action System Response

1

Click on “Deactivate”/”Activate” on a row

of a producer on the list of producers on

the Producer List Page

A confirmation dialog appears

Page 29: FPT University - Capstone project - Using QR Code to prevent fake products

29

2 Click “Yes” Close the message box and refresh the

producer list with the status toggled

Alternative Scenario:

Step Actor Action System Response

1

Click on “Deactivate”/”Activate” on a row

of a producer on the list of producers on

the Producer List Page

A confirmation dialog appears

2 Click “No” Close the message box

Exceptions:

N/A

Relationships:

List all Producers use case

Business Rules:

None

3.2.2.3 Account Management

3.2.2.3.1 Use Case-Account Management Diagram

Administrator

List All Accounts

QR4AC

Create Account

Account Management

Remove account

Change password

Figure 4 - Use Case-Account Management Diagram

Page 30: FPT University - Capstone project - Using QR Code to prevent fake products

30

3.2.2.3.2 Use Case-Create New Account Specification

USE CASE-Create New Account SPECIFICATION

Use-case No. UC301 Use-case Version 1.0

Use-case Name Create New Account

Author BinhTQ

Date 31/05/2012 Priority Normal

Actor:

Administrator

Summary:

This use case allows administrator to create an account for a producer

Goal:

Create an account for a producer

Triggers

View Product Update page

Preconditions:

User logged into the system successfully

Post Conditions:

System refresh the list of accounts displayed on Producer Detail page

Main Success Scenario:

Step Actor Action System Response

1 Fills all mandatory data fields on “Create

Account” form on Producer Update page

2 Click to “Submit” button Refresh the list of accounts

Alternative Scenario:

Page 31: FPT University - Capstone project - Using QR Code to prevent fake products

31

Step Actor Action System Response

1 Fills all mandatory data fields on “Create

Account” form on Producer Update page

3 Click to “Reset” button. Reset the form

Exceptions:

Step Actor Action System Response

1

Fills all mandatory data fields on “Create

Account” form on Producer Update page.

Some are skipped.

Display a form for creating account

3 Click to “Submit” button. Shows all required messages for all missing

mandatory data fields

Relationships:

Update Producer Information use case

Business Rules:

None

3.2.2.3.3 Use Case-List all Producer Accounts of a Specific Producer Specification

USE CASE-List all Accounts SPECIFICATION

Use-case No. UC302 Use-case Version 1.0

Use-case Name List all Accounts of a Specific Producer

Author BinhTQ

Date 31/05/2012 Priority Normal

Actor:

Administrator

Summary:

This use case allows administrator to view all accounts of a producer

Page 32: FPT University - Capstone project - Using QR Code to prevent fake products

32

Goal:

View all accounts of a producer

Triggers

View Producer Update page

Preconditions:

User logged into the system successfully

Post Conditions:

System display the list of accounts of that producer

Main Success Scenario:

Step Actor Action System Response

1 Click on “Accounts” in Producer Update

page or on Sidebar

Display the list of accounts

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Update Producer Information use case

Business Rules:

None

3.2.2.3.4 Use Case-Remove an Account Specification

USE CASE-Remove an Account SPECIFICATION

Use-case No. UC303 Use-case Version 1.0

Use-case Name Remove an Account

Page 33: FPT University - Capstone project - Using QR Code to prevent fake products

33

Author BinhTQ

Date 31/05/2012 Priority Normal

Actor:

Administrator

Summary:

This use case allows administrator to remove an account of a producer

Goal:

Remove an account of a producer

Triggers

Click “Delete” on a row of an account on the list of accounts

Preconditions:

User logged into the system successfully

Post Conditions:

System display the list of accounts of that producer

Main Success Scenario:

Step Actor Action System Response

1

Click on “Delete” on a row of an account on

the list of accounts on the Producer Detail

page

Display a confirmation message

2 Click “Yes” Close the message and refresh the list of

accounts

Alternative Scenario:

Step Actor Action System Response

1

Click on “Remove” on a row of an account

on the list of accounts on the Producer

Detail page

Display a confirmation message

2 Click “No” Close the message

Exceptions:

Page 34: FPT University - Capstone project - Using QR Code to prevent fake products

34

N/A

Relationships:

Update Producer Information use case

Business Rules:

None

3.2.2.3.5 Use Case-Change Password Specification

USE CASE-Change Password SPECIFICATION

Use-case No. UC304 Use-case Version 1.0

Use-case Name Change Password

Author BinhTQ

Date 31/05/2012 Priority Normal

Actor:

Administrator

Summary:

This use case allows administrator or producer to change their own password

Goal:

Change own password

Triggers

Click “Change password” on Authentication popup on Navigation Bar

Preconditions:

User logged into the system successfully

Post Conditions:

System display form for changing password

Page 35: FPT University - Capstone project - Using QR Code to prevent fake products

35

Main Success Scenario:

Step Actor Action System Response

1 Click on “Change password” on

Authentication popup on Navigation Bar

Redirect to Change Password page

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

3.2.2.4 Information Template Management

3.2.2.4.1 Use Case-Information Template Management Diagram

Producer

QR4AC

Delete Template

InfoTemplatesManagement

List all Templates Add new Template

Update Template

Figure 5 - Use Case-Information Template Management Diagram

Page 36: FPT University - Capstone project - Using QR Code to prevent fake products

36

3.2.2.4.2 Use Case-Create New Information Template Specification

USE CASE-Create New Information Template SPECIFICATION

Use-case No. UC401 Use-case Version 1.0

Use-case Name Create new information template

Author AnPH

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

This use case allows producer to create new information template for their products

Goal:

Add new information template and generate unique QR codes for them

Triggers

Click “Create New Template” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

Information template added

Main Success Scenario:

Step Actor Action System Response

1 Click on “Create New Template” on

Sidebar

Redirect to Create New Information

Template page

2 Fills all mandatory data fields

3 Click to “Submit” button Redirect to Template List Page

Page 37: FPT University - Capstone project - Using QR Code to prevent fake products

37

Alternative Scenario:

Step Actor Action System Response

1 Click on “Create New Template” on

Sidebar

Redirect to Create New Information

Template page

2 Fills all mandatory data fields

3 Click to “Back to List” button Redirect to Template List Page

Exceptions:

Step Actor Action System Response

1 Click on “Create New Template” on

Sidebar

Redirect to Create New Information

Template page

2 Fills all mandatory data fields

3 Click to “Submit” button Shows all required messages for all missing

mandatory data fields

Relationships:

Log in use case

Business Rules:

None

3.2.2.4.3 Use Case-List all Information Templates Specification

USE CASE-List all Information Templates SPECIFICATION

Use-case No. UC402 Use-case Version 1.0

Use-case Name List all Information Templates

Author AnPH

Date 30/05/2012 Priority Normal

Page 38: FPT University - Capstone project - Using QR Code to prevent fake products

38

Actor:

Producer

Summary:

This use case allows producer to view their all information templates created on the system

Goal:

View list of all information templates

Triggers

Click “List all Templates” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

List of product is shown on the screen

Main Success Scenario:

Step Actor Action System Response

1 Click on “List all Templates” on Sidebar Show the information template list based on

the producer logged in

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

Page 39: FPT University - Capstone project - Using QR Code to prevent fake products

39

3.2.2.4.4 Use Case-Update Information Template Specification

USE CASE-Update Template Information SPECIFICATION

Use-case No. UC403 Use-case Version 1.0

Use-case Name Update Template Information

Author AnPH

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

This user case allows producer to update template information

Goal:

Update template information

Triggers

Click “Update” on a row of template list on Template List Page

Preconditions:

User logged into the system successfully

Post Conditions:

System redirects user to the template List Page

Main Success Scenario:

Step Actor Action System Response

1

Click on “Update” on a row of information

template list on Information Template List

Page

Display a form for update

2 Update information

Page 40: FPT University - Capstone project - Using QR Code to prevent fake products

40

3 Click “Save changes” button Redirect to Information Template List Page

Alternative Scenario:

Step Actor Action System Response

1

Click on “Update” on a row of information

template list on Information Template List

Page

Display a form for update

2 Update information

3 Click “Back to List” button Redirect to Information Template List Page

Exceptions:

Step Actor Action System Response

1

Click on “Update” on a row of information

template list on Information Template List

Page

Display a form for update

2 Update information

3 Click “Save changes” button Shows all required messages for all missing

mandatory data fields

Relationships:

Log in use case

Business Rules:

None

3.2.2.4.5 Use Case-Delete Information Template Specification

USE CASE-Delete an Information Template SPECIFICATION

Use-case No. UC404 Use-case Version 1.0

Use-case Name Delete an Information Template

Author NhatPG

Page 41: FPT University - Capstone project - Using QR Code to prevent fake products

41

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allow producer to remove an information template when it should not be

available any more

Goal:

Remove an information template

Triggers

Click “Delete” on Information Template List

Preconditions:

User logged into the system successfully

Post Conditions:

System redirects user to the information template List Page

Main Success Scenario:

Step Actor Action System Response

1 Click on “Delete” on a row of template list

on Information Template List page

A confirmation dialog appears

2 Click “Yes” The template is removed

Alternative Scenario:

Step Actor Action System Response

1 Click on “Delete” on a row of template list

on Information Template List Page

A confirmation dialog appears

2 Click “Yes” Nothing changes

Exceptions:

N/A

Relationships:

Page 42: FPT University - Capstone project - Using QR Code to prevent fake products

42

List all Information Templates use case

Business Rules:

None

3.2.2.5 Product Management

3.2.2.5.1 Use Case-Product Management Diagram

Producer

List all products

QR4AC

Product Management

Switch productactivationView product

details

Add new product

Update productinformation

Figure 6 - Use Case-Product Management Diagram

3.2.2.5.2 Use Case-Add New Product Specification

USE CASE-Add New Product SPECIFICATION

Use-case No. UC501 Use-case Version 1.0

Use-case Name Add New Product

Author AnPH

Date 30/05/2012 Priority High

Actor:

Page 43: FPT University - Capstone project - Using QR Code to prevent fake products

43

Producer

Summary:

This use case allows producer to register a new product for its availability in the system

Goal:

Add New Product

Triggers

Click “Add New Product” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

System redirects user to the Product List Page

Main Success Scenario:

Step Actor Action System Response

1 Click on “Add New Product” in Product List

Page or on Sidebar

Redirect to Add New Product page

2 Fills all mandatory data fields

3 Click to “Submit” button Redirect to Product List Page

Alternative Scenario:

Step Actor Action System Response

1 Click on “Add New Product” in Product List

Page or on Sidebar

Redirect to Add New Product page

2 Fills all mandatory data fields

3 Click to “Back to List” button Redirect to Product List Page

Exceptions:

Step Actor Action System Response

1 Click on “Add New Product” in Product List

Page or on Sidebar

Redirect to Add New Product page

Page 44: FPT University - Capstone project - Using QR Code to prevent fake products

44

2 Fills some mandatory data fields. Some

are skipped

3 Click to “Submit” button Shows all required messages for all missing

mandatory data fields

Relationships:

Log in use case

Business Rules:

None

3.2.2.5.3 Use Case-List all Products Specification

USE CASE-List all Products SPECIFICATION

Use-case No. UC502 Use-case Version 1.0

Use-case Name List all Products

Author NhatPG

Date 30/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allows producer to view their all products registered on the system

Goal:

View list of all products

Triggers

Click “List all Products” on Sidebar

Preconditions:

User logged into the system successfully

Page 45: FPT University - Capstone project - Using QR Code to prevent fake products

45

Post Conditions:

List of product is shown on the screen

Main Success Scenario:

Step Actor Action System Response

1 Click on “List all Products” on Sidebar Show the product list based on the producer

logged in

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

3.2.2.5.4 Use Case-Update Product Information Specification

USE CASE-Update Product Information SPECIFICATION

Use-case No. UC503 Use-case Version 1.0

Use-case Name Update Product Information

Author AnPH

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

Page 46: FPT University - Capstone project - Using QR Code to prevent fake products

46

This user case allows producer to update some information of a product

Goal:

Show the most accurate traits of product

Triggers

Click “Update” on a row of product list on Product List Page

Preconditions:

User logged into the system successfully

Post Conditions:

Data updated

System redirects user to the product List Page

Main Success Scenario:

Step Actor Action System Response

1 Click “Update” on a row of Product List Redirect to Update Product page

2 Update information

3 Click “Save changes” button Redirect to Product List Page

Alternative Scenario:

Step Actor Action System Response

1 Click “Update” on a row of Product List Redirect to Update Product page

2 Update information

3 Click “Back to List” button Redirect to Product List Page

Exceptions:

Step Actor Action System Response

1 Click “Update” on a row of Product List Redirect to Update Product page

2 Update information (some mandatory

fields are skipped)

3 Click “Save changes” button Shows all required messages for all missing

mandatory data fields

Page 47: FPT University - Capstone project - Using QR Code to prevent fake products

47

Relationships:

Log in use case

Business Rules:

None

3.2.2.5.5 Use Case-Switch Product Activation Specification

USE CASE-Switch Product Activation SPECIFICATION

Use-case No. UC504 Use-case Version 1.0

Use-case Name Switch Product Activation

Author NhatPG

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allow producer to deactivate/activate a product when should not be available

any more

Goal:

Switch activation of a product

Triggers

Click “Deactivate”/”Activate” on Sidebar

Preconditions:

User logged into the system successfully

Post Conditions:

Product status toggled and Product List refreshed

Main Success Scenario:

Page 48: FPT University - Capstone project - Using QR Code to prevent fake products

48

Step Actor Action System Response

1 Click on “Deactivate”/”Activate” on

Product List

A confirmation dialog appears

2 Click “Yes” Close the message box and refresh the

product list with the status toggled

Alternative Scenario:

Step Actor Action System Response

1 Click on “Deactivate”/”Activate” on

Product List

A confirmation dialog appears

2 Click “No” Nothing changes

Exceptions:

N/A

Relationships:

List all Products use case

Business Rules:

When a product is out-of-date or the producer does not manufacture it any more, a product

might be deactivated to announce, “it is no more supported.”

Page 49: FPT University - Capstone project - Using QR Code to prevent fake products

49

3.2.2.5.6 Use Case-View Product Details

Consumer

QR4AC

View ProductDetails

Rating and Comment<<include>>

Figure 7 - Use Case-View Product Details

USE CASE-Update Information of a Product SPECIFICATION

Use-case No. UC505 Use-case Version 1.0

Use-case Name View Product Details

Author TrucLK

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This user case allows Consumer to view product details

Goal:

Show the product details

Triggers

Page 50: FPT University - Capstone project - Using QR Code to prevent fake products

50

Select product on “Product List”

Preconditions:

User access to the website

Post Conditions:

Product details displayed

Main Success Scenario:

Step Actor Action System Response

1 Select a product on Product List grid view Display product details

Relationships:

None

Business Rules:

None

3.2.2.6 Category Management

3.2.2.6.1 Use Case- Category Management Diagram

Administrator

QR4AC

Remove category

CategoriesManagement

List all Categories

Create new category

Figure 8 - Use Case- Category Management Diagram

Page 51: FPT University - Capstone project - Using QR Code to prevent fake products

51

3.2.2.6.2 Use Case-Create New Category Specification

USE CASE-Create New Category SPECIFICATION

Use-case No. UC601 Use-case Version 1.0

Use-case Name Create new category

Author AnPH

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

This use case allows producer to create new category for their products when this category

does not exists

Goal:

Create new category

Triggers

Product updated with new category name which does not existed

Preconditions:

User logged into the system successfully

Post Conditions:

Category added

Main Success Scenario:

Step Actor Action System Response

1 Product updated with a new category

name

2 New category added into the system

Alternative Scenario:

Page 52: FPT University - Capstone project - Using QR Code to prevent fake products

52

N/A

Exceptions:

N/A

Relationships:

Update Product Information use case

Business Rules:

None

3.2.2.6.3 Use Case-Remove Category

USE CASE-Remove Category SPECIFICATION

Use-case No. UC602 Use-case Version 1.0

Use-case Name Remove category

Author AnPH

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

This use case allows to remove a category when it does not contain any products any more

Goal:

Remove old category

Triggers

Product updated and a category does not contain any products any more

Preconditions:

User logged into the system successfully

Page 53: FPT University - Capstone project - Using QR Code to prevent fake products

53

Post Conditions:

Category added

Main Success Scenario:

Step Actor Action System Response

1 Product updated and a category does not

containing any product any more

2 Old category removed

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Update Product Information use case

Business Rules:

None

Page 54: FPT University - Capstone project - Using QR Code to prevent fake products

54

3.2.2.7 Request Management

3.2.2.7.1 Use Case-Request Management Diagram

Producer

QR4AC

Request Management

List all Request

Create new request

Download QRPackage

Figure 9 - Use Case-Item Package/Request Management Diagram

3.2.2.7.2 Use Case-Create New Request Specification

USE CASE-Create New Request Specification

Use-case No. UC701 Use-case Version 1.0

Use-case Name Create New Request

Author NhatPG

Date 31/05/2012 Priority High

Actor:

Producer

Summary:

This use case allows producer to create new request to the system for creating items

Goal:

Page 55: FPT University - Capstone project - Using QR Code to prevent fake products

55

Create new request for creating items

Triggers

Click “Create items” on Product Update page or Product List page

Preconditions:

User logged into the system successfully

Post Conditions:

Request created and waits for creating items

Main Success Scenario:

Step Actor Action System Response

1 Click on “Create items” on Product detail

page

Redirect to Create Items page

2 Fills all mandatory data fields

3 Click to “Create items” button Create request and redirect to Request List

page; waiting for creating items processing

Alternative Scenario:

Step Actor Action System Response

1 Click on “Create items” on Product detail

page

Redirect to Create Items page

2 Fills all mandatory data fields

3 Click to “Back to Product List” button Redirect to Product List page

Exceptions:

Step Actor Action System Response

1 Click on “Create items” on Product detail

page

Redirect to Create Items page

2 Fills some mandatory data fields but skips

some

3 Click to “Submit” button Shows all required messages for all missing

mandatory data fields

Relationships:

Page 56: FPT University - Capstone project - Using QR Code to prevent fake products

56

Log in use case

Business Rules:

None

3.2.2.7.3 Use Case-List all Requests Specification

USE CASE-List all Requests SPECIFICATION

Use-case No. UC702 Use-case Version 1.0

Use-case Name List all Requests Specification

Author NhatPG

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allows producer to view all requests created on the system

Goal:

View the list of requests created

Triggers

Click “List all Requests” on Sidebar

Preconditions:

User is logged into system successfully

Post Conditions:

List of items is shown screen

Main Success Scenario:

Step Actor Action System Response

Page 57: FPT University - Capstone project - Using QR Code to prevent fake products

57

1 Click on “List of Requests” on Sidebar Display the list of requests

Alternative Scenario:

None

Exceptions:

None

Relationships:

Login use case

Business Rules:

None

3.2.2.7.4 Use Case-Download QR Code Packages Specification

USE CASE-Download QR Code Packages SPECIFICATION

Use-case No. UC703 Use-case Version 1.0

Use-case Name Download QR Code Packages Specification

Author NhatPG

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allows producer to download QR code packages

Goal:

Download QR code packages

Triggers

Click “Download” on a row of Request List

Page 58: FPT University - Capstone project - Using QR Code to prevent fake products

58

Preconditions:

User is logged into system successfully

Post Conditions:

List of items is shown screen

Main Success Scenario:

Step Actor Action System Response

1 Click on “Download” on a row of Request

List

File downloaded into computer

Alternative Scenario:

None

Exceptions:

None

Relationships:

Login use case

Business Rules:

None

Page 59: FPT University - Capstone project - Using QR Code to prevent fake products

59

3.2.2.8 Item Management

3.2.2.8.1 Use Case-Item Management Diagram

Producer

List All Items

QR4AC

Add New Items

Item Management

Switch itemactivation

Upload for Search

Figure 10 - Use Case-Item Management Diagram

3.2.2.8.2 Use Case-Create New Items Specification

USE CASE-Create New Items Specification

Use-case No. UC801 Use-case Version 1.0

Use-case Name Create New Items

Author NhatPG

Date 31/05/2012 Priority High

Actor:

System

Summary:

This use case allows to create items

Goal:

Page 60: FPT University - Capstone project - Using QR Code to prevent fake products

60

Add new product items and generate unique QR codes for them

Triggers

Request created by producer

Preconditions:

Service is running

Post Conditions:

Product items added and QR code generated

Main Success Scenario:

Step Actor Action System Response

1 Request is created

2 Add product items with unique QR codes.

Alternative Scenario:

N/A

Exceptions:

Step Actor Action System Response

1 Request is created

2 Creating failed

Relationships:

Create New Request use case

Business Rules:

None

3.2.2.8.3 Use Case-List all Items Specification

USE CASE-List all Items SPECIFICATION

Use-case No. UC802 Use-case Version 1.0

Page 61: FPT University - Capstone project - Using QR Code to prevent fake products

61

Use-case Name List all Items Specification

Author NhatPG

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allows producer to view all items belong to a product on the system

Goal:

View the list of items of a product

Triggers

Click “View items” on Product List page

Preconditions:

User is logged into system successfully

Post Conditions:

List of items is shown screen

Main Success Scenario:

Step Actor Action System Response

1 Click on “List of Items” in Product Detail

page

Display the list of items

Alternative Scenario:

None

Exceptions:

None

Relationships:

List products use case

Business Rules:

Page 62: FPT University - Capstone project - Using QR Code to prevent fake products

62

None

3.2.2.8.4 Use Case-Upload QR Codes for Search

USE CASE-Upload QR Codes for Search SPECIFICATION

Use-case No. UC803 Use-case Version 1.0

Use-case Name Upload QR Codes for Search

Author AnPH

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allow producer to upload QR codes for search product items

Goal:

Search items based on QR code images

Triggers

Click “Upload for Search” on Item List page

Preconditions:

User is logged into system successfully

Post Conditions:

Found items displayed

Main Success Scenario:

Step Actor Action System Response

1 Click “Upload for Search” on Item List page

2 Click “Upload” and select files or drag-and- Upload file, display found items

Page 63: FPT University - Capstone project - Using QR Code to prevent fake products

63

drop files from Explorer for upload

Alternative Scenario:

Step Actor Action System Response

1 Click “Upload for Search” on Item List page

2 Click “Upload” and select files or drag-and-

drop files from Explorer for upload

Upload failed, or QR codes not found

Exceptions:

None

Relationships:

List items use case

Business Rules:

None

3.2.2.8.5 Use Case-Switch Activation of Items Specification

USE CASE-Remove Items SPECIFICATION

Use-case No. UC804 Use-case Version 1.0

Use-case Name Remove Items

Author NhatPG

Date 31/05/2012 Priority Normal

Actor:

Producer

Summary:

This use case allow producer to activate/deactivate items on the system

Goal:

Page 64: FPT University - Capstone project - Using QR Code to prevent fake products

64

Activate/Deactivate items from the system

Triggers

Select items on the list of Items and click Activate/Deactivate

Preconditions:

User is logged into system successfully

Post Conditions:

Item status toggled and Item List refreshed

Main Success Scenario:

Step Actor Action System Response

1 Click on “Activate”/”Deactivate” in Items

List page

A confirmation dialog appears

2 Click “Yes” Close the message box and refresh the item

list with the status toggled

Alternative Scenario:

Step Actor Action System Response

1 Click on “Activate”/”Deactivate” in Items

list page

A confirmation dialog appears

2 Click “No” Nothing changes

Exceptions:

None

Relationships:

List all Items use case

Business Rules:

None

Page 65: FPT University - Capstone project - Using QR Code to prevent fake products

65

3.2.2.9 Item Checking

3.2.2.9.1 Use Case-Item Checking Diagram

Consumer

QR4AC

Check Item

Figure 11 - Use Case-Item Checking Diagram

3.2.2.9.2 Use Case- Check Item Specification

USE CASE – Check Item SPECIFICATION

Use-case No. UC901 Use-case Version 1.0

Use-case Name Check Item

Author TrucLK

Date 02/06/2012 Priority High

Actor:

Consumer

Summary:

This use case allows a consumer to check the item he or she interests via QR code when using

a smartphone with an application helping read QR code

Goal:

Check the item whether it is reliable or not

Triggers

Consumer visit website by unique URL of item

Page 66: FPT University - Capstone project - Using QR Code to prevent fake products

66

Preconditions:

Consumer has a smartphone with an application helping read QR code. Consumer uses

software to read the QR code and using browser to open URL

Post Conditions:

System redirects consumer to the page that shows detail about the item

Main Success Scenario:

Step Actor Action System Response

1 Consumer visits webpage from correct

URL

System display number of checking and

reliability, system ask customer for rating

2 Consumer rates and comment of product System displays thank message

Alternative Scenario:

Step Actor Action System Response

1 Consumer visits webpage from incorrect

URL or deprecated item.

System alerts consumer about fake product

and asks for store information

2 Consumer provides information about this

store.

System displays thank message

Exception:

N/A

Relationships:

N/A

Business Rules:

When facing that kind of problem, consumer needs to contact with the seller to get the

support. The distributor also needs to contact us for the cause and the solution.

Page 67: FPT University - Capstone project - Using QR Code to prevent fake products

67

3.2.2.10 Product Rating

3.2.2.10.1 Use Case-Product Rating Diagram

Consumer

Rate Product

QR4AC

Figure 12 - Use Case-Product Rating Diagram

3.2.2.10.2 Use Case-Rate a Product Specification

USE CASE – Rating product SPECIFICATION

Use-case No. UC1001 Use-case Version 1.0

Use-case Name Rate a Product

Author TrucLK

Date 02/06/2012 Priority Low

Actor:

Consumer

Summary:

This use case allows the consumer to express his/her opinion about the product he/she has

interest in

Goal:

Rate a product

Triggers

Consumer has checked item via QR code

Page 68: FPT University - Capstone project - Using QR Code to prevent fake products

68

Preconditions:

N/A

Post Conditions:

System redirects consumer to the page that shows the result

Main Success Scenario:

Step Actor Action System Response

1 Click “Rating this product” button Redirect to the page containing information

for assessing

2 Choose how many star and Add comment

(under 1000 characters)

3 Click “Submit” button Redirect to the result page

Alternative Scenario:

Step Actor Action System Response

1 Click “Rating this product” button Redirect to the page containing information

for assessing

2 Choose how many star and Add comment

(under 1000 characters)

3 Click “Back to List” button Redirect to the previous page

Exceptions:

Step Actor Action System Response

1 Click “Rating this product” button Redirect to the page containing information

for assessing

2 Choose how many star and Add comment

(above 1000 characters)

3 Click “Submit” button Error message appears

Relationships:

Check Item use case

Page 69: FPT University - Capstone project - Using QR Code to prevent fake products

69

Business Rules:

None

3.2.2.11 Consumer Check Statistic

3.2.2.11.1 Use Case- Consumer Check Statistic Diagram

ProducerAdministrator

QR4AC

View logs

View charts

Figure 13 - Use Case- Consumer Check Statistic Diagram

3.2.2.11.2 Use Case-View Chart Specification

USE CASE-View Chart SPECIFICATION

Use-case No. UC1101 Use-case Version 1.0

Use-case Name View Chart

Author TrucLK

Date 01/06/2012 Priority High

Actor:

Administrator

Producer

Summary:

This use case allow administrator or producer to view statistic of product item checking in

charts

Goal:

Page 70: FPT University - Capstone project - Using QR Code to prevent fake products

70

View statistic of product checking by consumer

Triggers

Click “View Chart” on Sidebar

Preconditions:

User is logged into the system successfully

Post Conditions:

Chart displayed

Main Success Scenario:

Step Actor Action System Response

1 Click on “View Chart” on Sidebar Redirect to View Chart page

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

3.2.2.11.3 Use Case-View Logs Specification

USE CASE-View Logs SPECIFICATION

Use-case No. UC1102 Use-case Version 1.0

Use-case Name View Logs

Author TrucLK

Page 71: FPT University - Capstone project - Using QR Code to prevent fake products

71

Date 01/06/2012 Priority High

Actor:

Administrator

Producer

Summary:

This use case allow administrator or producer to view all item checking log of consumers

Goal:

View checking logs of consumers

Triggers

Click “View logs” on the Item List

Preconditions:

User is logged into the system successfully

Post Conditions:

List of Checking Logs displayed

Main Success Scenario:

Step Actor Action System Response

1 Click on “View logs” on the Item List Redirect to View Logs page

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

Log in use case

Business Rules:

None

Page 72: FPT University - Capstone project - Using QR Code to prevent fake products

72

3.2.2.11.4 Use Case-Export to Excel Specification

USE CASE-Export to Excel SPECIFICATION

Use-case No. UC1103 Use-case Version 1.0

Use-case Name Export to Excel

Author NhatPG

Date 01/06/2012 Priority Low

Actor:

Producer

Summary:

This use case allow producer to export checking logs to Excel file

Goal:

Export checking logs to Excel

Triggers

Click “Excel” icon on View Logs page

Preconditions:

User is logged into the system successfully

Post Conditions:

Excel file downloaded

Main Success Scenario:

Step Actor Action System Response

1 Click on “Excel” icon on View Logs page Download Excel file to computer

Alternative Scenario:

N/A

Exceptions:

Page 73: FPT University - Capstone project - Using QR Code to prevent fake products

73

N/A

Relationships:

Log in use case

Business Rules:

None

3.2.2.12 Logging

3.2.2.12.1 Use Case-Logging Check Statistic Diagram

ProducerAdministratorLogging

QR4AC

Figure 14 - Use Case-Logging Check Statistic Diagram

3.2.2.12.2 Use Case-Logging Check Statistic Specification

USE CASE-Logging SPECIFICATION

Use-case No. UC1201 Use-case Version 1.0

Use-case Name Logging

Author TrucLK

Date 03/06/2012 Priority Normal

Actor:

System

Summary:

Page 74: FPT University - Capstone project - Using QR Code to prevent fake products

74

This use case is used for logging all logged-in user (administrator, producer) actions on

system for audit purpose

Goal:

Log user actions for audit purpose

Triggers

User do any action on the system

Preconditions:

User is logged into the system successfully

Post Conditions:

Action logged

Main Success Scenario:

Step Actor Action System Response

1 User do any action on the system Action logged

Alternative Scenario:

N/A

Exceptions:

N/A

Relationships:

N/A

Business Rules:

None

3.2.2.13 Software System Attributes

3.2.2.13.1 Reliability

The system should not crash because of any actions on the website, includes generating QR codes

for product items.

The database should be backed up regularly and can be recovered if necessary.

Mean Time Between Failures (MTBF): The acceptable failure is once a year. The failure should not be

because of database or data loss.

Page 75: FPT University - Capstone project - Using QR Code to prevent fake products

75

Mean Time To Repair (MTTR): It should take immediately when admin finds out problem or

someone attacks website. The acceptable mean time for a particular failure must be least than 24

hours.

Maximum Bugs or Defect Rate: 5 bugs / KLOC.

3.2.2.13.2 Availability

The system should be available at all times, meaning the user can access it using a web browser, only

restricted by the down time of the server on which the system runs. The acceptable time for

maintenance or backup should not more than 2 hours per week. When the system goes in under-

maintenance, the website should display a message to inform that. In case of a hardware failure or

database corruption, a backup version of the database should be retrieved from the server and

saved by administrator, after that the service would be restarted.

3.2.2.13.3 Security

Passwords of producer account would be stored encrypted in the database in order to ensure the

user's privacy.

All producer actions would be logged for audit.

Sensitive data would be encrypted before being sent over insecure connections like the internet.

Data integrity would be checked for critical variables.

3.2.2.13.4 Maintainability

We could build a backup database for database maintenance and an application server for taking

care of the site. In case of a failure, we could a re-initialize the system. In addition, the software

designs using MVC modularity in mind so that it would be efficient for maintenance.

3.2.2.13.5 Portability

The application is Microsoft .NET based and should be compatible with all other systems that

have .NET framework.

The end-user part is fully portable and any system using any web browser should be able to use the

features of the application, including any hardware platform that is available or will be available in

the future . So producer could use with any desktop web browser. Consumer could be used with any

device that support reading QR code and can access internet with URL from QR code

3.2.2.13.6 Performance

Average response time for a checking is 500milliseconds, and the maximum is 4 seconds. A checking

involves sending one request or receiving one response.

Throughput – an average of 20 requests per second

Capacity – the system can communicate with 100 consumers’ mobiles at the same time. The system

could server for 10.000.000 consumer, 1000 producers with 20000 products and 200.000.000 items.

Degradation mode - If the system is degraded when we exceed 1000 consumers, we will remain in

the normal mode of operation with longer response time. We can scale the system with more

servers from Amazon cloud system

Page 76: FPT University - Capstone project - Using QR Code to prevent fake products

76

3.3 Entity Relationship Diagram This diagram describes all the entities in the system.

Figure 15 - Entity Relationship Diagram

Page 77: FPT University - Capstone project - Using QR Code to prevent fake products

77

4 Software Design Description

4.1 Design Overview This document describes the technical and UI design of our system. It includes the architectural

design and the detailed design of common functions and business functions. It also includes the

design of database model, and overall design of user interface.

The architectural design describes the overall architecture of the system. It will describe the patterns

being used, the role of each component in the working environment.

The detailed design describes static and dynamic structure for each component and function. It

includes class diagrams, class explanations, and sequence diagrams of the main use cases. The

detailed design uses notations of .NET framework 4.0 and C# 4.0, as they are the framework and

language for developing the system.

The database design describes the relationship between entities, and details of each entity. It uses

notations of SQL Server 2008 as it is the database server for developing the system.

The user interface design describes the layout of the system, and some design for the screens.

Page 78: FPT University - Capstone project - Using QR Code to prevent fake products

78

4.2 System Architectural Design

4.2.1 Choice of System Architecture

Figure 16 - System Architecture

We use ASP.NET MVC 3, which is a framework for building scalable, standards-based web

applications using well-established design patterns and the power of ASP.NET and the .NET

Framework. MVC stands for model-view-controller. MVC is a pattern for developing applications

that are well architected and easy to maintain. MVC-based applications contain:

Views are template files that your application uses for dynamically generating HTML

responses.

Models are classes that represent the data of the application and that use validation logic to

enforce business rules for that data.

Controllers are classes that handle incoming requests to the application, retrieve model data,

and then specify view templates that return a response to the client.

4.2.2 Discussion of Alternative Designs

At first glance, the three tiers may seem similar to the model-view-controller (MVC) concept;

however, topologically they are different. A fundamental rule in three-tier architecture is the client

tier never communicates directly with the data tier; in a three-tier model, all communication must

pass through the middle tier. Conceptually the three-tier architecture is linear. However, the MVC

architecture is triangular: the view sends updates to the controller, the controller updates the model,

and the view gets updated directly from the model.

Page 79: FPT University - Capstone project - Using QR Code to prevent fake products

79

4.3 Component Diagram

Figure 17 - Component Diagram

Page 80: FPT University - Capstone project - Using QR Code to prevent fake products

80

4.4 Detailed Description of Components

4.4.1 CRC Cards (Class-Responsibility-Collaborators)

Figure 18 - Model Classes

Page 81: FPT University - Capstone project - Using QR Code to prevent fake products

81

Figure 19 - Controller Classes

Page 82: FPT University - Capstone project - Using QR Code to prevent fake products

82

4.4.1.1 Common

1.1.1.1.1 HomeController

Figure 20 - Controller & View for Home

Methods

public ActionResult Index (string searchString) Show content of home page

public ActionResult About ( ) Show contact information

1.1.1.1.2 ImagesMerging

Figure 21 - Methods in ImagesMerging class

Methods

public static Bitmap MergeImages (byte[] QRCode, Image ProducerLogo) Merge producer logo to QR code image

public static string ResizeImage(Image pic, int size) Resize picture

Page 83: FPT University - Capstone project - Using QR Code to prevent fake products

83

1.1.1.1.3 QR4ACDbContext

Figure 22 - Database Context for model classes

Properties

DbSet<AccountProfile

>

AccountProfiles Represent AccountProfiles table

DbSet<Category> Categories [get, set] Represent Categories table

DbSet<Producer> Producers [get, set] Represent Producers table

DbSet< Product > Products [get, set] Represent Products table

DbSet< Items > Items [get, set] Represent Items table

DbSet< Consumer > Consumers [get, set] Represent Consumers table

DbSet< Rating > Ratings [get, set] Represent Ratings table

DbSet<CheckingLog> CheckingLogs [get, set] Represent CheckingLogs table

DbSet<AccountProfile>

AccountProfiles [get, set] Represent AccountProfiles table

DbSet<InfoTemplate> InfoTemplates [get, set] Represent InfoTemplates table

DbSet<Request> Requests [get, set] Represent Requests table

Page 84: FPT University - Capstone project - Using QR Code to prevent fake products

84

1.1.1.1.4 HashUtility

Figure 23 - Methods in HashUtility class

Methods

public static string DecryptString (string Message, string Passphrase) Decrypt encoded string

public static string EncryptString(string Message, string Passphrase) Decrypt encoded message string with password using MD5 and byte64

1.1.1.1.5 QRUtilities

Figure 24 - Methods in QRUtilities class

Methods

public static byte[] QREncode (string encodedString, int size) Encode string to QR code image

public static string QRDecode(Bitmap QRImage) Decode QR code image to string

Page 85: FPT University - Capstone project - Using QR Code to prevent fake products

85

4.4.1.2 Account

Figure 25 - Model-View-Controller for Account

1.1.1.1.6 RegisterModel

Properties

string Username [get, set] User name to register

string Password [get, set] Password to register

string ConfirmPassword [get, set] Confirm password to register

string Email [get, set] Email to register

1.1.1.1.7 LogonModel

Properties

string Username [get, set] User name to log on

string Password [get, set] Password to log on

bool RememberMe [get, set] Remember me when forgetting

Page 86: FPT University - Capstone project - Using QR Code to prevent fake products

86

password

1.1.1.1.8 ChangePasswordModel

Properties

string OldPassword [get, set] Current password

string Password [get, set] New password to change

string ConfirmPassword [get, set] Confirm new password to

change

1.1.1.1.9 AccountController

Properties

QR4ACDbContext db [get, set] Object used to query or update

data from database

Methods

public ActionResult LogOn(LogOnModel model, string returnUrl) Allows user to login to system

public ActionResult LogOff ( ) Allows user to logout from system

public ActionResult Create(RegisterModel model) Allows administrator to create new account

public ActionResult ChangePassword (ChangePasswordModel model) Allows user to change their password

Page 87: FPT University - Capstone project - Using QR Code to prevent fake products

87

4.4.1.3 Producer

Figure 26 - Model-View-Controller for Producer

1.1.1.1.10 Producer

Properties

int ProducerId [get, set] ID of producer

string ProducerName [get, set] Name of producer

string Description [get, set] Description of producer

string Logo [get, set] URL of producer’s logo

string Address [get, set] Address of producer

String ContactPerson [get, set] Contact person information

String Email [get, set] Email of producer

Bool IsActive [get, set] Status of producer

String PhoneNumber [get, set] Phone number of producer

Page 88: FPT University - Capstone project - Using QR Code to prevent fake products

88

1.1.1.1.11 ProducerController

Properties

QR4ACDbContext db [get, set] Object used to query or update

data from database

Methods

public ActionResult Create () Display a form for adding a producer

public ActionResult Create (Producer producer) Add a producer to database

public ActionResult SwitchActivation (int id) Switch activation of producer based on ProducerId

public ActionResult Edit (int id) Display a form for editting a producer based on ProducerId

public ActionResult Edit (Producer producer) Save changing of producer’s information to database

public ActionResult Index () Display all producers

public ActionResult Search (string searchText) Display list of producers that meet the search condition

Page 89: FPT University - Capstone project - Using QR Code to prevent fake products

89

4.4.1.4 Product

Figure 27 - Model-View-Controller for Product

1.1.1.1.12 Product

Properties

int ProductId [get, set] ID of product

string Name [get, set] Name of product

string Info [get, set] Description of product

int ProducerId [get, set] ID of producer

int TotalItems [get, set] Total product items

bool IsActive [get, set] Whether product is active or not

int CategoryId [get, set] Id of product’s category

int InfoTemplateId [get, set] Id of product’s InfoTemplate

Page 90: FPT University - Capstone project - Using QR Code to prevent fake products

90

string Logo [get, set] Path of product’s logo

1.1.1.1.13 ProductController

Methods

public ActionResult Create () Display a form for adding a product

public ActionResult Create (Product product) Add a product to database

public ActionResult Details (int id) View details of product based on Product ID

public ActionResult Edit (int id) Display a form for editing a product based on Product ID

public ActionResult Edit (Product product) Save changing of product’s information to database

public ActionResult Index() Display list of products that meet the search condition

public ViewResult List(string sortOrder, string currentFilter, string searchString, int? page, int CategoryId) Display list of products to customer public JsonResult GetDetails(int id) Get product details

public ActionResult SwitchActivation (int id) Switch activation of product based on Product ID

public ActionResult Search (SearchProductModel searchModel, bool orderToggle) Display list of products that meet the search condition

Page 91: FPT University - Capstone project - Using QR Code to prevent fake products

91

4.4.1.5 Item

Figure 28 - Model-View-Controller for Item

1.1.1.1.14 Item

Properties

int ItemId [get, set] ID of item

DateTime IssueDate [get, set] Created date

string QrCodeStr [get, set] Description of product

int TotalChecks [get, set] Total checking of item

int ProductId [get, set] ID of product

bool IsActive get, set] Whether item is active or not

int Reliability Item reliability

int RequestId ID of item’s creating request

Page 92: FPT University - Capstone project - Using QR Code to prevent fake products

92

Methods

public int GetId (string file) Get Item ID from QR Code Image

public JsonResult GetQRCode (Product product) Add a product to database

public ActionResult Index (int? id) View list of items (or one item based on id)

public ActionResult Search (SearchItemModel searchModel, string OrderBy, string idString, int? productId, bool orderToggle = false) Display list of items that meet the search condition

public ActionResult SwitchActivation (id) Switch activation of item based on Item ID

public ActionResult UploadQRCode() Return Upload QR Code view

public ActionResult ViewProductItems (int productId) Show list of items based on Product ID

4.4.1.6 Checking

Figure 29 - Model-View-Controller for Checking Logs

1.1.1.1.15 CheckingLogs

Properties

Page 93: FPT University - Capstone project - Using QR Code to prevent fake products

93

int CheckingId [get, set] ID of checking

string ConsumerId [get, set] ID of consumer

DateTime CheckingDate [get, set] Date of checking

int ItemId [get, set] ID of Item

string Location [get, set] Location of checking

int ProducerId [get, set] Producer ID

int ProductId [get, set] Product ID

1.1.1.1.16 CheckingController

Methods

public ActionResult Details() Add checking log to database

public ActionResult ProductFromProducer (int id) Get list of related products by producer id

public ActionResult RelatedProduct(int id) Get list of related products by product id

public JsonResult SaveUserLocation(int CheckId, string location) Update user location to checking log

public ViewResult Validate(string s) Validate product item

public ViewResult ViewProduct(int id) View product info based on product id

Page 94: FPT University - Capstone project - Using QR Code to prevent fake products

94

4.4.1.7 Rating

Figure 30 - Model-View-Controller for Rating

1.1.1.1.17 Rating

Properties

int RatingId [get, set] ID of rating

int ProductId [get, set] ID of product

DateTime RatingDate [get, set] Date of rating

int StarNo [get, set] Number of star user rated

string Comment [get, set] Comment of consumer

1.1.1.1.18 RatingController

Methods

public ActionResult Create(int ProductId) Display a form for rating the checked product

public ActionResult Create(Rating rating) Rate product

Page 95: FPT University - Capstone project - Using QR Code to prevent fake products

95

public JsonResult RateProduct(string productId, string rating) Rate product

4.4.1.8 Category

Figure 31 - Model-View-Controller for Category

1.1.1.1.19 Category

Properties

int CategoryId [get, set] ID of category

string Name [get, set] Name of category

1.1.1.1.20 CategoryController

Methods

public ActionResult Create() Display a form for creating category

public ActionResult Create(Category category) Insert category to database

public ActionResult Edit(int id) Show updating category form based on category Id

public ActionResult Edit(Category category) Update category

public ActionResult Delete(int id) Delete category based on category id

Page 96: FPT University - Capstone project - Using QR Code to prevent fake products

96

public ActionResult Search(string searchText) Search category based on search text public ActionResult Index() List all categories

4.4.1.9 InfoTemplate

Figure 32 - Model-View-Controller for InfoTemplate

1.1.1.1.21 InfoTemplate

Properties

int InfoTemplateId [get, set] ID of template

string Name [get, set] Name of template

int ProducerId [get, set] Producer ID

string Template [get, set] Template content

1.1.1.1.22 InfoTempolateController

Methods

public ActionResult Create() Display a form for creating template

Page 97: FPT University - Capstone project - Using QR Code to prevent fake products

97

public ActionResult Create(InfoTemplate template) Insert template to database

public ActionResult Edit(int id) Show updating template form based on template Id

public ActionResult Edit(InfoTemplate template) Update template

public ActionResult Delete(int id) Delete template based on template id public ActionResult Search(string searchText) Search template based on search text public ActionResult Index() List all templates public ActionResult GetInfo(int id) Get template info based on template ID

4.4.1.10 Request

Figure 33 - Model-View-Controller for Request

1.1.1.1.23 Request

Properties

Page 98: FPT University - Capstone project - Using QR Code to prevent fake products

98

int RequestId [get, set] ID of request

DateTime CreatedDate [get, set] Request’s created time

int ProducerId [get, set] Producer ID

int ProductId [get, set] Product ID

int QRCodeSize [get, set] Size of QR Code image

string QRPackage [get, set] File name of generated QR package

int Quantity [get, set] Quantity of QR Code images in

package

int Status [get, set] Status of request

string UserName [get, set] Created by

1.1.1.1.24 RequestController

Methods

public ActionResult Create(int productId) Display a form for QR Code package creating request

public ActionResult Create(Request request) Insert request to database

public JsonResult Activation(int id) Activate all item in package

public JsonResult Deactivation(int id) Deactivate all item in package

public ActionResult Download(string filename) Download QR Code package public ActionResult Search(string searchText) Search request based on search text public ActionResult Index() List all request public JsonResult GetQRPackage (int id) Get QRPackage name based on request ID

Page 99: FPT University - Capstone project - Using QR Code to prevent fake products

99

4.4.1.11 Statistic

Figure 34 - Model-View-Controller for CheckingLogs

1.1.1.1.25 CheckingLogs

Properties

int CheckingId [get, set] ID of checking

DateTime CheckingDate [get, set] Item’s checked time

int ConsumerId [get, set] The ID identify consumer

int ProductId [get, set] Product ID

int ProducerId [get, set] Producer ID

string ItemId [get, set] Item ID

string Location [get, set] The string identify customer’s

location

Page 100: FPT University - Capstone project - Using QR Code to prevent fake products

100

1.1.1.1.26 StatisticController

Methods

public ActionResult ExportToExcel() Export checking logs to excel file

public JsonResult GetDailyReportByItems(string from, string to) Get report data for daily items checking

public JsonResult GetDailyReportByProducts(string from, string to) Get report data for daily products checking

public JsonResult GetMonthlyReportByItems(string from, string to) Get report data for monthly items checking

public JsonResult GetMonthlyReportByProducts(string from, string to) Get report data for monthly products checking

public JsonResult GetYearlyReportByItems(string from, string to) Get report data for yearly items checking

public JsonResult GetyearlyReportByProducts(string from, string to) Get report data for yearly products checking

public ActionResult Search(string searchText) Search checking logs based on search text public ViewResult Index() View statistic chart public ViewResult ViewLogs() List all checking logs public ViewResult ViewItemCheckingLogs(int itemId) List all item checking logs based on item ID

Page 101: FPT University - Capstone project - Using QR Code to prevent fake products

101

4.4.2 Encryption algorithm

We can protect the QR code using a hash string in the URL as security checking string. The hash

string would be generated by item ID. We use MD5 as cryptographic hash function, the digest size

will be small enough to store in the URL.

4.5 Sequence Diagram

4.5.1 Login

Figure 35 - Login sequence diagram

4.5.2 Template Management

4.5.2.1 List all Templates

Figure 36 - List all Templates sequence diagram

Page 102: FPT University - Capstone project - Using QR Code to prevent fake products

102

4.5.2.2 Add new Template

Figure 37 - Add new Template sequence diagram

4.5.3 Producers Management

4.5.3.1 List all Producers

Figure 38 - List all Producers sequence diagram

Page 103: FPT University - Capstone project - Using QR Code to prevent fake products

103

4.5.3.2 Add New Producer

Figure 39 - Add new Producer sequence diagram

4.5.3.3 Update Producer Information

Figure 40 - Update Producer Information sequence diagram

Page 104: FPT University - Capstone project - Using QR Code to prevent fake products

104

4.5.3.4 Switch Producer Activation

Figure 41 - Switch Producer Activation sequence diagram

4.5.4 Product Categories Management

4.5.4.1 List all Categories

Figure 42 - List all Categories sequence diagram

Page 105: FPT University - Capstone project - Using QR Code to prevent fake products

105

4.5.4.2 Add new Category

Figure 43 - Add new Category sequence diagram

4.5.4.3 Update Category

Figure 44 - Update Category sequence diagram

Page 106: FPT University - Capstone project - Using QR Code to prevent fake products

106

4.5.4.4 Delete Category

Figure 45 - Delete Category sequence diagram

4.5.5 Products Management

4.5.5.1 List all Products

Figure 46 - List all Products sequence diagram

Page 107: FPT University - Capstone project - Using QR Code to prevent fake products

107

4.5.5.2 Add New Product

Figure 47 - Add New Product sequence diagram

4.5.5.3 View Product Details

Figure 48 - View Product Details sequence diagram

Page 108: FPT University - Capstone project - Using QR Code to prevent fake products

108

4.5.5.4 Update Product Information

Figure 49 - Update Product Information sequence diagram

Page 109: FPT University - Capstone project - Using QR Code to prevent fake products

109

4.5.6 Request management

4.5.6.1 Create request for creating QR Code package

Figure 50 Create request for creating QR Code package sequence diagram

4.5.6.2 Process QR Code package creating request

Figure 51 - Process QR Code package creating request sequence diagram

Page 110: FPT University - Capstone project - Using QR Code to prevent fake products

110

4.5.6.3 List all Requests

Figure 52 - List all Requests sequence diagram

4.5.6.4 Download QR Code package

Figure 53 - Download QR Code package sequence diagram

Page 111: FPT University - Capstone project - Using QR Code to prevent fake products

111

4.5.7 Items Management

4.5.7.1 List all Items

Figure 54 - List all Items sequence diagram

4.5.7.2 Switch item’s activation

Figure 55 - Switch item’s activation sequence diagram

Page 112: FPT University - Capstone project - Using QR Code to prevent fake products

112

4.5.7.3 Product Checking

Figure 56 - Product Checking sequence diagram

4.5.8 Statistic

4.5.8.1 View statistic by chart

Figure 57 - View statistic by chart sequence diagram

Page 113: FPT University - Capstone project - Using QR Code to prevent fake products

113

4.5.8.2 View checking log

Figure 58 - View checking log sequence diagram

Page 114: FPT University - Capstone project - Using QR Code to prevent fake products

114

4.6 User Interface Design

4.6.1 Description of the User Interface

4.6.1.1 Screen Images

1.1.1.1.27 Login

Figure 59 - Login UI

1.1.1.1.28 Change Password

Figure 60 - Change password

Page 115: FPT University - Capstone project - Using QR Code to prevent fake products

115

1.1.1.1.29 Update profile

Figure 61 - Update profile

Page 116: FPT University - Capstone project - Using QR Code to prevent fake products

116

1.1.1.1.30 Change password

Figure 62 - Change password

1.1.1.1.31 List all Producers

Figure 63 - List all producers UI

Page 117: FPT University - Capstone project - Using QR Code to prevent fake products

117

1.1.1.1.32 Add New Producer

Figure 64 - Add new producer UI

Page 118: FPT University - Capstone project - Using QR Code to prevent fake products

118

1.1.1.1.33 Update Producer

Figure 65 - Update producer UI

Page 119: FPT University - Capstone project - Using QR Code to prevent fake products

119

Figure 66 - Producer's account management

1.1.1.1.34 List all Categories

Figure 67 - List all Categories

Page 120: FPT University - Capstone project - Using QR Code to prevent fake products

120

1.1.1.1.35 Create new Category

Figure 68 - Create new Category

1.1.1.1.36 Update Category

Figure 69 - Update Category

1.1.1.1.37 List all Information Template

Figure 70 - List all Information Template

Page 121: FPT University - Capstone project - Using QR Code to prevent fake products

121

1.1.1.1.38 Add new Information Template

Figure 71 - Add new Information Template

Page 122: FPT University - Capstone project - Using QR Code to prevent fake products

122

1.1.1.1.39 List all Products

Figure 72 - List all products UI

1.1.1.1.40 Create items and QR Code images package

Figure 73 - Create items and QR Code images package

Page 123: FPT University - Capstone project - Using QR Code to prevent fake products

123

1.1.1.1.41 Add New Products

Figure 74 - Add new products UI

Page 124: FPT University - Capstone project - Using QR Code to prevent fake products

124

1.1.1.1.42 Update Product

Figure 75 - Update product UI

1.1.1.1.43 List all Product (Customer’s perspective)

Page 125: FPT University - Capstone project - Using QR Code to prevent fake products

125

1.1.1.1.44

1.1.1.1.45 List all request

Figure 76 - List all Products

Page 126: FPT University - Capstone project - Using QR Code to prevent fake products

126

1.1.1.1.46 View Statistic

Figure 78 - View statistic

Figure 77 - List all Request

Page 127: FPT University - Capstone project - Using QR Code to prevent fake products

127

1.1.1.1.47 View Checking Logs

Figure 79 - View logging

Page 128: FPT University - Capstone project - Using QR Code to prevent fake products

128

4.8 Database Design i

Figure 80 - Database design

4.8.1 Producers

Name Type Allow Nulls Description

ProducerId int (identity) ID of producer

ProducerName nvarchar(100) Name of producer

Description nvarchar (500) Description of producer

Logo nvarchar (200) URL of logo of producer

IsActive Bit Whether producer is active or not

Page 129: FPT University - Capstone project - Using QR Code to prevent fake products

129

Address nvarchar(max) Producer’s address

ContactPerson nvarchar(max) Contact person

PhoneNumber nvarchar(max) Producer’s phone number

4.8.2 AccountProfiles

Name Type Allow Nulls Description

Username varchar(50) Username of user

ProducerId int references to Producer(ProducerId)

ID of producer

4.8.3 Products

Name Type Allow Nulls Description

ProductId int (identity) ID of product

ProductName nvarchar(100) Name of product

Description nvarchar (max) Description of product

TotalItems int Number of items created

IsActive bit Whether product is active or not

ProducerId int references to Producer(ProducerId)

ID of producer

Info nvarchar (max) Product’s information

InfoTemplateId int Information Template ID

CategoryId int Category ID

4.8.4 Items

Name Type Allow Nulls Description

ItemId int (identity) ID of item

IssueDate datetime Time when item was generated

QrCodeStr mvarchar(max) Encrypted string for generating QR code

TotalChecks int Number of checking time of item

ProductId int references to Product(ProductId)

ID of product

IsActive bit Whether item is active or not

RequestId int ID of QR Code creating request

Reliability int Reliability of item

4.8.5 CheckingLogs

Name Type Allow Nulls Description

CheckingId int (identity) ID of checking

CheckingDate datetime Time of checking

Location nvarchar(max) Location of checking

ItemId int references to Item(ItemId)

ID of item

ConsumerId nvarchar(max) ID of consumer

ProducerId int references to Producer(Producer Id)

ID of Producer

ProductId int references to Product(Product Id)

ID of Product

4.8.6 Rating

Name Type Allow Nulls Description

Page 130: FPT University - Capstone project - Using QR Code to prevent fake products

130

RatingId int (identity) ID of rating

StarNo int Number of star given by consumer for product

Comment nvarchar(max) Comment of consumer about product

ProductId int references to Product(ProductId)

ID of product

ConsumerId nvarchar(max) The unique string identify consumer

RatingDate datetime Raying Date

4.8.7 Requests

Name Type Allow Nulls Description

RequestId int (identity) ID of rating

CreatedDate datetime Number of star given by consumer for product

QRCodeSize nvarchar(max) Comment of consumer about product

Quantity int ID of product

Status int The unique string identify consumer

QRPackage nvarchar(max) Raying Date

ProducerId int references to Producer(ProducerId)

Producer ID

ProductId int references to Product(ProductId)

ProductID

UserName nvarchar(max) Created by

4.8.8 Categories

Name Type Allow Nulls Description

CategoryId int (identity) ID of category

Name nvarchar(max) Category name

4.8.9 InfoTemplates

Name Type Allow Nulls Description

InfoTemplateId int (identity) ID of info template

Name nvarchar(max) Info template name

Template nvarchar(max) Info template

ProducerId int references to Producer(ProducerId)

ID of producer

Page 131: FPT University - Capstone project - Using QR Code to prevent fake products

131

5 Software Test Document

5.1 Introduction

5.1.1 System Overview

This part describes the approach and methodologies used by the testing group to plan, organize and

manage the testing process of this system. It describes implementation details of test cases or

technical details of how the product features should work.

The system that will be tested is also the system our team is currently developing. This system is

developed based on MVC model. It is a Web application with the end-user is Producer and

Consumer.

5.1.2 Test Approach

The testing for this project will consist of Unit, System/Integration (combined) and Acceptance test

levels. It is hoped that there will be at least one full time independent test person for

system/integration testing. The test manager with the development team’s participation will do

most testing.

Unit Testing will be done by the developers and will be approved by the implementing team leader.

The test manager will perform System/Integration Testing and implementing team leader with

assistance from the individual developers as required.

The test manager and development team leader will perform acceptance Testing. The acceptance

test will be done for a period of 2 weeks after completion of the System/Integration test process.

Programs will enter into Acceptance test after all critical and major defects have been corrected. A

program may have one major defect as long as it does not obstruct the main flow of action of the

program (There is a work around for the error). Prior to completion of acceptance testing all open

critical and major defects must be fixed.

5.2 Test Plan The following is a list of areas to be focus on during testing of application.

5.2.1 GUI

Test all the interfaces in our system.

5.2.2 Functions

Login

Test all functions in Login module including Login, Logout, and Change Password.

Role ‘Administrator’

Test all functions of role ‘Administrator’ including Add new Producer, Update Producer, and

Activate/Deactivate Producer, Add new Category, Update and Delete Category

Role ‘Producer’

Page 132: FPT University - Capstone project - Using QR Code to prevent fake products

132

Test all functions of role ‘Producer’ including: Add new Template, Update and Delete Template, Add

new Product, Update Product, Manage QR Packages, and Add new Item.

Role ‘Consumer’

Test all functions of role ‘Consumer’ including Rating Product, Checking QR Code.

5.2.3 Features not to be tested

Performance

There was not enough time to optimize the source code to improve the performance. Besides, we

do not have much money to spend on the server. So we only assure that the system works well but

maybe not at its most effective.

5.3 Test cases: Abbreviation

- Result: [P]ass – [F]ail

5.3.1 GUI

ID

Des

crip

tio

n

Test Case

Procedure

Expected Output

Dep

end

ence

Res

ult

Test

Dat

e

No

te

Steps:

1. Start the application.

Components

Page 133: FPT University - Capstone project - Using QR Code to prevent fake products

133

GU

I_0

1

Ho

mep

age

Look at the left of

the application

screen

From top to bottom, components

are displayed:

+ Button 'Chk.vn'

+ Button 'Home'

+Button 'Products'

+ Button 'About'

+ Editable text 'Our Solution'

+ Editable text 'We provide services

for producers to generate and

manage QR code for their product

items. With a smartphone on hand,

consumers can validate the

authenticity of a product item by

scanning the QR code stuck on the

product and then see the results

via our confirmation website'

+ Button 'Request invite'

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P G

UI_

02

Ho

mep

age

Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ Button 'Login'

+ Editable text 'Project name:'

+ Editable text 'Using QR Code to

prevent fake products'

+ Editable text 'Project name

abbreviation: QR Anti-Counterfeit'

+ Editable text 'Project code:

QR4AC'

+ Editable text 'Timeline: from May

2012 to Aug 2012'

+ Button 'View details'

P

Page 134: FPT University - Capstone project - Using QR Code to prevent fake products

134

GU

I_0

3

Ab

ou

t

Look at the left of

the application

screen

From top to bottom, components

are displayed:

+ Editable text 'About'

+ Editable text 'QR4AC project has

been started since May 8th. We

want to contribute to the fight

against counterfeit using QR codes'

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P

Steps:

1. Start the application

2. Login with role "Admin"

Components

Page 135: FPT University - Capstone project - Using QR Code to prevent fake products

135

GU

I_0

4

Ho

mep

age

- ro

le “

Ad

min

istr

ato

r”

Look at the left of

the application

screen

From top to bottom, components

are displayed:

+ Button 'Chk.vn'

+ Button 'Home'

+ Button 'Producers'

+ Button 'About'

+ Label 'MANAGE PRODUCERS'

+ Hyperlink 'List all Producers'

+ Hyperlink 'Add New Producer'

+ Label 'MANAGE CATEGORIES'

+ Hyperlink 'List all Categories'

+ Hyperlink 'Add New Category'

+ Label 'STATISTIC'

+ Hyperlink 'View Chart'

+ Hyperlink 'View Logs'

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P G

UI_

05

Ho

mep

age

- ro

le “

Ad

min

istr

ato

r” Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ Editable text 'Our Solution'

+ Editable text 'We provide services

for producers to generate and

manage QR code for their product

items. With a smartphone on hand,

consumers can validate the

authenticity of a product item by

scanning the QR code stuck on the

product and then see the results

via our confirmation website'

P

Page 136: FPT University - Capstone project - Using QR Code to prevent fake products

136

GU

I_0

6

Vie

w S

tati

stic

Click ‘View Chart’ From top to bottom, components

are displayed:

+ Label ‘Statistic’

+ Button ‘Daily/Monthly/Yearly

+ Button ‘Product/Item’

+ Text ‘From:’

+ Popup Calendar

+ Text ‘To:’

+ Popup Calendar

+ Button ‘View Report’

+ Chart

P G

UI_

07

Click ‘View Logs’ + Label ‘View Logs’

+ [Search] textbox

+ Button ‘Search’

+ Table: column ‘Checking Date’,

‘Item ID’, ‘Product’, ‘Producer’,

‘Consumer ID’

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P

Steps:

1. Start the application

2. Login with role "Admin"

3. Click 'List all Producers' tab on the horizontal menu

Components

GU

I_0

8

Test

Hea

der

Click 'List all

Producers'

Header is ‘Producer List’ P

Page 137: FPT University - Capstone project - Using QR Code to prevent fake products

137

GU

I_0

9 Click ‘Update’

button

Header is ‘Update Profile’ P G

UI_

10

List

all

Pro

du

cers

Vie

w

Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ [Search] textbox

+ Button ‘Search’

+ Table: column ‘Logo’, ‘Producer

Name’ , ‘Action’

+ Button ‘Update’

+ Button ‘Activate/Deactivate’

+ Button ‘Add new producer’

P

Page 138: FPT University - Capstone project - Using QR Code to prevent fake products

138

GU

I_1

1

Up

dat

e P

rod

uce

r V

iew

Click ‘Update’

button

From top to bottom, components

are displayed:

+ Label ‘Producer Name:’

+ [Producer Name] textbox

+ Label ‘Description:’

+ [Description] textarea

+ Label ‘Address:’

+ [Address] textbox

+ Label ‘Email:’

+ [Email] textbox

+ Label ‘Phone Number:’

+ [Phone Number] textbox

+ Label ‘Contact Person:’

+ [Contact Person] textbox

+ Label ‘Logo:’

+ Button ‘Select Photo’

+ Button ‘Save Changes’

+ Button ‘Back to List’

+ Label ‘Account list’

+ Table: column ‘Username’,

‘Action’

+ Button ‘Change Password’

+ Button ‘Delete’

+ Label ‘Create new account’

+ Label ‘Username:’

+ [Username] textbox

+ Label ‘Password:’

+ [Password] textbox

+ Label ‘Confirm Password:’

+ [Confirm Password] textbox

+ Button ‘Create Account’

+ Button ‘Back to List’

P

Page 139: FPT University - Capstone project - Using QR Code to prevent fake products

139

Steps:

1. Start the application

2. Login with role "Admin"

3. Click 'Add New Producer' tab on the left vertical menu

Components

GU

I_1

2

Test

Hea

der

Click 'Add New

Producer'

Header is 'Add New Producer'

P

Page 140: FPT University - Capstone project - Using QR Code to prevent fake products

140

GU

I_1

3

Ad

d N

ew P

rod

uce

r V

iew

Look at the

center of the

application

screen

From top to bottom, components

are displayed:

+ Label ‘Producer Name:’

+ [Producer Name] textbox

+ Label ‘Description:’

+ [Description] textarea

+ Label ‘Address:’

+ [Address] textbox

+ Label ‘Email:’

+ [Email] textbox

+ Label ‘Logo:’

+ Button ‘Select Photo’

+ Label ‘Account Information’

+ Label ‘Username:’

+ [Username] textbox

+ Label ‘Password:’

+ [Password] textbox

+ Label ‘Confirm Password:’

+ [Confirm Password] textbox

+ Button ‘Submit’

+ Button ‘Back to List’

P

Steps:

1. Start the application

2. Login with role "Admin"

3. Click 'List all Categories' tab on the left vertical menu

Components

Page 141: FPT University - Capstone project - Using QR Code to prevent fake products

141

GU

I_1

4

Test

Hea

der

Click 'List all

Categories'

Header is 'Category List' P G

UI_

15

Click ‘Update’

button

Header is ‘Update Category’ P

GU

I_1

6

List

all

Cat

ego

ries

Vie

w

Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ [Search] textbox

+ Button ‘Search’

+ Table: column ‘Name’ , ‘Action’

+ Button ‘Update’

+ Button ‘Delete’

+ Button ‘Create New Category’

P

GU

I_1

7

Up

dat

e C

ateg

ory

Vie

w Click ‘Update’

button

From top to bottom, components

are displayed:

+ Label ‘Category Name:’

+ [Category Name] textbox

+ Button ‘Save Changes’

+ Button ‘Back to List’

P

Steps:

1. Start the application

2. Login with role "Admin"

3. Click 'Add New Category' tab on the left vertical menu

Components

GU

I_1

8

Test

Hea

der

Click 'List all

Categories'

Header is 'Create New Category' P

Page 142: FPT University - Capstone project - Using QR Code to prevent fake products

142

GU

I_1

9

Ad

d N

ew C

ateg

ory

Vie

w

Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ Label ‘Category Name:’

+ [Category Name] textbox

+ Button ‘Submit’

+ Button ‘Back to List’

P

Steps:

1. Start the application

2. Login with role "Producer"

Components

Page 143: FPT University - Capstone project - Using QR Code to prevent fake products

143

GU

I_2

0

Ho

mep

age

- ro

le “

Pro

du

cer”

Look at the left of

the application

screen

From top to bottom, components

are displayed:

+ Button 'Chk.vn'

+ Button 'Home'

+ Button 'Products'

+ Button 'About'

+ Label 'MANAGE TEMPLATES'

+ Hyperlink 'List all Templates’

+ Hyperlink 'Create New Template'

+ Label 'MANAGE PRODUCTS'

+ Hyperlink 'List all Products'

+ Hyperlink 'Add New Product'

+ Label 'MANAGE PACKAGES'

+ Hyperlink 'List all Requests'

+ Label 'MANAGE ITEMS'

+ Hyperlink 'List all Items'

+ Label 'STATISTIC'

+ Hyperlink 'View Chart'

+ Hyperlink 'View Logs'

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P

Page 144: FPT University - Capstone project - Using QR Code to prevent fake products

144

GU

I_2

1

Ho

mep

age

- ro

le “

Pro

du

cer”

Look at the right

of the application

screen

From top to bottom, components

are displayed:

+ Editable text 'Our Solution'

+ Editable text 'We provide services

for producers to generate and

manage QR code for their product

items. With a smartphone on hand,

consumers can validate the

authenticity of a product item by

scanning the QR code stuck on the

product and then see the results

via our confirmation website'

P G

UI_

22

Vie

w S

tati

stic

Click ‘View Chart’ From top to bottom, components

are displayed:

+ Label ‘Statistic’

+ Button ‘Daily/Monthly/Yearly

+ Button ‘Product/Item’

+ Text ‘From:’

+ Popup Calendar

+ Text ‘To:’

+ Popup Calendar

+ Button ‘View Report’

+ Chart

P

GU

I_2

3

Click ‘View Logs’ + Label ‘View Logs’

+ [Search] textbox

+ Button ‘Search’

+ Table: column ‘Checking Date’,

‘Item ID’, ‘Product’, ‘Producer’,

‘Consumer ID’

+ Editable text '© Group 4 -

Capstone Project'

+ Hyperlink 'Tiếng Việt'

P

Page 145: FPT University - Capstone project - Using QR Code to prevent fake products

145

Steps:

1. Start the application

2. Login with role "Producer"

3. Click ‘List all Templates’

Components

GU

I_2

4

Test

Hea

der

Click ‘List all

Templates’

Header is ‘Information Template

List’

P

GU

I_2

5 Click ‘Update’

button

Header is ‘Information Template’ P

GU

I_2

6

List

all

Tem

pla

tes

Vie

w Click ‘List all

Templates’

From top to bottom, components

are displayed:

+ Table: column ‘Name’, ‘Action’

+ ‘Update’ button

+ ‘Delete’ button

+ ‘Create New Information

Template’ button

P

GU

I_2

7

Up

dat

e Te

mp

late

s V

iew

Click ‘Update’

button

From top to bottom, components

are displayed:

+ Label ‘Name’

+ [Name] textbox

+ Label ‘Details’

+ Additional textbox (based on

each template)

+ Button ‘Add more field’

+ Button ‘Save Changes’

+ Button ‘Back to List’

P

Page 146: FPT University - Capstone project - Using QR Code to prevent fake products

146

Steps:

1. Start the application

2. Login with role "Producer"

3. Click 'Create New Template' tab on the left vertical menu.

Components

GU

I_2

8

Test

Hea

der

Click 'Create New

Template'

Header is ‘Information Template’ P

GU

I_2

9

Ad

d N

ew C

ateg

ory

Vie

w Look at the

center of the

application

screen

From top to bottom, components

are displayed:

+ Label ‘Name’

+ [Name] textbox

+ Button ‘Add more field’

+ Button ‘Save changes’

+ Button ‘Back to List’

P

Steps:

1. Start the application

2. Login with role "Producer"

3. Click ‘List all Products’ tab on the left vertical menu.

Components

GU

I_3

0

Test

Hea

der

Click ‘List all

Products’

Header is ‘Product List’

GU

I_3

1 Click ‘Update’

button

Header is ‘Update product

information’

Page 147: FPT University - Capstone project - Using QR Code to prevent fake products

147

GU

I_3

2 Click ‘Create

items’

Header is ‘Enter the quantity of

items that you want to create’

G

UI_

33 Click ‘View Items’ Header is ‘[Product Name] Item

list’

GU

I_3

4

List

all

Pro

du

cts

Vie

w

Click ‘List all

Products’ tab

From top to bottom, components

are displayed:

+ [Search] textbox

+ Button ‘Advanced’

+ Button ‘Search’

+ Table: column ‘Image’, ‘Name’,

‘Actions’

+ Button ‘Update’

+ Button ‘Create items’

+ Button ‘View Items’

+ Button ‘Activate/Deactivate’

+ Button ‘Add New Product’

Page 148: FPT University - Capstone project - Using QR Code to prevent fake products

148

GU

I_3

5

Up

dat

e P

rod

uct

Vie

w

Click ‘Update’

button

From top to bottom, components

are displayed:

+ Label ‘Name:’

+ [Name] textbox

+ Label ‘Logo:’

+ Button ‘Select Photo’

+ Label ‘Category:’

+ [Category] combobox

+ Label ‘Information Template:’

+ Button ‘Choose information

template’

+ Label ‘Additional information’

+ Button ‘Save Changes’

+ Button ‘Create Items’

+ Button ‘Back to List’

P G

UI_

36

Cre

ate

item

s V

iew

Click ‘Create

items’ button

From top to bottom, components

are displayed:

+ Label ‘Quantity’

+ [Quantity] textbox

+ Label ‘QRCodeSize’

+ Logo QR Code

+ Text ‘128’

+ Button ‘Create Items’

+ Button ‘Back to Product List’

P

Page 149: FPT University - Capstone project - Using QR Code to prevent fake products

149

GU

I_3

7

Vie

w It

ems

Vie

w

Click ‘View Items’

button

From top to bottom, components

are displayed:

+ [Search] textbox

+ Button ‘Search’

+ Button ‘Create more Items’

+ Table: column ‘Item Id’, ‘Issue

Date’, ‘Total Checks’, ‘Status’,

‘Actions’

+ Button ‘View Logs’

+ Button ‘QR Code’

+ Button ‘Activate/Deactivate’

+ Button ‘Back to Product List’

P

Steps:

1. Start the application

2. Login with role "Producer"

3. Click ‘Add New Product’ tab on the left vertical menu.

Components

GU

I_3

8

Test

Hea

der

Click ‘Add New

Product’

Header is ‘Add New Product’ P

Page 150: FPT University - Capstone project - Using QR Code to prevent fake products

150

GU

I_3

9

Ad

d N

ew P

rod

uct

Vie

w

Click ‘Add New

Product’ tab

From top to bottom, components

are displayed:

+ Label ‘Product Name:’

+ [Product Name] textbox

+ Label ‘Logo:’

+ Button ‘Select Photo’

+ Label ‘Category:’

+ [Category] combobox

+ Label ‘Information Template:’

+ Button ‘Choose information

template’

+ Button ‘Submit’

+ Button ‘Back to List’

P

Steps:

1. Start the application

2. Login with role "Producer"

3. Click ‘List all Requests’ tab on the left vertical menu.

Components

GU

I_4

0

Test

Hea

der

Click ‘List all

Requests’

Header is ‘List all Requests’ P

GU

I_4

1

List

all

Req

ues

ts V

iew

Click ‘List all

Requests’

From top to bottom, components

are displayed:

+ Table: column ‘Created Time’,

‘Product’, ‘Quantity’, ‘Actions’

+ Button ‘Download’

+ Button ‘Activate All’

+ Button ‘Deactivate All’

+ Button ‘Back to Product List’

P

Page 151: FPT University - Capstone project - Using QR Code to prevent fake products

151

Steps:

1. Start the application

2. Login with role "Producer"

3. Click ‘List all Items’ tab on the left vertical menu.

Components

GU

I_4

2

Test

Hea

der

Click ‘List all

Items’

Header is ‘Item List’ P

GU

I_4

3

List

all

Item

s V

iew

Click ‘List all

Items’

From top to bottom, components

are displayed:

+ [Search] textbox

+ Button ‘Search’

+ Table: column ‘Item Id’, ‘Product’,

‘Issue Date’, ‘Total Checks’,

‘Status’, ‘Actions’

+ Button ‘View Logs’

+ Button ‘QR Code’

+ Button ‘Activate/Deactivate’

P

5.3.2 Functions

5.3.2.1 Login

1. Case - Login

Purpose

Check the authority of user

Inputs

Username

Password

Expected Output & Pass/Fail criteria

Pass Fail

Page 152: FPT University - Capstone project - Using QR Code to prevent fake products

152

Message ‘Welcome ${username}’ on the top right corner Go to the Home Page with all functionalities corresponding to the user’s authority shown on the left corner

Message ‘Login was unsuccessful. Please correct the errors and try again.’

Test Procedure

Click ‘Login’ pop-up button

Input username ‘admin’

Input password ‘admin!’

Click ‘Login’ button

2. Case - Change Password

Purpose

Check whether user can change password

Inputs

Current password

New password

Confirm new password

Expected Output & Pass/Fail criteria

Pass Message ‘Your password has been changed successfully.’

Fail Warning of required fields

Test Procedure

Click ‘Welcome ${username}’ pop-up button.

Click ‘Change Password’.

Input Current password ‘admin!’.

Input New password ‘admin1’.

Input Confirm new password ‘admin1’.

Click ‘Change Password’ button.

3. Case - Logout

Page 153: FPT University - Capstone project - Using QR Code to prevent fake products

153

Purpose

Check whether user can log out

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Back to Home page with pop-up button ‘Login’ on top right corner

Fail Cannot go back to Home page

Test Procedure

Click ‘Welcome ${username}’ pop-up button.

Click ‘Logout’.

5.3.2.2 Role ‘Administrator’ 1. Case - Search Producer

Purpose

Check whether producer exists or not

Inputs

Producer Name

Description

Expected Output & Pass/Fail criteria

Pass Case: If producer exists: data of producer is shown If not, show message ‘No producers found’

Fail Results is not corresponding to search data

Test Procedure

Login with role ‘Administrator’.

Click ‘List all Producers’.

Input ‘Google’ to Producer Name or ‘666’ to Description.

Click ‘Search’ button.

2. Case - Add new producer

Page 154: FPT University - Capstone project - Using QR Code to prevent fake products

154

Purpose

Check whether user can create new producer or not

Inputs

Producer Name Email Password

Description Logo Confirm Password

Address Username

Expected Output & Pass/Fail criteria

Pass Added Producer is displayed in the Producer List

Fail Warning of required fields New producer is not added to the list

Test Procedure

Login with role ‘Administrator’

Click ‘Add New Producer’

Input Producer Name ‘Nike’

Input Description ‘Sports Company’

Input Address ‘America’

Input Email ‘[email protected]

Input Logo

Input Username ‘nike’

Input Password ‘nikecompany’

Input Confirm Password ‘nikecompany’

Click ‘Submit’ button

3. Case - Update Producer

Purpose

Check whether user can update producer or not

Inputs

Producer Name Email Contact Person

Description Logo

Page 155: FPT University - Capstone project - Using QR Code to prevent fake products

155

Address Phone Number

Expected Output & Pass/Fail criteria

Pass Updated Producer info is displayed in the Producer list

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Administrator’

Click ‘List all Producers’

Click ‘Update’ button at Producer Name ‘Nike’

Change Address from ‘America’ to ‘Vietnam’

Click ‘Save Changes’ button

4. Case - Create new account

Purpose

Check whether user can create new account for one producer or not

Inputs

Username

Password

Confirm Password

Expected Output & Pass/Fail criteria

Pass Added account is displayed in the Account list

Fail Warning of required fields New account is not added to the list

Test Procedure

Login with role ‘Administrator’

Click ‘List all Producers’

Click ‘Update’ button at Producer Name ‘Nike’

Input Username ‘nike1’

Input Password ‘nikecompany’

Page 156: FPT University - Capstone project - Using QR Code to prevent fake products

156

Input Confirm Password ‘nikecompany’

Click ‘Create Account’ button

5. Case – Change Password in Account list

Purpose

Check whether user can change password of accounts in Account list or not

Inputs

New Password

Confirm new Password

Expected Output & Pass/Fail criteria

Pass Password of account is changed successfully

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Administrator’

Click ‘List all Producers’

Click ‘Update’ button at Producer Name ‘Nike’

Click ‘Change password’ button at account ‘nike1’

Input New Password ‘nikeglobal’

Input Confirm new Password ‘nikeglobal’

Click ‘Save Changes’ button

6. Case – Delete account in Account list

Purpose

Check whether user can delete accounts in Account list or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’

Fail Deleted category is still displayed in the Account list

Page 157: FPT University - Capstone project - Using QR Code to prevent fake products

157

Deleted account is not displayed in the Account list

Test Procedure

Login with role ‘Administrator’

Click ‘List all Producers’

Click ‘Update’ button at Producer Name ‘Nike’

Click ‘Delete’ button at account ‘nike1’

Click ‘OK’ button on confirmation dialog

7. Case - Activate/Deactivate Producer

Purpose

Check whether user can activate or deactivate one producer or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’ ‘Activate’ button changes to ‘Deactivate’ button and vice versa

Fail ‘Activate’ button can not change to ‘Deactivate’ button and vice versa

Test Procedure

Login with role ‘Administrator’

Click ‘List all Producers’

Click ‘Deactivate’ button at Producer Name ‘Nike’

Click ‘OK’ button on confirmation dialog

8. Case - Add New Category

Purpose

Check whether user can create new category or not

Inputs

Category Name

Page 158: FPT University - Capstone project - Using QR Code to prevent fake products

158

Expected Output & Pass/Fail criteria

Pass Added category is displayed in the Category List

Fail Warning of required fields New category is not added to the list

Test Procedure

Login with role ‘Administrator’

Click on ‘Add New Category’ tab

Input Name ‘Laptop’

Click on ‘Submit’ button

9. Case - Update Category

Purpose

Check whether user can update category or not

Inputs

Category Name

Expected Output & Pass/Fail criteria

Pass Updated category is displayed in the Category List

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Administrator’

Click on ‘List all Categories’ tab.

Click on ‘Update’ button at a record with name ‘Wine’.

Change name to ‘Mobile’

Click on ‘Save Changes’ button

10. Case - Delete Category

Purpose

Check whether user can delete category or not

Inputs

Page 159: FPT University - Capstone project - Using QR Code to prevent fake products

159

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’ Deleted category is not displayed in the Category List

Fail Deleted category is still displayed in the Category List

Test Procedure

Login with role ‘Administrator’.

Click on ‘List all Categories’ tab.

Click on ‘Delete’ button at a record with name ‘Mobile’.

Click on ‘Delete’ on confirmation dialog.

11. Case - View Chart

Purpose

Check whether user can view chart for statistic or not

Inputs

Daily/Monthly/Yearly

Product/Item

Date

Expected Output & Pass/Fail criteria

Pass A chart is displayed with vertical axis being ‘Number of checking’ and horizontal axis being ‘Date’

Fail A chart is not displayed or displayed without precision

Test Procedure

Login with role ‘Administrator’.

Click ‘View Chart’ tab.

Click on ‘Daily’ button.

Click on ‘Item’ button.

Choose start date as 13/07/2012.

Page 160: FPT University - Capstone project - Using QR Code to prevent fake products

160

Choose finish date as 13/07/2012.

Click on ‘View Report’ button.

12. Case - View Logs

Purpose

Check whether user can view logs for statistic or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Time of every check is displayed along with Item Id, Product, Producer, Consumer ID

Fail Time of every check is not displayed or displayed without Item Id, Product, Producer, Consumer ID

Test Procedure

Login with role ‘Administrator’.

Click ‘View Logs’ tab.

5.3.2.3 Role ‘Producer’ 1. Case – Edit Profile

Purpose

Check whether producers can edit profile or not

Inputs

Producer Name Email Logo

Description Phone Number

Address Contact Person

Expected Output & Pass/Fail criteria

Pass Producer’s information is updated successfully

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Producer’.

Page 161: FPT University - Capstone project - Using QR Code to prevent fake products

161

Click on ‘Login’ popup button.

Click on ‘Edit Profile’.

Change data at Producer Name to ‘Google Global’.

Click on ‘Save Changes’ button.

2. Case - Search Template

Purpose

Check whether template exists or not

Inputs

Template Name

Expected Output & Pass/Fail criteria

Pass Case: If template exists: data of template is shown If not, show message ‘No templates found’

Fail Results is not corresponding to search data

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Templates’ tab.

Input ‘Wine’ to Template Name.

Click on ‘Search’ button.

3. Case - Create New Template

Purpose

Check whether user can create new template or not

Inputs

Name

Additional Information

Expected Output & Pass/Fail criteria

Pass Added template is displayed in the Template List

Fail Warning of required fields New template is not added to the list

Page 162: FPT University - Capstone project - Using QR Code to prevent fake products

162

Test Procedure

Login with role ‘Producer’.

Click on ‘Create New Template’ tab.

Input ‘Laptop’ to Name.

Click on ‘Submit’ button.

4. Case - Update Template

Purpose

Check whether user can update template or not

Inputs

Name

Additional Information

Expected Output & Pass/Fail criteria

Pass Updated template is displayed in the Template List

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Templates’ tab.

Click on ‘Update’ button at a record with name ‘Laptop’.

Change name to ‘Mobile’.

Click on ‘Save Changes’ button.

5. Case - Delete Template

Purpose

Check whether user can delete template or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Fail

Page 163: FPT University - Capstone project - Using QR Code to prevent fake products

163

Confirmation dialog with message ‘Are you sure?’ Deleted template is not displayed in the Template List

Deleted template is still displayed in the Template List

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Templates’ tab.

Click on ‘Delete’ button at a record with name ‘Mobile’.

Click ‘Delete’ on confirmation dialog.

6. Case - Search Product

Purpose

Check whether product exists or not

Inputs

Product Name

Expected Output & Pass/Fail criteria

Pass Case: If product exists: data of product is shown If not, show message ‘No products found’

Fail Results is not corresponding to search data

Test Procedure

Login with role ‘Producer’.

Click ‘List all Products’ tab.

Input ‘Google’ to Product Name.

Click on ‘Search’ button.

7. Case - Add new product

Purpose

Check whether user can create new product

Inputs

Product Name Category

Page 164: FPT University - Capstone project - Using QR Code to prevent fake products

164

Logo Information Template

Expected Output & Pass/Fail criteria

Pass Added Product is displayed in the Product List

Fail Warning of required fields New product is not added to the list

Test Procedure

Login with role ‘Producer’.

Click on ‘Add New Product’ tab.

Input ‘Air Jordan’ to Product Name.

Input Logo.

Choose Category as ‘Sneaker’.

Choose Information Template as ‘Shoes’

Click on ‘Submit’ button.

8. Case - Update Product

Purpose

Check whether user can update product

Inputs

Product Name Category

Logo Information Template

Expected Output & Pass/Fail criteria

Pass Updated Product info is displayed in the Product list

Fail Warning of required fields Roll back to original content if saving fail

Test Procedure

Login with role ‘Producer’

Click on ‘List all Products’ tab.

Click ‘Update’ button at Product Name ‘Air Jordan’.

Change logo.

Page 165: FPT University - Capstone project - Using QR Code to prevent fake products

165

Click ‘Save Changes’ button.

9. Case - Create items

Purpose

Check whether user can create new items for one product

Inputs

Quantity

Expected Output & Pass/Fail criteria

Pass Added item is displayed in the Item list

Fail New item is not added to the list

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Products’ tab.

Click on ‘Create items’ button.

Input ‘2’ to Quantity.

Click on ‘Create Items’ button.

10. Case - Activate/Deactivate Product

Purpose

Check whether user can activate or deactivate one product

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’ ‘Activate’ button changes to ‘Deactivate’ button and vice versa

Fail ‘Activate’ button can not change to ‘Deactivate’ button and vice versa

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Products’ tab.

Page 166: FPT University - Capstone project - Using QR Code to prevent fake products

166

Click on ‘Deactivate’ button at Product Name ‘Air Jordan’.

Click on ‘OK’ button on confirmation dialog.

Click on ‘Activate’ button at Product Name ‘Air Jordan’.

Click on ‘OK’ button on confirmation dialog.

11. Case - Download QR packages

Purpose

Check whether user can download QR packages of one product

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass File appears at target folder File type: .rar

Fail File does not appear at target folder File type is different from .rar

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Requests’ tab.

Click on ‘Download’ button of any record.

12. Case - Activate/Deactivate all items in one QR package

Purpose

Check whether user can activate or deactivate all items in one QR package or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’ All items are activated or deactivated

Fail At least one item in QR package is not activated or deactivated

Test Procedure

Login with role ‘Producer’.

Page 167: FPT University - Capstone project - Using QR Code to prevent fake products

167

Click on ‘List all Requests’ tab.

Click on ‘Deactivate All’ button at QR package of Product Name ‘Air Jordan’.

Click on ‘OK’ button on confirmation dialog.

Click on ‘Activate All’ button at QR package of Product Name ‘Air Jordan’.

Click on ‘OK’ button on confirmation dialog.

13. Case - View Logs of one specific item

Purpose

Check whether user can view logs of one item or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Time of every check is displayed along with Consumer ID

Fail Time of every check is displayed incorrectly or correctly without Consumer ID

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Products’ tab.

Click on ‘View Items’ button at one specific product.

Click on ‘View Logs’ button at one specific item.

14. Case - View QR code of one specific item

Purpose

Check whether user can view QR code of one item or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass QR code is displayed

Fail QR code is not displayed

Test Procedure

Page 168: FPT University - Capstone project - Using QR Code to prevent fake products

168

Login with role ‘Producer’.

Click on ‘List all Products’ tab.

Click on ‘View Items’ button at one specific product.

Click on ‘QR Code’ button at one specific item.

Click on ‘Close’ button.

15. Case - Activate/Deactivate Item

Purpose

Check whether user can activate or deactivate one item or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Confirmation dialog with message ‘Are you sure?’ ‘Activate’ button changes to ‘Deactivate’ button and vice versa

Fail ‘Activate’ button can not change to ‘Deactivate’ button and vice versa

Test Procedure

Login with role ‘Producer’.

Click on ‘List all Products’ tab.

Click on ‘View Items’ button at one specific product.

Click on ‘Deactivate’ or ‘Activate’ button at one specific item.

Click on ‘OK’ button on confirmation dialog.

16. Case - View Chart

Purpose

Check whether user can view chart for statistic or not

Inputs

Daily/Monthly/Yearly

Product/Item

Date

Page 169: FPT University - Capstone project - Using QR Code to prevent fake products

169

Expected Output & Pass/Fail criteria

Pass A chart is displayed with vertical axis being ‘Number of checking’ and horizontal axis being ‘Date’

Fail A chart is not displayed or displayed without precision

Test Procedure

Login with role ‘Producer’.

Click ‘View Chart’ tab.

Click on ‘Daily’ button.

Click on ‘Item’ button.

Choose start date as 13/07/2012.

Choose finish date as 13/07/2012.

Click on ‘View Report’ button.

17. Case - View Logs

Purpose

Check whether user can view logs for statistic or not

Inputs

Nothing

Expected Output & Pass/Fail criteria

Pass Time of every check is displayed along with Item Id, Product, Consumer ID

Fail Time of every check is not displayed or displayed without Item Id, Product, Consumer ID

Test Procedure

Login with role ‘Producer’.

Click ‘View Logs’ tab.

5.3.2.4 Role ‘Consumer’ 1. Case - Check QR code

Purpose

Page 170: FPT University - Capstone project - Using QR Code to prevent fake products

170

Check whether consumer can check QR code or not

Inputs

QR code of item

Expected Output & Pass/Fail criteria

Pass An URL appears with information about our web Result about item is displayed Checking QR code is correct

Fail An URL doesn’t appear Checking QR code is not correct

Test Procedure

Open application supporting reading QR code in your phone.

Read QR code.

Open URL.

2. Case – Rating Product

Purpose

Check whether consumer can rate product or not

Inputs

QR code of item

Expected Output & Pass/Fail criteria

Pass User can rate product successfully

Fail User can not rate product

Test Procedure

Open application supporting reading QR code in your phone.

Read QR code.

Open URL.

Click on ‘Product details’ button.

Click on the star scale.

Page 171: FPT University - Capstone project - Using QR Code to prevent fake products

171

5.4 4. Checklists

5.4.1 4.1 Checklist of Validation

N/A

5.4.2 4.2 Submission Checklist

N/A

Page 172: FPT University - Capstone project - Using QR Code to prevent fake products

172

6 User Manual

6.1 Minimum System Requirements

For the user to run our website smoothly as well as be able to check product effectively, you need

two things:

Computer with configuration (mainly for producer):

Screen resolution:1024x768 or higher

OS: Window XP or higher version, Ubuntu, Mac OS, etc

Internet access

Browser: Chrome, Firefox, Safari, or Internet Explorer is OK. We recommend using the latest

version of any browser.

Smartphone (mainly for consumer):

Have at least one QR code reader application. You can use any QR code scanner software

available on Google Play for Android or iTunes App Store for iOS. Some applications we

recommend here:

o Android: Barcode Scanner, Scanner

o iOS: Barcode Scanner

Internet access (Wifi, 3G)

Browser: any popular mobile browser such as Android Default Browser, Opera Mobile,

Opera Mini, Firefox, Chrome, Safari, etc.

6.2 Deployment Manual

Requirement:

Using IIS Manager 7.5

.NET 4.0

IIS Server with deployment handler (http://learn.iis.net/page.aspx/516/configure-the-web-

deployment-handler/)

SQL Server 2008 with Database schema

Deploy database: Attach QR4ACDB.mdf and ASPNETDB.mdf to SQL Server 2008.

Deploy source code:

Open IIS Manager 7.5

If you don’t have default website yet: Right click on Sites -> Add Web Site… Enter Site name,

Location to store website, Port, Hostname.

Right click on site has created, choose Deploy -> Import Application

Browse to QR4AC.zip deployment package.

Check all select rules.

Change the Path of Application (example QR4AC_deploy/).

Change connection string to database.

Click Next and Finish.

Page 173: FPT University - Capstone project - Using QR Code to prevent fake products

173

You can check the website via http://127.0.0.1/QR4AC_deploy/

6.3 Các chức năng và cách sử dụng - Features and how to use

6.3.1 Dành cho nhà sản xuất – For Producer

6.3.1.1 Tài khoản – Account

Ở đây chúng tôi sẽ hướng dẫn bạn cách quản lí

tài khoản của mình, bao gồm việc Đăng nhập,

Thoát và thay đổi thông tin cá nhân.

In this section, we will show you how to manage your account, including Login, Logout or change your information.

6.3.1.1.1 Đăng nhập – Login

Figure 81 - Đăng nhập – Login

Khi bạn truy cập vào website của chúng tôi, bạn sẽ nhìn thấy nút Đăng nhập ở phía trên bên phải trang chủ. Nếu đã có tài khoản, bạn hãy điền tên và mật khẩu sau khi nhấn vào nút Đăng nhập. Sau đó nhấn ‘Đăng nhập’ để truy cập vào trang web. Nếu bạn chỉ muốn đăng nhập một lần, bạn có thể đánh dấu lựa chọn ‘Ghi nhớ?’ để không phải đăng nhập nữa.

When you access to our website, you will see the Login button on the top right corner of Home page. If you already have an account, please type your username and password and then click on ‘Login’ button. If you just want to login once, you can tick off ‘Remember me?’ option and you never have to login again.

6.3.1.1.2 Đăng xuất – Logout

Figure 82 - Đăng xuất – Logout

Page 174: FPT University - Capstone project - Using QR Code to prevent fake products

174

Nếu bạn không muốn sử dụng website nữa, bạn

có thể đăng xuất bằng việc nhấn vào nút ‘Xin

chào ${username}’, sau đó chọn ‘Thoát’.

If you don’t want to use this site anymore, you can logout of our system by clicking on ‘Welcome ${username}’ pop-up button, choosing ‘Logout’ option.

6.3.1.1.3 Đổi mật khẩu - Change password

Figure 83 - Đổi mật khẩu - Change password

Sau khi đăng nhập, bạn có thể thay đổi mật khẩu

bằng cách nhấn vào nút ‘Xin chào ${username}’,

chọn ‘Đổi mật khẩu’. Bạn có thể đánh mật khẩu

mới và sau đó nhấn nút ‘Đổi mật khẩu’ để kết

thúc.

After logging in, you can change your password by clicking on ‘Welcome ${username}’ pop-up button, choosing ‘Change Password’ option. You can type your new password and then click on ‘Change Password’ button to finish.

6.3.1.1.4 Thay đổi thông tin - Edit Profile

Figure 84 - Thay đổi thông tin - Edit Profile

Bên cạnh đó, bạn cũng có thể thay đổi thông tin cá nhân một cách dễ dàng sau khi đăng nhập. Bằng việc chọn ‘Thay đổi thông tin’ ở nút ‘Xin chào ${username}’, bạn có thể thay đổi từ Tên, Địa chỉ, Email, Số điện thoại,…. Nhấn nút ‘Lưu thay đổi’ để lưu lại.

Besides, you can also edit your information easily once you logged in. By clicking on ‘Welcome ${username}’ pop-up button and choosing ‘Edit Profile’ option, you can edit from Name, Address, Email, Phone Number, etc. And don’t forget to click on ‘Save Changes’ button to save it.

Page 175: FPT University - Capstone project - Using QR Code to prevent fake products

175

6.3.1.2 Mẫu - Template

6.3.1.2.1 Danh sách thông tin mẫu - List all Templates

Figure 85 - Danh sách thông tin mẫu - List all Templates

Sau khi đăng nhập, bạn có thể thấy một danh sách ở bên trái trang web. Nhấn vào thẻ ‘Danh sách thông tin mẫu’, ở đó bạn có thể thấy danh sách những mẫu mà bạn đã tạo

After logging in, you can see the menu on the left side of the site. Click on ‘List all Templates’ tab and you can find all the templates you have created.

6.3.1.2.2 Tìm kiếm – Search

Figure 86 - Tìm kiếm – Search

Khi có quá nhiều mẫu, bạn có thề dùng chức năng tìm kiếm. Chỉ cần đánh tên cần tìm và nhấn nút, các kết quả sẽ hiện ra.

When there are so many templates, you can use ‘Search’ functionality. Type the name and click on ‘Search’ button. The result will be displayed.

Page 176: FPT University - Capstone project - Using QR Code to prevent fake products

176

6.3.1.2.3 Tạo mẫu mới - Create new Template

Figure 87 - Tạo mẫu mới - Create new Template

Ở cột danh sách bên trái trang web, bạn có thể thấy thẻ ‘Tạo mẫu mới’. Nhấn vào đó và bạn có thể bắt đầu tạo mẫu mới cho mình. Trong đó, bạn có thể chọn bao nhiêu thuộc tính bạn muốn. Cuối cùng, bạn nhấn vào nút ‘Hoàn thành’ để lưu. Ghi chú: một cách khác để bạn có thể tạo mẫu mới là vào thẻ ‘Danh sách thông tin mẫu’, nhấn vào nút ‘Tạo thông tin mẫu mới’.

On the left-side menu, you can find ‘Create New Template’ tab. Click on it and you can start to add new template. You can choose as many fields as you want in textbox or button. Finally, you click on ‘Submit’ button to save. Note: another way for you to add new template is at ‘List all Templates’ tab, you click on the ‘Create New Information Template’ button.

6.3.1.2.4 Cập nhật mẫu - Update Template

Figure 88 - Cập nhật mẫu - Update Template

Tại mỗi dòng của danh sách, bạn có thể thấy nút

‘Cập nhật’. Nhấn vào đó, bạn có thể cập nhật

thông tin cho mẫu. Sau cùng, bạn có thể lưu

bằng cách nhấn ‘Lưu thay đổi’ hoặc quay trở lại

At every record of the list of template, you can find the ‘Update’ button. After clicking on it, you can update information of template. At last, you can save it by clicking on ‘Save Changes’ button or go back to the list by clicking on ‘Back to List’

Page 177: FPT University - Capstone project - Using QR Code to prevent fake products

177

danh sách mẫu với nút ‘Quay lại danh sách’. button.

6.3.1.2.5 Xóa mẫu - Delete Template

Figure 89 - Xóa mẫu - Delete Template

Trong thẻ ‘Danh sách mẫu’, bạn có thể ngay lập tức thấy nút ‘Xóa’ nằm ngay bên cạnh nút ‘Cập nhật’. Nhấn nút ‘Xóa’ ở trên dòng mẫu muốn xóa. Chọn ‘Yes’ để đồng ý xóa mẫu đó, hoặc ‘Cancel’ để hủy thao tác này.

In ‘List all Templates’ tab, you can see the ‘Delete’ button right next to ‘Update’ button. Click ‘Delete’ button on the template that you want to delete. Choose ‘Yes’ to confirm deleting action or ‘Cancel’ to cancel the deleting action.

Page 178: FPT University - Capstone project - Using QR Code to prevent fake products

178

6.3.1.3 Sản phẩm - Product

6.3.1.3.1 Danh sách sản phẩm - List all Products

Figure 90 - Danh sách sản phẩm - List all Products

Vẫn ở danh sách bên trái trang web, nhấn vào thẻ ‘Danh sách sản phẩm’, một danh sách sẽ được hiện ra với tên sản phẩm, hình ảnh sản phẩm…

Still on the left-side menu, you click at the ‘List all Products’ tab. The list will be displayed with name of product, product image…

6.3.1.3.2 Tìm kiếm sản phẩm- Product searching

Figure 91 - Tìm kiếm sản phẩm- Product searching

Bạn có thể dùng chức năng tìm kiếm để tìm bất cứ sản phẩm nào. Chỉ cần đánh tên và nhấn nút ‘Tìm’.

You can use search functionality to search any product you want. Just type the name then click on ‘Search’ button.

Page 179: FPT University - Capstone project - Using QR Code to prevent fake products

179

6.3.1.3.3 Thêm sản phẩm mới - Add New Product

Figure 92 - Thêm sản phẩm mới - Add New Product

Bạn có thể nhấn vào thẻ ‘Thêm sản phẩm mới’ hoặc vào thẻ ‘Danh sách sản phẩm’ và nhấn nút ‘Thêm sản phẩm mới’.Từ đây, bạn có thể chọn Tên sản phẩm, Loại, Mẫu,…. Để lưu thông tin sản phẩm, bạn nhấn nút ‘Hoàn thành’. Ghi chú: mẫu và sản phẩm có một sự liên kết. Đầu tiên bạn tạo ra một mẫu với vài thuộc tính, sau đó bạn sử dụng mẫu đó để thêm sản phẩm. Vì vậy, nếu sản phẩm không có thuộc tính bạn muốn, bạn phải cập nhật lại mẫu trước rồi mới tạo lại sản phẩm. Hãy cẩn thận khi bạn tạo bất kỳ một mẫu nào bởi vì sẽ rất tốn thời gian nếu bạn cứ phải quay lại để cập nhật.

You can either click on ‘Add New Product’ tab or go to ‘List all Products’ tab and then click on ‘Add New Product’ button. From here, you can choose Product Name, Category, Template, etc. To finish the job, you click on ‘Submit’ button or go back to the list via ‘Back to List’ button. Note: the template and product have a connection. First you create a template with some properties, then you add new product using that template. So if the product doesn’t have the property that you want, you have to go back to the template and update it for the product. Please be careful when you create a template because it can be a waste of time if you have to go back all the time.

Page 180: FPT University - Capstone project - Using QR Code to prevent fake products

180

6.3.1.3.4 Cập nhật sản phẩm - Update Product

Figure 93 - Cập nhật sản phẩm - Update Product

Trong danh sách sản phẩm, ở cột ‘Hoạt động’, bạn nhấn nút ‘Cập nhật’ để cập nhật thông tin sản phẩm. Bạn có thể thay đổi bất kì thông tin nào nhưng như đã nói ở trên, bạn cần phải cập nhật lại mẫu nếu bạn muốn thêm thuộc tính mới. Sau đó, nhấn ‘Lưu thay đổi’ để lưu hoặc “Quay lại danh sách’ để quay lại.

In the list of product, at ‘Actions’ column, you click on ‘Update’ button to update information of product. You can change every field you want but as I told you above, you need to update the template if you want to update new field. After all, click on ‘Save Changes’ button to save or ‘Back to List’ button to go back to the list.

6.3.1.3.5 Tạo item - Create Items

Figure 94 - Tạo item - Create Items

Nằm cạnh nút ‘Cập nhật’ là nút ‘Tạo item’. Nhấn vào đó và bạn có thể tạo bao nhiêu mã QR cũng được. Bạn chỉ cần điền số lượng vào trường ‘Số lượng’ và sau đó nhấn nút ‘Tạo item’.

Right next to the ‘Update’ button you can find the ‘Create Items’ button. After clicking on it, you can create as many QR code as you want. You just need to put the number on ‘Quantity’ field then click on ‘Create Items’ button.

Page 181: FPT University - Capstone project - Using QR Code to prevent fake products

181

6.3.1.3.6 Xem danh sách món hàng của sản phẩm – View product’s items list

Figure 95 - Xem danh sách món hàng của sản phẩm – View product’s items list

Chức năng này sẽ được giới thiệu cụ thể ở phần Item

This functionality will be introduced specifically at Items section.

6.3.1.3.7 Kích hoạt/Vô hiệu sản phẩm - Activate/Deactivate Product

Figure 96 - Kích hoạt/Vô hiệu sản phẩm - Activate/Deactivate Product

Nhà sản xuất có thể dùng chức năng này để vô hiệu hóa hay kích hoạt lại sản phẩm. Họ có thể điều chỉnh bằng cách nhấn vào nút ‘Kích hoạt/Vô hiệu’. Ghi chú: một khi bạn vô hiệu hóa sản phẩm thì những chức năng khác sẽ biến mất.

The producers can use this functionality to activate or deactivate product. They can adjust in their way by clicking on ‘Activate / Deactivate’ button. Note: once you deactivate product, other functionalities will be invisible.

Page 182: FPT University - Capstone project - Using QR Code to prevent fake products

182

6.3.1.4 Yêu cầu tạo gói QR Code - Request

6.3.1.4.1 Xem danh sách yêu cầu tạo gói QR Code

Figure 97 - Xem danh sách yêu cầu tạo gói QR Code

Nhà sản xuất dùng chức năng này để xem danh sách các yêu cầu mình đã gửi để tạo gói QR Code. Để xem danh sách các yêu cầu, chọn thẻ ‘Danh sách yêu cầu’

The producers can use this functionality to view all QR Codes creating request. To view all requests, select ‘List all Request’.

6.3.1.4.2 Tải gói QR Code – Download QR Code Package

Figure 98 - Tải gói QR Code – Download QR Code Package

Ở thẻ ‘Danh sách các yêu cầu’ ở danh sách bên trái trang web, bạn có thể thấy nút ‘Tải về’. Tại đây, bạn có thể tải về những mã QR tương ứng với số lượng bạn chọn trong quá trình tạo yêu cầu tạo gói QR Code.

On the ‘List all Requests’ tab of left-side menu, you can see the ‘Download’ button. Here, you can download all the QR codes corresponding to the quantity you put in creating QR Code Request.

Page 183: FPT University - Capstone project - Using QR Code to prevent fake products

183

6.3.1.4.3 Kích hoạt tất cả item trong gói - Activate All Items in Package

Figure 99 - Kích hoạt tất cả item trong gói - Activate All Items in Package

Từ một sản phẩm, bạn có thể tạo nhiều item. Do đó, để thuận tiện cho nhà sản xuất, bạn có thể kích hoạt một lượt tất cả các mã QR trong một gói thay vì kích hoạt từng mã.

From one product, you can create so many items for it. For the simplicity of producer, you can activate all QR codes in one package instead of activating every QR code.

6.3.1.4.4 Vô hiệu tất cả item trong gói- Deactivate All Items in Package

Figure 100 - Vô hiệu tất cả item trong gói- Deactivate All Items in Package

Tương tự với chức năng ‘Kích hoạt tất cả’ là

chức năng ‘Vô hiệu tất cả’. Chức năng này giúp

bạn vô hiệu hóa tất cả các mã QR trong một gói.

It has the same purpose with ‘Activate All’ functionality. The difference is ‘deactivate’ instead of ‘activate’.

6.3.1.5 Items

6.3.1.5.1 Tìm item – Search item

Figure 101 - Tìm item – Search item

Bạn có thể tìm dữ liệu bạn muốn bằng cách đánh You can type the name to the field and then click on ‘Search’ button to find the data you want.

Page 184: FPT University - Capstone project - Using QR Code to prevent fake products

184

tên rồi nhấn nút ‘Tìm’.

6.3.1.5.2 Tải lên hình QR Code để tìm kiếm item – Upload QR Code for item’s searching

Figure 102 - Tải lên hình QR Code để tìm kiếm item – Upload QR Code for item’s searching

Nhấn nút ‘Tải lên để tìm kiếm’ và trình duyệt sẽ

chuyển sang trang tải file QR Code lên.

Nhấn nút ‘Tải lên’ và chọn tập tin QR Code, hoặc

kéo và thả tập tin QR Code vào trang tải lên. Hệ

thống sẽ trả về thông tin item từ những file QR

Code này.

Click the button “Upload for Search”, then the browser will redirect to Upload page. Click the button “Upload” and select the QR code files, or drag-and-drop files from Explorer into Upload page for upload. System will return item’s info from uploaded QR Code files.

6.3.1.5.3 Xem nhật ký kiểm tra của món hàng – View item’s checking logs

Figure 103 - Xem nhật ký kiểm tra của món hàng – View item’s checking logs

Đối với mỗi dòng, nếu bạn muốn xem ngày món hàng được kiểm tra cụ thể và ai làm điều đó, bạn có thể làm với nút ‘Xem nhật ký’. Những thông tin hữu dụng đối với bạn sẽ được hiện ra.

For every record, if you want to view the specific checking date and who do that, you can do it with ‘View Logs’ button. It shows you useful information.

Page 185: FPT University - Capstone project - Using QR Code to prevent fake products

185

6.3.1.5.4 Xuất nhật ký ra tập tin Excel – Export checking logs to Excel file

Figure 104 - Xuất nhật ký ra tập tin Excel – Export checking logs to Excel file

Sau khi nhấn vào nút ‘Xem nhật ký’, bạn có thể thấy tất cả chi tiết liên quan đến việc kiểm tra. Nếu có quá nhiều dữ liệu, bạn cũng có thể tải về máy với chức năng ‘Xuất ra Excel’. Chỉ cần nhấn nút và sau đó nhấn ‘OK’ thì dữ liệu đã nằm ở máy bạn.

After clicking on ‘View Logs’ button, you can see all the details relating to checking. If there are lots of data, you also can download it to your computer with ‘Export to Excel file’ functionality. Just click on the button and after that click on ‘OK’ button. The data is already in your computer.

6.3.1.5.5 Xem mã QR - View QR code

Figure 105 - Xem mã QR - View QR code

Tại mỗi dòng, chúng tôi sẽ cho hiện mã QR để nhà sản xuất dễ kiểm soát hơn. Bạn có thể xem mã khi nhấn vào nút ‘Mã QR’.

At every record, we also show the QR code for producers’ easy control. You can see it when you click on ‘QR Code’ button.

6.3.1.5.6 Kích hoạt/Vô hiệu item - Activate/Deactivate Item

Figure 106 - Kích hoạt/Vô hiệu item - Activate/Deactivate Item

Page 186: FPT University - Capstone project - Using QR Code to prevent fake products

186

Nếu bạn là nhà sản xuất và bạn cảm thấy mã QR

này không còn được sử dụng nữa, bạn có thể vô

hiệu chúng. Ngược lại, bạn có thể kích hoạt một

mã QR cũ nếu bạn muốn sử dụng nó lại. Nút này

nằm kế bên nút ‘Mã QR’.

Ghi chú: một khi bạn vô hiệu một món hàng thì

những chức năng khác sẽ biến mất.

If you are a producer and you feel this QR code is no more used, you can deactivate it. Conversely, you can activate the old QR code if you want to use it again. The button is next to ‘QR Code’ button. Note: once you deactivate one item, other functionalities will be invisible.

6.3.1.6 Thống kê - Statistic

6.3.1.6.1 Xem biểu đồ - View Chart

Figure 107 - Xem biểu đồ - View Chart

Chức năng này cung cấp cho bạn báo cáo thể hiện thời điểm món hàng, sản phẩm được kiểm tra. Bạn có thể xem thống kê theo ngày, tháng hoặc thậm chí năm.

This functionality provides you with the report which shows the checking times of item, product. You can view it on daily, weekly, monthly and even yearly.

Page 187: FPT University - Capstone project - Using QR Code to prevent fake products

187

6.3.1.6.2 Xem nhật ký - View Logs

Figure 108 - Xem nhật ký - View Logs

Sau khi nhấn vào thẻ ‘Xem nhật ký’, dựa vào mã

số món hàng, bạn có thể thấy Ngày kiểm tra

tương ứng, mã số người tiêu dùng và sản phẩm.

Điều đó giúp bạn quản lý món hàng tốt hơn.

After clicking on ‘View Logs’ tab, based on the Item ID, you can see the corresponding Checking Date, Consumer ID and Product. It helps you manage your item better.

6.3.1.6.3 Xuất nhật ký kiểm tra ra Excel - Export checking logs to Excel file

Figure 109 - Xuất nhật ký kiểm tra ra Excel - Export checking logs to Excel file

Bạn có thể tải dữ liệu về máy để phân tích sâu

hơn. Nhấn vào nút ‘Xuất ra Excel’.

You can download the data to your computer for further analysis. Click on ‘Export to Excel file’ button.

Page 188: FPT University - Capstone project - Using QR Code to prevent fake products

188

6.3.2 Dành cho người tiêu dùng – For Consumer

6.3.2.1 Kiểm tra sản phẩm - Checking Product

Figure 110 - Kiểm tra sản phẩm - Checking Product

Với ứng dụng đọc mã QR trên điện thoại của

bạn, bạn có thể kiểm tra sản phẩm bằng cách

dùng camera để quét mã QR được đính kèm trên

bất kì món hàng nào.

With the QR code reader application on your smartphone, you can check the product by putting your smartphone’s camera using the application straight to the QR code attached on any item to scan.

6.3.2.2 Xem thông tin chi tiết của sản phẩm – Product details

Figure 111 - Xem thông tin chi tiết của sản phẩm – Product details

Và nếu người tiêu dùng muốn xem thêm thông tin chi tiết của sản phẩm, họ có thể nhấn vào nút ‘Chi tiết sản phẩm’ tại màn hình kiểm tra. Tất cả thông tin của sản phẩm được cung cấp bởi nhà sản xuất sẽ được hiện ra.

And if consumers want to see the detailed information of product, they can do it by clicking on ‘Product Details’ button at checking screen. All the information of product which is supplied by producers will be displayed.

Page 189: FPT University - Capstone project - Using QR Code to prevent fake products

189

6.3.2.3 Đánh giá sản phẩm - Rating Product

Figure 112 - Đánh giá sản phẩm - Rating Product

Sau khi xem chi tiết sản phẩm, người tiêu dùng muốn đánh giá chúng. Từ quan điểm này, chúng tôi giúp họ thể hiện những cảm xúc, suy nghĩ về sản phẩm thông qua chức năng ‘Đánh giá sản phẩm’. Rất đơn giản, bạn chỉ việc chọn thang điểm từ 1 tới 5 tương ứng với số ngôi sao trên màn hình.

After seeing the details, consumers want to grade it. From this standpoint, we help them express their feelings, their thinking about the product via ‘Rating product’ functionality. It is very simple for you to choose based on the 1 to 5 scale. Just click to the star corresponding to the mark.

Page 190: FPT University - Capstone project - Using QR Code to prevent fake products

190

6.3.2.4 Tìm những sản phẩm cùng loại – Find related products

Figure 113 - Tìm những sản phẩm cùng loại – Find related products

Người tiêu dùng có thể làm nhiều việc hơn là chỉ

kiểm tra sản phẩm. Họ có thể tìm kiếm những

sản phẩm cùng loại. Có thể từ đó, họ sẽ tìm được

cho mình một sản phẩm lý tưởng mà họ mong

muốn. Không cần gì hơn một cú nhấp chuột và

nút ‘Sản phẩm cùng loại’ và bạn có thể thấy

được một danh sách.

Consumers can go further than just check product. They can find out the related product. Maybe from there, they can find the ideal product that they desire. No more than one click at ‘Related Product’ and you can find a list of them.

Page 191: FPT University - Capstone project - Using QR Code to prevent fake products

191

6.3.2.5 Xem sản phẩm từ nhà sản xuất này – View products from this producer

Figure 114 - Xem sản phẩm từ nhà sản xuất này – View products from this producer

Bên cạnh đó, chúng tôi cũng giúp người tiêu dùng biết thêm nhiều về nhà sản xuất. Họ có thể tìm những sản phẩm khác của chính nhà sản xuất này. Bạn có thể thấy được qua nút ‘Từ nhà sản xuất này’.

Besides, we also help consumers know more about the producer. They can find other products from this producer. You can see it via ‘From this producer’ button.

Page 192: FPT University - Capstone project - Using QR Code to prevent fake products

192

7 Appendix Figure 1 - Overal Use Case Diagram ...................................................................................................... 19

Figure 2 - User Case-User Login Diagram .............................................................................................. 19

Figure 3 - Use Case-Producer Management Diagram ........................................................................... 23

Figure 4 - Use Case-Account Management Diagram ............................................................................ 29

Figure 5 - Use Case-Information Template Management Diagram ...................................................... 35

Figure 6 - Use Case-Product Management Diagram ............................................................................. 42

Figure 7 - Use Case-View Product Details ............................................................................................. 49

Figure 8 - Use Case- Category Management Diagram .......................................................................... 50

Figure 9 - Use Case-Item Package/Request Management Diagram ..................................................... 54

Figure 10 - Use Case-Item Management Diagram ................................................................................ 59

Figure 11 - Use Case-Item Checking Diagram ....................................................................................... 65

Figure 12 - Use Case-Product Rating Diagram ...................................................................................... 67

Figure 13 - Use Case- Consumer Check Statistic Diagram .................................................................... 69

Figure 14 - Use Case-Logging Check Statistic Diagram ......................................................................... 73

Figure 15 - Entity Relationship Diagram ............................................................................................... 76

Figure 16 - System Architecture ............................................................................................................ 78

Figure 17 - Component Diagram ........................................................................................................... 79

Figure 18 - Model Classes ..................................................................................................................... 80

Figure 19 - Controller Classes................................................................................................................ 81

Figure 20 - Controller & View for Home ............................................................................................... 82

Figure 21 - Methods in ImagesMerging class ....................................................................................... 82

Figure 22 - Database Context for model classes ................................................................................... 83

Figure 23 - Methods in HashUtility class ............................................................................................... 84

Figure 24 - Methods in QRUtilities class ............................................................................................... 84

Figure 25 - Model-View-Controller for Account ................................................................................... 85

Figure 26 - Model-View-Controller for Producer .................................................................................. 87

Figure 27 - Model-View-Controller for Product .................................................................................... 89

Figure 28 - Model-View-Controller for Item ......................................................................................... 91

Figure 29 - Model-View-Controller for Checking Logs .......................................................................... 92

Figure 30 - Model-View-Controller for Rating ...................................................................................... 94

Figure 31 - Model-View-Controller for Category .................................................................................. 95

Figure 32 - Model-View-Controller for InfoTemplate ........................................................................... 96

Figure 33 - Model-View-Controller for Request ................................................................................... 97

Figure 34 - Model-View-Controller for CheckingLogs ........................................................................... 99

Figure 35 - Login sequence diagram ................................................................................................... 101

Figure 36 - List all Templates sequence diagram ................................................................................ 101

Figure 37 - Add new Template sequence diagram ............................................................................. 102

Figure 38 - List all Producers sequence diagram ................................................................................ 102

Figure 39 - Add new Producer sequence diagram .............................................................................. 103

Figure 40 - Update Producer Information sequence diagram ............................................................ 103

Figure 41 - Switch Producer Activation sequence diagram ................................................................ 104

Figure 42 - List all Categories sequence diagram ................................................................................ 104

Figure 43 - Add new Category sequence diagram .............................................................................. 105

Figure 44 - Update Category sequence diagram ................................................................................ 105

Page 193: FPT University - Capstone project - Using QR Code to prevent fake products

193

Figure 45 - Delete Category sequence diagram .................................................................................. 106

Figure 46 - List all Products sequence diagram .................................................................................. 106

Figure 47 - Add New Product sequence diagram ............................................................................... 107

Figure 48 - View Product Details sequence diagram .......................................................................... 107

Figure 49 - Update Product Information sequence diagram .............................................................. 108

Figure 50 Create request for creating QR Code package sequence diagram ..................................... 109

Figure 51 - Process QR Code package creating request sequence diagram ....................................... 109

Figure 52 - List all Requests sequence diagram .................................................................................. 110

Figure 53 - Download QR Code package sequence diagram .............................................................. 110

Figure 54 - List all Items sequence diagram ........................................................................................ 111

Figure 55 - Switch item’s activation sequence diagram ..................................................................... 111

Figure 56 - Product Checking sequence diagram ................................................................................ 112

Figure 57 - View statistic by chart sequence diagram ........................................................................ 112

Figure 58 - View checking log sequence diagram ............................................................................... 113

Figure 59 - Login UI ............................................................................................................................. 114

Figure 60 - Change password .............................................................................................................. 114

Figure 61 - Update profile ................................................................................................................... 115

Figure 62 - Change password .............................................................................................................. 116

Figure 63 - List all producers UI........................................................................................................... 116

Figure 64 - Add new producer UI ........................................................................................................ 117

Figure 65 - Update producer UI .......................................................................................................... 118

Figure 66 - Producer's account management ..................................................................................... 119

Figure 67 - List all Categories .............................................................................................................. 119

Figure 68 - Create new Category ........................................................................................................ 120

Figure 69 - Update Category ............................................................................................................... 120

Figure 70 - List all Information Template ............................................................................................ 120

Figure 71 - Add new Information Template ........................................................................................ 121

Figure 72 - List all products UI............................................................................................................. 122

Figure 73 - Create items and QR Code images package ..................................................................... 122

Figure 74 - Add new products UI ........................................................................................................ 123

Figure 75 - Update product UI ............................................................................................................ 124

Figure 76 - List all Products ................................................................................................................. 125

Figure 77 - List all Request .................................................................................................................. 126

Figure 78 - View statistic ..................................................................................................................... 126

Figure 79 - View logging ...................................................................................................................... 127

Figure 80 - Database design ................................................................................................................ 128

Figure 81 - Đăng nhập – Login ............................................................................................................ 173

Figure 82 - Đăng xuất – Logout ........................................................................................................... 173

Figure 83 - Đổi mật khẩu - Change password ..................................................................................... 174

Figure 84 - Thay đổi thông tin - Edit Profile ........................................................................................ 174

Figure 85 - Danh sách thông tin mẫu - List all Templates ................................................................... 175

Figure 86 - Tìm kiếm – Search ............................................................................................................. 175

Figure 87 - Tạo mẫu mới - Create new Template ............................................................................... 176

Figure 88 - Cập nhật mẫu - Update Template ..................................................................................... 176

Figure 89 - Xóa mẫu - Delete Template .............................................................................................. 177

Page 194: FPT University - Capstone project - Using QR Code to prevent fake products

194

Figure 90 - Danh sách sản phẩm - List all Products ............................................................................. 178

Figure 91 - Tìm kiếm sản phẩm- Product searching ........................................................................... 178

Figure 92 - Thêm sản phẩm mới - Add New Product .......................................................................... 179

Figure 93 - Cập nhật sản phẩm - Update Product ............................................................................... 180

Figure 94 - Tạo item - Create Items .................................................................................................... 180

Figure 95 - Xem danh sách món hàng của sản phẩm – View product’s items list .............................. 181

Figure 96 - Kích hoạt/Vô hiệu sản phẩm - Activate/Deactivate Product ............................................ 181

Figure 97 - Xem danh sách yêu cầu tạo gói QR Code.......................................................................... 182

Figure 98 - Tải gói QR Code – Download QR Code Package ............................................................... 182

Figure 99 - Kích hoạt tất cả item trong gói - Activate All Items in Package ........................................ 183

Figure 100 - Vô hiệu tất cả item trong gói- Deactivate All Items in Package ...................................... 183

Figure 101 - Tìm item – Search item ................................................................................................... 183

Figure 102 - Tải lên hình QR Code để tìm kiếm item – Upload QR Code for item’s searching ........... 184

Figure 103 - Xem nhật ký kiểm tra của món hàng – View item’s checking logs ................................. 184

Figure 104 - Xuất nhật ký ra tập tin Excel – Export checking logs to Excel file ................................... 185

Figure 105 - Xem mã QR - View QR code ............................................................................................ 185

Figure 106 - Kích hoạt/Vô hiệu item - Activate/Deactivate Item ....................................................... 185

Figure 107 - Xem biểu đồ - View Chart ............................................................................................... 186

Figure 108 - Xem nhật ký - View Logs ................................................................................................. 187

Figure 109 - Xuất nhật ký kiểm tra ra Excel - Export checking logs to Excel file ................................. 187

Figure 110 - Kiểm tra sản phẩm - Checking Product ........................................................................... 188

Figure 111 - Xem thông tin chi tiết của sản phẩm – Product details .................................................. 188

Figure 112 - Đánh giá sản phẩm - Rating Product............................................................................... 189

Figure 113 - Tìm những sản phẩm cùng loại – Find related products ................................................ 190

Figure 114 - Xem sản phẩm từ nhà sản xuất này – View products from this producer ..................... 191