You are on page 1of 210

SALES MONITORING SYSTEM FOR POSH AND FAB CONCEPT

STORE WITH ONLINE VIEWING

A Project
Presented to
the Faculty of STI College Cebu

In Partial Fulfillment
of the Requirements for the Degree of
Bachelor of Science in Information Technology

by:

Cahimat, John Rey C.


Naldoza, Jenalyn B.
Salva, Ryanjie E.

Mr. Romar John Patindol


Project Adviser

October 2018
ADVISER’S RECOMMENDATION SHEET

This Project entitled

Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing

by:

Cahimat, John Rey C.


Naldoza, Jenalyn B.
Salva, Ryanjie E.

submitted in partial fulfilment of the requirements of the Bachelor of Science in


Information Technology degree has been examined and his hereby recommended for
acceptance and approval

_____________________________
Mr. Romar John Patindol
Project Adviser

October 2018

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 2
PANEL’S APPROVAL SHEET

This Project entitled

Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing

developed by:

Cahimat, John Rey C.


Naldoza, Jenalyn B.
Salva, Ryanjie E.

after having been presented is hereby approved


by the following members of the panel

___________________________ __________________________
Engr. Lorencio M. Secretaria Engr. Lynuel Fernandez
Panelist Panelist

___________________________________
Engr. Francis Cesar Bartolome (MM, MIT)
Lead Panelist

October 2018

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 3
PROJECT COORDINATOR AND DEAN’S ACCEPTANCE SHEET

This Project entitled

Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing

after having been recommended and approved is hereby accepted


By the Information Technology Department
of STI College Cebu

___________________________
Mrs. Catherine P. Odiong
Project Coordinator

___________________________
Engr. April Rose Gomez
Academic Head

October 2018

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 4
TABLE OF CONTENTS

Page
Title Page 1
Adviser’s Recommendation Sheet 2
Panel’s Approval Sheet 3
Project Coordinator and Dean’s Acceptance Sheet 4
Table of Contents 5-6
Abstract 7
Preface 8
Chapter1
Introduction 9
Statement of the problem 10
Overview of the Current State of Technology 11-13
Objectives of the Study 13
Scope and Limitations of the Study 14-18
Methodology 18-19
Chapter 2
Theoretical Framework
Introduction 20
Decay Theory of Forgetting 20
Maslow’s Hierarchy of Needs 21
Innovation Theory 22
Summary 23

Chapter 3
Introduction 24
System Design Specification 24

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 5
Architectural Design 25
Context Diagram 26
Data Flow Diagram 27-30
Entity Relationship Diagram 31
Hierarchical Input Output Diagram 32-34
Development Tools 35-36
Summary 37
Chapter 4
Performance Analysis
Introduction 38
Experimental 38-39
Result Analysis 39-50
Summary 51
Chapter 5
Conclusion 52
Bibliography 53-54
Acknowledgement 55
Appendices 56
Appendix A. Gantt Chart 57-58
Appendix B. Agreement 59-65
Appendix C. Survey Form 66-68
Appendix D. User’s Manual 69-94
Appendix E. Source Code 95-203
Appendix F. Curriculum Vitae of Researchers 204-210

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 6
ABSTRACT

Technology has become everybody’s mean for us to do well in terms of personal career,

communications, business and in all other aspects. It brought us computerization which has

helped us in many ways. Mostly, to simplify works and lessens the usual time to finish

works. Due to this, the demand for automated processing system has highly increased

because people can double their production compared to doing things manually.

Presently, many businesses still use the manual process or relying on the old method using

Microsoft Excel. Doing business transaction using those process can cost man power, time

and money. In Posh and Fab Concept Store, process like transactions, storing of brand

partner personal information and generating report are done in Microsoft Excel which

makes it prone to errors such as discrepancy of data and data redundancy.

Thus, this study is focused in eliminating these processes by way of automation. From

storing, gathering, retrieval of archived data, transactions, sales and reports generation. The

staffs of Posh and Fab Concept Store especially the owner will be able to efficiently

manage its business transactions and reduced time consumed in performing such processes.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 7
PREFACE

Since its formation on 2017, Posh and Fab Concept Store has been using manual procedure

of doing business transaction. They are currently using Microsoft Excel and generate a

report manually and send it via email, by relaying on their old method in handling that may

lead to several problems. As a growing business Posh and Fab Concept Store should

provide a quality of work in making these processes more convenient and efficient to its

staff and brand partners.

The proponents aim to build, design and implement an advance computerized Sales

Monitoring System for Posh and Concept Store that will increase the performance and save

time from the current system being used, and finally minimize human errors from the

employees. Generating reports is also made possible through this project without much

burden in writing it on Microsoft excel. The project also has user manual which will guide

a user in navigating the system.

With this complete project documentation, users will clearly understand on how this project

is carried throughout the whole process. Inside is detailed information on how the

proponents came to materialize this project, from the data gathering to the coding of the

system. Also stated in detail are the problem, objectives, scope and limitations and the

methodologies used to realize the goal which is to a software solution for Posh and Fab

Concept Store daily transactions.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 8
CHAPTER 1

INTRODUCTION

Technology is vast nowadays, but still lots of establishments tend to use the traditional

method and is hesitant to invest huge amounts financially in having computerized systems.

As Information Technology students, we are taught to create that aid for companies in need,

and one of the ways we could do this is by systematically, analyzing designing and

implementing a computerized system that could improve their existing system.

Sales Monitoring System is a means of keeping an eye on how many sales a company is

making, and how much profit is being earned. This system will improve in handling the

products sold by just entering data required and the system would handle the calculation.

Having an advanced and computerized system in running business makes more productive,

efficient, secure and convenient both to the company and to its clients. Sales Monitoring

System is meant to help businesses to increase sales and most importantly to increase profit

of the company because it helps works faster and easier. Since money is the blood of a

business, it is very important to have an exact and precise data for an accurate calculation

of the sales in the business.

In this regard, we are proposing an improve automated computer system for Posh and Fab

Concept Store. Posh and Fab Concept Store started last July 28, 2017, an establishment

different from online sellers owned by Tricia Javier, was an online seller whose goal is to

help co-online sellers to expand their own unique brand.

With the interviews and researches done, the team was able to point out the flaws and

problems occurring in the business. We have been able to find out the problems and provide

an alternative answer to their current business.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 9
Statement of the Problem

Through several interviews with the owner and selected staff, Posh and Fab Concept Store

disclosed that they are currently using Microsoft Excel and generate a report manually and

send it via email, by relaying on their old method in handling may lead to several problems.

As a growing business, Posh and Fab Concept Store should provide a quality of work in

making these processes more convenient and efficient to its staff and brand partners. Thus,

the proponents have outlined the problems that the client had encountered in running their

business daily.

 Data redundancy

Transferring of data from paper to Microsoft excel is a tiresome work which is

prone to human error that can lead to data redundancy.

 Difficult on retrieving of stored data and sales discrepancy.

Currently, the owner only relies on the integrity of sales staff to record the daily

transactions that were made and manually search files by going to each excel

document.

 Tiresome analysis and generation of instant and up-to-date reports

Currently, the staff will have to create their own excel document every day in

order to provide and monitor the sales report.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 10
Overview of the Current State of Technology

The proponents’ client does have a computerized system where in the data of their sales

are entered in Microsoft Excel (Figure 1.0 Microsoft Excel). Every product that is delivered

in the store are only written on an ingress form that the store provided (Figure 2.0 Ingress

Form). Every transaction that is being completed are entered in Microsoft Excel. It takes

time for them to input the data to Microsoft Excel in every product being purchased.

There’s an existing system about online sales monitoring system that is used by Emporium,

an online brands outlet in Cebu, however, their online monitoring could not view sales

through graph like bar graph. (Figure 3.0 Emporium)

Figure 1.0 Microsoft Excel


Figure 1.0 show the current application that our client used in generating sales reports for

each brand partner.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 11
Figure 2.0 Ingress Form
As of this form (Figure 2.0), proponents’ client practices a manual gathering of brand

partner's product that are delivered in the store is one of it. This form is used to store

information of each products. After the brand partner fill-up, the form, the admin will

input the data via Microsoft Excel.

Figure 3.0 Emporium

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 12
There are already lots of existing Sales Monitoring System that are currently use in

business. One of this is the Online Sales Monitoring System for Emporium (Figure 3.0).

This system allows the brand partners to view their sales according to their preferences.

However, their online monitoring could not automatically send an email to their brand

partners.

Objectives of the Study

The proponents aim to build, design and implement an advance computerized sales

monitoring system for Posh and Fab Concept Store that will increase the performance and

save time from the current system being used, and finally minimize human errors from the

employees. As for online sellers, they can have an access of the website wherein they could

view the sales of their products respectively.

The general objective of the proposed system is narrowed down in a specific objective:

 Provide a sufficient data handling

o Create a system that prevent sales redundancy.

 Provide an ease in data retrieval, searching and storing

o Create a system that can help our client search, store and display

transactions data easily.

 Provide an online viewing to monitor sales report

o Create a website that can help our client, generate and track the sales

report.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 13
Scope and Limitations of the Study

Scope
The study will focus on the improvement of the current system of our client that

includes the following:

 As of cashier and brand partner’s accounts is provided by the system

administrator only.

 A default username and password are given to the system administrator.

 As of the system, can automatically send email sales port notification

every month.

 As of the system, can automatically add cashier transaction logs.

Desktop Application

For the administrator

 View Logs for the cashier transaction.

 Item Form

o Displays data in a table form of all products.

o Has an access role of adding a product, updating a product, and

archiving a product.

o Can add a product category

o Has an access role of branding a product during adding.

 Product Information Form

o Shows product’s information

o Search specific product

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 14
 Cashier Accounts Form

o The admin has an access role of viewing the cashier’s information at the

cashier’s profile form.

o A table of data is provided showing all cashiers’ account.

o The admin can add cashier accounts, update a cashier account

information and, archive cashier account.

 Cashier’s Profile Form

o Shows personal information of a cashier

 Brand Partners’ Accounts Form

o The admin has an access role of viewing the brand partner’s information

at the brand partners’ form.

o A table of data is provided showing all brand partners’ accounts.

o The admin can add a brand partner account, edit a brand partner account

at the profile form, and archive or unarchive brand partner account.

 Brand Partner’s Profile Form

o Shows personal information of a brand partner.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 15
For the Cashier

 Transaction Form

o The cashier has an access role of making transactions.

o Generate sales invoice every after successful transaction.

o Search by product code in adding transaction.

o Change Password.

o Send damaged product to admin for approval.

Website

For the administrator

 View all brand partners account


 View all cashiers account
 Send email reports every month through CRON
 Search specific product
 Search specific user either cashier or brand partners
 View all sales by daily, or base on user’s date preferences
 View all damaged return products

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 16
For the Brand Partners

 View brand partner’s own sales

o Generate sales by daily or base on brand partner’s date preferences.

o View sales records through graphs.

 View brand partners profile info

 Brand Partners Profile Form

o Update Profile Info

Limitations

The proposed system is only made to cater the information provided in the scope

for the convenience of Posh and Fab Concept Store. However, there are areas that

will not be covered by the proposed system to evade unnecessary problems when

the system is deployed.

 Purchases are only available through walk-in.

 Payments only accepts cash.

 The system could not generate official receipt.

 The system requires internet connection to be accessible. No internet access

means the system cannot be functional.

 The system does not have Secure Sockets Layer (SSL) Certificate that

standardized security technology for establishing an encrypted link between

a web server and a browser.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 17
 Will not accommodate inventory stocks control which involves tracking the

stock level at all times, identify the remaining products, stock in and stock

out.

 Website can’t be accessible in mobile.

Methodology

In this study, the proponents decided to use Scrum Methodology to fulfill and reach the

intended output. Scrum is an iterative framework and a leading agile development

methodology for handling rapidly evolving projects. Scrum emphasizes teamwork where

we, the development team, works to achieve towards a well-define goal.

Figure 4.0 Scrum Methodology

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 18
 Product Backlog – The product backlog contains a to-do list consisting of work items,

to define the product backlog, proponents conducted an interview with the product

owner. The product owner is the person responsible for prioritizing the product

backlog.

 Sprint Planning- In sprint planning the proponents together with the scrum master are

planning which product backlog items will be delivered into sprint backlog and how it

will be achieved.

 Sprint Backlog- The sprint backlog is the set of the product backlog items selected for

the sprint. In sprint backlog each member of the scrum team should choose a task to be

done during the sprint.

 Daily Scrum- The daily scrum is a short everyday meeting (no more than 15 minutes)

for the team.

 Sprint Review- The sprint review is held at the end of the sprint. Each member of the

team presents their work being completed and not completed during the sprint.

 Sprint Retrospective- The sprint retrospective is the final meeting in the sprint to

determine what went well during the sprint, what didn’t go well during the sprint and

how the team can improve in the next sprint.

 Increment- the sum of all the product backlog items completed by the team during the

sprint.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 19
CHAPTER 2

THEORETICAL FRAMEWORK

Introduction

As stated, the company has been using the traditional method of computing their purchases

and monitoring their sales in Microsoft Excel. The proponents aim to implement an

advanced computerized sales monitoring system for the company’s continuous growth.

In this chapter, the study will be expounded with the aid of these theories provided. Each

theory will materialize that the proposed system can make it plausible on business or

establishment to keep up with their needs.

Decay Theory of Forgetting

Decay theory proposes that memory fades due to the mere passage of time.

Information is therefore less available for later retrieval as time passes and memory,

as well as memory strength, wears away. The longer the time, the more the memory

trace decays, and as a consequence more information is forgotten.

In rental business like Posh and fab Concept Store, it is beneficial to track the

customers who were not able to return the products to lessen the loss of the

company.

Currently, the staffs of Posh and Fab Concept Store are tracing rentals manually.

However, manual tracking may cause lapses and staffs might not be able to pay

close attention to details. There might be information that has already been recorded

before or worst forgotten. [BERM, 2009]

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 20
Maslow’s Hierarchy of Needs

Maslow’s Hierarchy of Needs identified how a person’s needs to dominate

motivation and behavior and that there is a specific order in which they should be

met. His theory suggested that the basic needs (physiological, safety, love and

belonging) had to be met before the individual will desire and pursue higher levels

of needs (esteem, self-actualization, and self-transcendence). Business owners

found a similar hierarchy of needs among business owners. These are: Sufficient

Sales (every sale is critical); Financial Management (costs and profitability are

critical); Marketing Actions (marketing generates enough prospects for enough

sales to occur); Personnel (ramp up — enough support to deliver the product and

service); Government Compliance (concerns about regulations, personnel law and

taxes predominate); Processes and Procedures (first step toward consistency and

growth); Team Management (training need); Scalability (focus on how this leads

to a profitable exit and transference strategy for the owner). It also stated that if

you’re a business owner, this should help you in spending your money and time

wisely. (http://ownersview.com/business-owners-hierarchy-of-needs/). With that

being said, this theory supports the system in terms of time management and

profitability. Sales are very crucial, and we need to have the right system to keep

our business more competent.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 21
Innovation Theory (Edward Elgar Publishing)

It stated that we can define innovation as the introduction of new elements or a new

combination of old elements in industrial organizations (cf. Scumpeter 1934). In

this analysis the main emphasis in the innovation concept will not be on the actual

new idea or developing the new element for commercial use of innovation:

‘Innovation refers to the process of bringing any new idea into use’. In addition, the

innovation process in the individual company are of great importance to the

development and growth of the company and thus in turn to socioeconomic growth

and national competitiveness.

In this theory, it’s stated that there is space to create something new to apply the

improvements to certain things. It examines the emergence of different theories of

innovation in different periods, and how they compete for dominance today. It

addresses technology as a determinant of innovation, emphasizing the relations

technology with organizational and social factors.

Innovation for the existing system in Posh and Fab Concept Store will surely benefit

not just the store owner and the brand partners, but the whole operation as well. It

is indeed a good idea to create an advanced computerized sales monitoring system

that will enhance the store’s service to their brand partners.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 22
Summary

These theories answer the need for improving the computerized system that is being used

by the Posh and Fab Concept Store. Along with the development of this system, comes the

theories that serves as a guide in determining its very aspect. These theories signify the

importance of creating an advance computerized system to help in monitoring the

company’s sales. The implementation of this system would not only benefit to the store

owner and the brand partners but also to the store itself, as a business organization.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 23
CHAPTER 3

SALES MONITORING SYSTEM FOR POSH AND FAB CONCEPT STORE


WITH ONLINE VIEWING

Introduction

This chapter showcase the development tools that involved in the proposed system. It

defines the functions, concepts, flow of data involved, structure of its database and the

design of its interface. Diagrams and Schema of the database is also showcased here to

fully understand the relationship, flow and overall structure of the proposed system.

System Design Specification

This section will show the flow of all the diagrams that are made by the proponents for

all the user of the proposed system. The desktop application is only accessible by the

admin and the cashier with its exact role, while the website is accessible by the admin

and the brand partners. The admin can manage all the accounts of the cashiers and the

brand partners and monitor the sales and the products. The cashier is capable of making

transactions, and the brand partner are capable of viewing their own sales and products.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 24
Architectural Design

Figure 5.0 General Architectural Design

Figure 5.0 shows all the overall structure of the system including all the users (Admin,

Cashier and Brand Partners). It explains the graphical representation of how the proposed

system interacts to the database and the users. The admin and the cashier are users who can

only access the system through desktop. Brand Partners on the other hand can directly

access the system through website.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 25
Context Diagram

Figure 6.0 Context Diagram

Figure 6.0 shows the context-level of the proposed system. It provides the relationship that

the system has with other external entities and shows the capabilities of the system by its

three users (Admin, Cashier and Brand Partners).

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 26
Data Flow Diagram

Figure 7.0. Data Flow Diagram for the System Admin

Figure 7.0 shows the supremacy of the administrator in the whole system structure over

any other users.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 27
Figure 8.0 Part 1. Data Flow Diagram for the System Admin

Figure 8.0 is a continuation of the system admin’s access to the system. In this figure, the

admin is allowed to manage the addition of item, viewing and archiving the items.

Figure 9.0 Part 2. Data Flow Diagram for the System Admin

The admin’s access is continued in Figure 9.0 Data Flow Diagram for the system admin.

Shown here is the process by which the admin is able to manage damaged return products.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 28
Figure 10.0 Part 3. Data Flow Diagram for the System Admin

The admin’s access is continued in Figure 10.0 Data Flow Diagram for the system admin.

Shown here is the process by which the admin is able to generate reports.

Figure 11.0 Part 4. Data Flow Diagram for the System Cashier

Figure 11.0 shows the overall functionalities that the cashier can access through desktop

application.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 29
Figure 12.0 Part 5. Data Flow Diagram for the System Brand Partners

Figure 12.0 illustrates the overall functionalities that Brand Partners can access through

Posh and Fab Concept Store’s website.

Figure 13.0 Part 5. Data Flow Diagram for System Service

Figure 13.0 illustrates where the system automatically sends an email notification to the

brand partners every month for sales reports.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 30
Entity Relationship Diagram

Figure 14.0 Entity Relationship Diagram

Figure 14.0 shows the proposed system’s database structure or schema. Here, the relations

or commonly referred to as tables are specified as well as the attributes or columns they

contain. This diagram shows the relationship between each table through their respective

primary and/or foreign keys that serves as identifiers for a particular record.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 31
Hierarchical Input Process Output

Figure 15.0 Hierarchical Input Process Output Diagram for the System Admin

Figure 15.0 shows the administrator privilege. It shows that after the log-in the account,

the administrator can view the home page; manage own account, manage product, manage

sales, manage cashiers, manage brand partners, and generate reports.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 32
Figure 16.0 Hierarchical Input Output Process Diagram for the Cashier

Figure 16.0 shows the cashier’s privilege. The cashiers can log-in the accounts, manage

transactions, can add transaction and cancel transaction.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 33
Figure 17.0 Hierarchical Input Output Diagram for Brand Partners

Figure 17.0 shows the Brand Partners privilege. The Brand Partners can log-in the

accounts, manage products and manage sales.

Figure 18.0 Hierarchical Input Output Diagram for System Service

Figure 18.0 shows that the system will generate reports and export monthly sales via email

to the brand partners.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 34
Development Tools

During system development, the proponents used the following hardware and software

applications:

Software

 Microsoft Visual Studio C#.net 2015

To achieve the desired features of what the client asked, the proponents used

this programming language in making the desktop application that is to be

used by the administrator and for the cashier.

 HTML, CSS, JavaScript and PHP

The proponents used the programming languages to have a structure for the

website that is to be used by the brand partners.

 XAMPP

Development tool used by the proponents to test their work locally without

the use of internet.

 Microsoft Word

The proponents used this application for the documentation of the proposed

system.

 GitHub

The proponents used this application to make their task easier since it would

no longer use flash drive.

 SVN (Subversion)

The proponents used this application to maintain current and historical

versions of files such as source code, web pages, and documentation.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 35
 Sublime Text 2

The proponents used this application for web development. HTML, CSS,

JAVASCRIPT and PHP needs text editor where it can perform its coding

functions, thus, the need for Sublime Text 2 in the development of this

system.

 Material Framework

The proponents use this application to design User Interface of the Desktop

Application

Hardware

 Input Devices

o Keyboard

o Mouse

 Output Devices

o Monitor

o Mobile Phones

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 36
Summary

The proponents used diagrams to provide a visual imagery of how the system works. This

chapter made use of these diagrams to help the proponents in achieving the necessary

functions as the actual application is created in a sequential and organized manner possible.

These diagrams became backbone of the developed software and the guide to which the

system is created.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 37
Chapter 4

PERFORMANCE ANALYSIS

Introduction

The proposed system aims to help the users to be more organized and productive. The

proponents determined the different major functions needed by the users and conducted

series of test to make sure that everything is being met.

This chapter shows a series of experiments/test conducted by the proponents during the

development of the proposed system. This further explains the errors of flaws encountered

by the proponents and when they were able to resolve it.

Experimental

In conducting the experiment, the proponents ran each major function and were able to

determine the errors and flaws of the proposed system. This was then properly noted and

was able to find solutions on how to resolve the errors and flaws.

The table below shows the major functions of the system being run and their parameters.

Functions Definition

User privilege after login


(admin/cashier/brand partners)
Login
Limits controls of different users

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 38
Identify whether product was sold or not

Transactions
Real-time calculations

Products Manage Product

Accounts Manage accounts of each users

Reports Daily, monthly, yearly sales report

Table 1.0 Major Functions

Result and Analysis

After the series of tests conducted by the proponents, though errors were encountered, the

proponents were able to have satisfying result.

The table below are the lists of the test conducted by the proponents that shows the steps

taken, and further discussed the expected and actual results.

Desktop Application

Test Name Steps Expected Actual Result Date Date


Result Tested Fixed

Login The user chooses User will be Users can login


if what type of prompted of even incorrect
user he/she then his/her status if password
the user will fill- failed, and Aug-11 Aug-13
out the directed to main
designated fields menu if
according to succeeded

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 39
their username
and password.

Login The user chooses User will be All users logged


if what type of prompted of in were always
user he/she. his/her status if directed to main
After choosing failed, and menu even the
what type, users directed to main credentials are
will fill-out the menu if not valid Aug-12 Aug-15
designated fields succeeded
according to
their username
and password.

Brand Add Brand View all Brand Cannot view Aug-13 Aug-15
Partners Partner account Partners Brand Partners
Account and their Account and Account in table
information Could search
brand partner
according to
admin’s
preferences

Brand Add Brand View all Brand Cannot search Aug-14 Aug-18
Partners Partner account Partners brand partner
Account and their Account and
information Could search
brand partner
according to
admin’s
preferences

Product Add Product View all Not able to Aug-17 Aug-18


Category Category and category retrieve brand
where brand including the partners in
partner’s brand partner combo box from
category belongs where it belongs database

Product Add new View all Not able to Aug-19 Aug-19


product, select products retrieve brand
where brand including which partner in combo
partner and brand partner

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 40
category it and category it box from
belongs. Archive belongs. database
and unarchived
product. Then
view all product
in table.

Product Add new View all Not able to Aug-19 Aug-20


product, select products retrieve category
where brand including which in combo box
partner and brand partner from database
category it and category it
belongs. Archive belongs.
and unarchived
product. Then
view all product
in table.

Product Add new View all Unable of Aug-20 Aug-21


product, select products archiving of
where brand including which product
partner and brand partner
category it and category it
belongs. Archive belongs.
and unarchived
product. Then
view all product
in table.

Product Add new View all Not able to view Aug-22 Aug-23
product, select products all products in
where brand including which table from
partner and brand partner database
category it and category it
belongs. Archive belongs.
and unarchived
product. Then
view all product
in table.

Product Add new View all Unable to search Aug-25 Aug-26


product, select products specific products

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 41
where brand including which in table based on
partner and brand partner admin’s
category it and category it preferences
belongs. Archive belongs.
and unarchived
product. Then
view all product
in table.

Cashier Add cashiers View cashiers Cannot view all Aug-28 Aug-28
Account account and give account and can cashier’s
designated access the account in table
module where designated
cashier only can module
access that
module

Cashier Add cashiers View cashiers Cashier can Aug-30 Aug-31


Account account and give account and can access module
designated access the that only the
module where designated admin can
cashier only can module access
access that
module

Transaction Search product Transaction will Unable to add Sept-1 Sept-1


using the be added product to cart
product code, correctly to its
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 42
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Able to product Sept-2 Sept-2


using the be added into the cart
product code, correctly to its even the
select the designated quantity bought
product in order calculations field is empty
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Unable to void Sept-5 Sept-6


using the be added product from
product code, correctly to its cart
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 43
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Calculations Sept-6 Sept-8


using the be added were inaccurate
product code, correctly to its
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Even void Sept-9 Sept-10


using the be added products from
product code, correctly to its cart is clicked
select the designated the total amount
product in order calculations doesn’t change
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 44
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Purchased even Sept-11 Sept-13


using the be added the tender
product code, correctly to its amount is zero
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Change Value Sept-14 Sept-15


using the be added are inaccurate
product code, correctly to its calculations
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 45
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Could not Sept-19 Sept-20


using the be added Cancel
product code, correctly to its Transaction
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will If Cancel Sept-26 Sept-29


using the be added Transaction is
product code, correctly to its clicked it
select the designated automatically
product in order calculations logout which it
to add to the shouldn’t be
cart, void
product from
cart if the
customer wants

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 46
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Transaction Search product Transaction will Cannot Print Sept-29 Oct-2


using the be added invoice
product code, correctly to its
select the designated
product in order calculations
to add to the
cart, void
product from
cart if the
customer wants
to change the
product, then
cancel
transaction if
customer want to
cancel it and
when it is
finalized then
purchase and
print invoice

Table 2.0 Result and Analysis in Desktop Application

Web Application

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 47
Login The user User will be Users can login
chooses if what prompted of even incorrect
type of user his/her status if password
he/she then the failed, and Sept-28 Sept-28
user will fill-out directed to main
the designated menu if
fields according succeeded
to their
username and
password.

Login The user User will be All users logged


chooses if what prompted of in were always
type of user his/her status if directed to main
he/she. After failed, and menu even the
choosing what directed to main credentials are
type, users will menu if not valid Sept-29 Sept-30
fill-out the succeeded
designated fields
according to
their username
and password.

Brand The admin can Able to view all Unable to View Sept-1 Sept-1
Partners view all brand the brand all brand
Account partners account partner in table partners in table
and search and able to
search

Brand The admin can Able to view all Unable to search Sept-6 Sept-8
Partners view all brand the brand brand partners in
Account partners account partner in table table
and search and able to
search

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 48
Product View all Able to view all Unable to view Sept-1 Sept-2
products damage products and all products in
or not in table search table
and search

Product View all Able to view all Unable to search Sept-2 Sept-11
products damage products and specific
or not in table search products in table
and search

Product View all Able to view all Unable to view Sept-3 Sept-7
products damage products and all damage
or not in table search products
and search

Sales View all sales Able to view all Unable to view Sept-7 Sept-12
and sales of each sales and sales all sales
brand partners of each brand
and generate partners and
sales could generate
sales

Sales View all sales Able to view all Unable to view Sept-9 Sept-14
and sales of each sales and sales sales of each
brand partners of each brand brand partner
and generate partners and
sales could generate
sales

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 49
Sales View all sales Able to view all Unable to Sept-13 Sept-17
and sales of each sales and sales generate sales of
brand partners of each brand all sales
and generate partners and
sales could generate
sales

Sales View all sales Able to view all Brand partners Sept-14 Sept-20
and sales of each sales and sales cannot generate
brand partners of each brand their own sales
and generate partners and
sales could generate
sales

Data All sales and Viewing of Bar graph Sept-10 Sept-15


Visualization sales of each sales through cannot display
Brand Partner bar graphs in the system
will view
through bar
graphs

Data All sales and Viewing of Unable to view Sept-10 Sept-24


Visualization sales of each sales through daily sales
Brand Partner bar graphs through bar
will view graphs
through bar
graphs

Data All sales and Viewing of Unable to view Sept-10 Sept-25


Visualization sales of each sales through monthly sales
Brand Partner bar graphs through bar
will view graphs
through bar
graphs

Table 3.0 Result and Analysis in Web Application

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 50
Summary

The tests and experimentations done were valuable for the realization of the proposed

system. The activity helped the proponents measure the system’s milestones and determine

the defects enhancements and the overlooked functions that need to be worked on. Trials

and errors contributed a lot for its improvement and functionality. These and more made

the system essential and its benefits are complimentary.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 51
Chapter 5

CONCLUSION

We are now in the age of fast-pace processing information and it plays a major part in our

life whether it may be in business or in entertainment. Technology is now everywhere, and

we must adapt to the changes of our environment. The proponent used the opportunity to

make use of technology, although there are a lot of existing technology-based applications

that provide information, inventing the proposed system would never be pointless. The

proposed system is equipped with features designed to soothe the needs of our client

business, both the owner and the brand partners. Sales Monitoring for Posh and Fab

Concept Store with Online Viewing was created to help the needs in providing the

company’s services. For the time being, the proponents suggest having an advance

computerized Sales Monitoring for Posh and Fab Concept Store with Online Viewing

would support the day-to-day transactions in such a way that it would minimize the effort

and time in processing those bunches of records of sales. This developed system will

enhance not only the daily transactions, the system will contribute for the betterment of the

working process in the company.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 52
BIBLIOGRAPHY

Scrum Methodology Retrieved from:

https://resources.collab.net/agile-101/what-is-scrum

Business Success Center 2013 Hierarchy of Needs Retrieved from:

http://ownersview.com/business-owners-hierarchy-of-needs/

ACADEMIA Sales and Inventory System Retrieved from:

http://www.academia.edu/16863814/Sales_and_Inventory_Systemc

Edward Elgar Publishing, The Theory of Innovation Retrieved from:

https://www.e-elgar.com/shop/eep/preview/book/isbn/9781781008898/

SLIDE TEAM, Kirti Saini- Learn the Process of Scrum Retrieved from:

https://www.slideteam.net/blog/powerpoint-tutorial-20-simple-steps-to-create-the-scrum-
process-template-the-perfect-scrum-ppt/

How to - Side Navigation Retrieved From:

https://www.w3schools.com/howto/howto_js_sidenav.asp

How to – Search Menu Retrieved From:

https://www.w3schools.com/howto/howto_js_search_menu.asp

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 53
How to – Search Bar Retrieved From:

https://www.w3schools.com/howto/howto_css_searchbar.asp

W3School, JavaScript Functions Retrieved From:

https://www.w3schools.com/js/js_functions.asp

W3School, JavaScript Date Output Retrieved From:

https://www.w3schools.com/js/js_dates.asp

W3School, Bootstrap Tables Retrieved From:

https://www.w3schools.com/bootstrap/bootstrap_tables.asp

SimplyPsychology, Saul Mcleod (2008) Retrieved From:

https://www.simplypsychology.org/forgetting.html

E.Corregidor, V. Dosdos, A. Manipes, J.Samson, “Skin911 Facial and Slimming Centre


Operations Management System” (2015)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 54
ACKNOWLEDGEMENTS

The proponents’ proposed project would never have been completed if not for the help and
support of multiple individuals. They would like to thank the assistance of the following:

• To their Thesis Coordinator, Mrs. Catherine P. Odiong, their ever-supportive Thesis


Coordinator, for believing and keep pushing them that they can really make it;

• The proponents also extend their warmest gratitude to their thesis adviser, Mr. Romar
John Patindol, who shared with them everything that he knows and for his patience
during the times that they commit mistakes;

• To their parents and guardians, for the constant prayers and never-failing support;

• To their friends and inspirations, for always there for them to inspire and to make them
strong;

• To the Naldoza, Salva, Cahimat, Mojado and Patindol Family, for welcoming them in
their home in their countless overnight encounters as they work their projects;

• Most of all, to God, for His unconditional love and blessings He is showering upon the
proponents every single day. The proponents thank Him for making this thesis project
a success; for the provision and wisdom He has given them, for giving the proponents’
enough strength to perform each task assigned to them.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 55
APPENDICES

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 56
APPENDIX A. GANTT CHART

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 57
Gantt Chart

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 58
APPENDIX B. AGREEMENT

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 59
LETTER OF AGREEMENT

STI COLLEGE CEBU, a corporation duly organized and existing pursuant to the laws of

the Republic of the Philippines with address and location at #40 Salinas Drive Lahug Cebu

City represented herein by Engr. April Rose Gomez, in her capacity as Dean of College of

Computer Studies, herein after referred to as “STI COLLEGE CEBU”

-and-

POSH AND FAB CONCEPT STORE is an establishment of different online sellers located

at #40 Salinas Drive Lahug Cebu City.

The IT Project Proposed System (Sales Monitoring System for Posh and Fab Concept Store

with Online Viewing)

This Agreement Letter as all about the understanding between the parties with respect to

the following matters:

1. The Posh and Fab Concept Store (System’s Client) asked the proponents to make

a Sales Monitoring System for Posh and Fab with Online Viewing.

2. The Posh and Fab Concept Store (System’s Client) will provide company’s

information that proponents need for the system that are going to build every time

proponents ask for it.

3. Proponents will promise not to reveal their company’s information to the public.

4. If the proponents already complied all the requirements which need by Posh and

Fab Concept Store, proponents don’t have an obligation about the proposed System

anymore.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 60
Posh and Fab Concept Store asked the proponents to make Sales Monitoring System for

Posh and Fab Concept Store with Online Viewing with the following requirements based

on the previous manual transaction process:

The following statements listed below signifies the understanding and agreements of both

parties, and the system can only be updated within next version upgrades.

 As of cashier and brand partner’s accounts is provided by the system

administrator only.

 A default username and password are given to the system administrator.

 As of the system, can automatically send email sales port notification

every month.

 As of the system, can automatically add cashier transaction logs.

Desktop Application

For the administrator

 View Logs for the cashier transaction.

 Item Form

o Displays data in a table form of all products.

o Has an access role of adding a product, updating a product, and

archiving a product.

o Can add a product category

o Has an access role of branding a product during adding.

 Product Information Form

o Shows product’s information

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 61
o Search specific product

 Cashier Accounts Form

o The admin has an access role of viewing the cashier’s information at the

cashier’s profile form.

o A table of data is provided showing all cashiers’ account.

o The admin can add cashier accounts, update a cashier account

information and, archive cashier account.

 Cashier’s Profile Form

o Shows personal information of a cashier

 Brand Partners’ Accounts Form

o The admin has an access role of viewing the brand partner’s information

at the brand partners’ form.

o A table of data is provided showing all brand partners’ accounts.

o The admin can add a brand partner account, edit a brand partner account

at the profile form, and archive or unarchive brand partner account.

 Brand Partner’s Profile Form

o Shows personal information of a brand partner.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 62
For the Cashier

 Transaction Form

o The cashier has an access role of making transactions.

o Generate sales invoice every after successful transaction.

o Search by product code in adding transaction.

o Change Password.

o Send damaged product to admin for approval.

Website

For the administrator

 View all brand partners account


 View all cashiers account
 Send email reports every month through CRON
 Search specific product
 Search specific user either cashier or brand partners
 View all sales by daily, or base on user’s date preferences
 View all damaged return products

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 63
For the Brand Partners

 View brand partner’s own sales

o Generate sales by daily or base on brand partner’s date preferences.

o View sales records through graphs.

 View brand partners profile info

 Brand Partners Profile Form

o Update Profile Info

Limitations

The proposed system is only made to cater the information provided in the scope

for the convenience of Posh and Fab Concept Store. However, there are areas that

will not be covered by the proposed system to evade unnecessary problems when

the system is deployed.

 Purchases are only available through walk-in.

 Payments only accepts cash.

 The system could not generate official receipt.

 The system requires internet connection to be accessible. No internet access

means the system cannot be functional.

 The system does not have Secure Sockets Layer (SSL) Certificate that

standardized security technology for establishing an encrypted link between

a web server and a browser.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 64
 Will not accommodate inventory stocks control which involves tracking the

stock level at all times, identify the remaining products, stock in and stock

out.

 Website can’t be accessible in mobile.

Figure 19.0 Signature of Proponents, Coordinator, Adviser, Dean and Client

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 65
APPENDIX C. SURVEY FORM

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 66
Excerpts of the Interview Transcripts

Below are excerpts of the interview conducted by the proponents with the owner of Posh
and Fab Concept Store, Ms. Tricia Javier last June 30, 2018 at around 2:00PM (Note that
the conversation was translated to English)

Proponents: Good Afternoon Ms, we are from STI College Cebu, BSIT students we would
like to conduct an interview regarding in your business.

Client: Okay, what’s the purpose why you are conducting on interview?

Proponents: We are here looking for a client wherein we could create a system for the
business and apply and put into practice what we have learned in the past years.

Client: Okay I do have problems regarding on my sales.

Proponents: Okay miss but first can we ask your business background?

Client: Okay sure

Proponents: When did your business started?

Client: It started last year July 28, 2017.

Proponents: Can you tell us more about your business?

Client: So before, I was an online seller, I decided to make a physical store where in I will
be the one to sell brand partners’ products.

Proponents: Okay, so can you tell us the process if there are new? Arrival products?

Client: I’ll be giving them an ingress form which serves to correct a product that would be
placed in the store.

Proponents: What common problems, do you encounter on your business?

Client: We are using an excel , where we store all data regarding in the sales of every
transaction in every brand partner, and then I’ll send it to the brand partners, email, so it
would take time for me to send sales report every month to every brand partner, aside from
that due to incorrect data entry it would lead me to sales redundancy and sales discrepancy
and it would be my loss the reimburse money from that mistake.

Proponents: What would you do if you have any returns products from customer?

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 67
Client: First, we would ask for receipt and return locate the transaction in Microsoft Excel
documents, if their customer wants to change item, we are only going to exchange by the
same product if the product is damage. If there are any refund, we are going to deduct that
to the sales.

Proponent: Okay, can you tell us the process in making sales?

Client: First, when a customer gets into the counter, we are going to make two (2) receipts
containing all items and its total, one for the customer and one for me as a copy. Next, I
would let the cashier place the one (1) receipt at the hook on the table. Lastly, the cashier
would ask for payments and change if there is.

Proponent: So, the basis of your sales is the receipt that is being placed on the hook?
Would you know if there are any unrecorded purchases?

Client: Unfortunately, no, I only rely on the receipts. It would be a hard time for me to
encode all sales on Microsoft Excel, since it would take time for me to search receipts.
Aside from that I could get mistakes in encoding my sales in Excel, that would be sent in
every brand partner.

Proponent: Okay miss, we would just inform you on our updates.

Client: Okay, looking for your next visit.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 68
APPENDIX D. USER’S MANUAL

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 69
User’s Manual for Admin on Desktop

Login Account

1
2

5 6

1. This radiobutton allows you to login as an administrator

2. This radiobutton allows you to login as a cashier

3. This textbox allows you to enter your username

4. This textbox allows you to enter your password

5. This button allows you to login only if it’s provided with valid username and

password.

6. This button allows you to close the login form.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 70
Products Unarchived

1 2 3
4

5 6

1. This button allows you to add new product


Add New Product
2. This button allows you to update product

3. This button allows you to archive product if there’s a selected item in

table

4. This button allows you to manage category

5. This combo box allows you to select the item you want to search by

6. This textbox allows you to search product from table

7. It shows all the product

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 71
Add New Product

1
2
3
4

6 7

1. This textbox must be filled with correct Product Code

2. This textbox must be filled with correct Product Name

3. This combo box must be filled with correct Product Brand Partner

4. This combo box must be filled with correct Product Category

5. This textbox must be filled with exact Price of the product

6. This button allows you to submit or save the product only if all the fields of the

form are filled

7. This button allows you to back to the Product Page

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 72
Update Product

1
2

3
4
5

6 7

1. This textbox must be filled with correct Product Code

2. This textbox must be filled with correct Product Name

3. This combo box must be filled with correct Product Brand

Partner

4. This combo box must be filled with correct Product Category

5. This textbox must be filled with exact Price of the product

6. This button allows you to update or save the changes of the

product only if all the fields of the form are filled

7. This button allows you to back to the Product Page

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 73
Products Archived

1
2

3 4

1. This button allows you to unarchive product if there is selected

item in table

2. This button allows you to manage category

3. This combo box allows you to select the type of text you want to

Returned Damage Product


search by

4. This textbox allows you to search product from the table

5. This table view list of all the archive product

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 74
Return Item Damage

2 3

1. This table shows list of all Product that is return from customers

2. This button allows you to confirm the product return request from cashier

3. This button allows you to cancel the request of the cashier

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 75
Finish Returned Item Transactions

1. This table shows all Return item from customers it’s either refunded or
change

Brand Partner Accounts Table

1 2 3

4 5

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 76
1. This button allows you to add new brand partner account
2. This button allows you to update the selected brand partner account
3. This button allows you to archive the selected brand partner account
4. This combo box allows you to select the search by product
5. This text allows you to search brand partner accounts from table
6. This table shows list of all brand partner

Add New Brand Partner Account

1 7
2 8
3 9

4
10
5
11
6
12
13 14

1. This textbox allows you to enter your firstname


2. This textbox allows you to enter your middlename
3. This textbox allows you to enter your lastname
4. This combo box allows you to select your gender
5. This textbox allows you to enter your address
6. This textbox allows you to enter your contact number
7. This textbox allows you to enter your brand name
8. This textbox allows you to enter your brand address
9. This textbox allows you to enter your brand contact number
10. This textbox allows you to enter your username
11. This textbox allows you to enter your password

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 77
12. This textbox allows you to re-enter your password
13. This button allows you to add or save the new brand partner acc only if all
fields are filled
14. This button allows you to go back to the brand partners account table

Update Brand Partner Account

1 7
2 8
3 9
4 10
5 11
6 12

13 14

1. This textbox allows you to enter your firstname


2. This textbox allows you to enter your middlename
3. This textbox allows you to enter your lastname
4. This combo box allows you to select your gender
5. This textbox allows you to enter your address
6. This textbox allows you to enter your contact number
7. This textbox allows you to enter your brand name
8. This textbox allows you to enter your brand address
9. This textbox allows you to enter your brand contact number
10. This textbox allows you to enter your username
11. This textbox allows you to enter your password
12. This textbox allows you to re-enter your password
13. This button allows you to update the new brand partner acc only if all fields
are filled
14. This button allows you to go back to the brand partners account table

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 78
Cashier Accounts Table

1 2 3

4 5

1. This button allows you to add new cashier account


2. This button allows you to update cashier account selected from table
3. This button allows you to archive cashier account selected from table
4. This combo box allows you to select search by account
5. This textbox allows you to search cashier account from table
6. This table shows list of all cashier accounts

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 79
Add New Cashier Account

1 7

2 8

3 9

4
5
6

10 11

1. This textbox allows you to enter your firstname


2. This textbox allows you to enter your middlename
3. This textbox allows you to enter your lastname
4. This combo box allows you to select your gender
5. This textbox allows you to enter your address
6. This textbox allows you to enter your contact number
7. This textbox allows you to enter your username
8. This textbox allows you to enter your password
9. This textbox allows you to re-enter your password
10. This button allows you to enter the new cashier acc only if all fields are
filled
11. This button allows you to go back to the cashiers account table

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 80
Update Cashier Account

1 7
2
3 8
4 9
5 10
6

11 12

1. This textbox allows you to enter your firstname


2. This textbox allows you to enter your middlename
3. This textbox allows you to enter your lastname
4. This combo box allows you to select your gender
5. This textbox allows you to enter your address
6. This textbox allows you to enter your contact number
7. This textbox allows you to enter your username
8. This textbox allows you to enter your password
9. This textbox allows you to re-enter your password
10. This checkbox allows you to check if you want to update your password
and username
11. This button allows you update or save the change you made
12. This button allows you to go back to the cashier accounts table

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 81
Activity Logs

1. This form shows all activities that are being done by the cashier user.

Setting

1
2

1. This button allows you to view admin account


2. This button allows you to logout your account

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 82
Admin Account

1 7
2
3 8

4 9
5 10
6

11 12

1. This textbox allows you to enter your firstname


2. This textbox allows you to enter your middlename
3. This textbox allows you to enter your lastname
4. This combo box allows you to select your gender
5. This textbox allows you to enter your address
6. This textbox allows you to enter your contact number
7. This textbox allows you to enter your username
8. This textbox allows you to enter your password
9. This textbox allows you to re-enter your password
10. This checkbox allows you to check if you want to update your
password and username
11. This button allows you update or save the change you made
12. This button allows you to go back to the admin accounts

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 83
User’s Manual for Cashier on Desktop

Login Form

5 6

1. This radiobutton allows you to login as an administrator

2. This radiobutton allows you to login as a cashier

3. This textbox allows you to enter your username

4. This textbox allows you to enter your password


Transaction Form
5. This button allows you to login only if it’s provided with

valid username and password.

6. This button allows you to close the login form.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 84
Transaction Module

1
7
8
9
2 6
10

3
11 12
4
13 14
5

1. This textbox allows you to search a product code that you want to purchase

2. This table allows you to select an item after searching

3. This textbox allows you to enter quantity of product you want to purchase

4. This button allows you to add cart the selected product

5. This button allows you to void product you selected

6. This table shows list of all product you want to purchase

7. This label shows the transaction code

8. This label shows the total amount you will be purchase

9. This textbox allows you to enter the money received from the purchaser

10. This label shows the change of the money given by the purchaser

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 85
11. This button allows you to purchase

12. This button allows you to cancel transaction

13. This label shows the total number of today’s sale

14. This label shows the total number of products sold today

Returned Damage Product

1
4
5
6
7
8
2 3 9
10

11
12
13

1. This textbox allows you to search the transaction code of the sales invoice

2. This table shows list of all transaction code

3. This table shows all product being purchased base from the transaction code

4. This textbox shows the orderId being selected

5. This textbox shows the Product Name being selected

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 86
6. This textbox shows the product code being selected

7. This textbox shows the Product bought being selected

8. This textbox shows the product price being selected

9. This combo box allows you to select if you want to refund or change

the returned item

10. This textbox allows you to enter the number of products to be returned

11. This textbox allows you to enter the reasons why you return the

products

12. This button allows you to send a request from admin if he/she will

agree that the product is damaged

13. This button allows you to cancel the returned damage product

Change Password

1
2

3
4
5

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 87
1. This textbox shows the user account id you selected

2. This textbox shows the username of the user

3. This textbox allows you to enter your old password

4. This textbox allows you to enter your new password

5. This textbox allows you to re-enter your new password

6. This button allows you to update and save your new password

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 88
User’s Manual in Website

Login Account

1. This textbox allows you to enter your username

2. This textbox allows you to enter your password

3. This button allows you to login only if the username and password you

entered are valid

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 89
Dashboard

1
2 5
3
4 6

1. This button shows the all sales through bar graph

2. This button will show the sales through table

3. This button will show all user accounts registered the system

4. This button will show all damage products

5. This button shows all the sales base on the date range of user

preferences

6. This graph shows the all sales

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 90
Sales Table

1 2 3 4

1. This shows the total number of Transactions made

2. This shows the total of sales

3. This shows the total number of sales

4. This shows the total number of void items

5. This button will show if you search the transaction code

6. This table shows the overall sales

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 91
Cashier Table

1. This page shows list of all cashiers.


2. The admin can search by Username.

Brand Partner Table

1. This page shows list of all the brand partners.


2. The admin can search by username.

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 92
Change Password

3 4

1. This textbox allows you to enter your new password


2. The textbox allows you to re-enter your new password
3. This button allows you to cancel upon changing your password
4. This button allows you to save your new password

Update Profile

7 8

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 93
1. This textbox allows you to enter your first name
2. This textbox allows you to enter your last name
3. This textbox allows you to enter your middle name
4. This textbox allows you to enter your address
5. This textbox allows you to enter your contact number
6. This combo box allows you select gender
7. This button allows you to cancel
8. This button allows you to save the change you made

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 94
APPENDIX E. SOURCE CODE

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 95
Change Password Module
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace LoginModule.cs
{
public partial class ChangePassword : MaterialSkin.Controls.MaterialForm
{
public ChangePassword(string cashier)
{
InitializeComponent();
tbuseraccountid.Text = cashier;
viewUsername();
}
public void viewUsername()
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select col_user from tbl_useraccounts where col_useraccountsid = '" +
tbuseraccountid.Text + "'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
while (read.Read())
{
tbusername.Text = read["col_user"].ToString();
}
conn.Close();
}
public void Update()
{
try
{
MySqlConnection conn2 = new MySqlConnection(ConnectionString.myConnection);
MySqlCommand command2 = conn2.CreateCommand();
conn2.Open();
string query = "UPDATE tbl_useraccounts SET " +
"col_password= '" + tbconfirmnewpass.Text + "'" +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 96
"WHERE col_useraccountsid='" + tbuseraccountid.Text + "'";
command2.CommandText = query;
command2.ExecuteScalar();
MessageBox.Show("Password updated successfully. ");
conn2.Close();
this.Hide();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void checkPassword()
{
try
{
if (tbnewpass.Text == "" || tbconfirmnewpass.Text == "")
{
MessageBox.Show("Password entered ");
}
else if (tbnewpass.Text != "" || tbconfirmnewpass.Text == "")
{
if (tbnewpass.Text == tbconfirmnewpass.Text)
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
MySqlCommand Command2 = conn.CreateCommand();
Command2.Connection = conn;
conn.Open();
Command2.CommandText = "select * from tbl_useraccounts where col_user = '" +
tbusername.Text + "' and col_password= '" + tboldpass.Text + "' and col_status='unarchived'";
MySqlDataReader read2 = Command2.ExecuteReader();
int count2 = 0;
while (read2.Read())
{
count2++;
}
conn.Close();
if (count2 >= 1)
{
MySqlCommand copro5 = new MySqlCommand();
conn.Open();
copro5.Connection = conn;
copro5.CommandText = "select * from tbl_useraccounts where col_user = '" +
tbusername.Text + "' and col_password= '" + tboldpass.Text + "' and
col_useraccountsid= '" +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 97
tbuseraccountid.Text + "' and col_usertypeid='2'";
MySqlDataReader copro2 = copro5.ExecuteReader();
while (copro2.Read())
{
string userid = (copro2["col_useraccountsid"].ToString());
string user = (copro2["col_user"].ToString());
string pass = (copro2["col_password"].ToString());
if (userid == tbuseraccountid.Text && user == tbusername.Text && pass
==tboldpass.Text)
{
Update();
}
}
conn.Close();
}
else
{
MessageBox.Show("Wrong Password");
}
}
else
{
MessageBox.Show("Password does not match");
}
}
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
private void materialFlatButton4_Click(object sender, EventArgs e)
{
if(string.IsNullOrWhiteSpace(tboldpass.Text)||
string.IsNullOrWhiteSpace(tbnewpass.Text)||
string.IsNullOrWhiteSpace(tbconfirmnewpass.Text))
{
MessageBox.Show("Dont leave blank fields");
}
else
{
checkPassword();
}}
private void tboldpass_TextChanged(object sender, EventArgs e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 98
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}
private void tbnewpass_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}
private void tbconfirmnewpass_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}
}
}
Login Form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using MySql.Data.MySqlClient;

namespace LoginModule.cs
{
public partial class Login : MaterialSkin.Controls.MaterialForm
{

public Login()
{
InitializeComponent();

materialRadioButton1.Checked = true;
}

public void log()


{
try {
MySqlConnection connection = new
MySqlConnection(ConnectionString.myConnection);
connection.Open();
if (textBox1.Text == "" || textBox2.Text == "")
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 99
MessageBox.Show("You need to login your credentials.");
}
else if (materialRadioButton1.Checked == true)
{
MySqlCommand Command = connection.CreateCommand();
Command.Connection = connection;
Command.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox1.Text + "' and col_password= '" + textBox2.Text + "' and col_usertypeid =
1 ";
MySqlDataReader read = Command.ExecuteReader();
int count1 = 0;
while (read.Read())
{
count1++;
}
connection.Close();
if (count1 == 1)
{
MySqlCommand copro3 = new MySqlCommand();
connection.Open();
copro3.Connection = connection;
copro3.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox1.Text + "' and col_password= '" + textBox2.Text + "' and col_usertypeid
= 1 ";
MySqlDataReader copro = copro3.ExecuteReader();
while (copro.Read())
{
string user = (copro["col_user"].ToString());
string pass = (copro["col_password"].ToString());
if (user == textBox1.Text && pass == textBox2.Text)
{
Mainframe a = new Mainframe();
a.Show();
this.Hide();
}
else
{
MessageBox.Show("Invalid username & password. ");
textBox1.Clear();
textBox2.Clear();
}
}
}
else
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 100
MessageBox.Show("Invalid username & password. ");

}}
else if (materialRadioButton2.Checked == true && materialRadioButton1.Checked == false)
{
MySqlCommand Command2 = connection.CreateCommand();
Command2.Connection = connection;
Command2.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox1.Text + "' and col_password= '" + textBox2.Text + "' and col_status='unarchived' and
col_usertypeid = 2";
MySqlDataReader read2 = Command2.ExecuteReader();
int count2 = 0;
while (read2.Read())
{
count2++;

}
connection.Close();
if (count2 >= 1)
{
MySqlCommand copro5 = new MySqlCommand();
connection.Open();
copro5.Connection = connection;
copro5.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox1.Text + "' and col_password= '" + textBox2.Text + "' and
col_status='unarchived' and col_usertypeid = 2 ";
MySqlDataReader copro2 = copro5.ExecuteReader();
while (copro2.Read())
{
string userid = (copro2["col_useraccountsid"].ToString());
string user = (copro2["col_user"].ToString());
string pass = (copro2["col_password"].ToString());
if (user == textBox1.Text && pass == textBox2.Text)
{
TransactionModule a = new TransactionModule(userid);
a.Show();
this.Hide();
break;
}
else
{
MessageBox.Show("Invalid username & password. ");
textBox1.Clear();
textBox2.Clear();
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 101
}
}
else
{
MessageBox.Show("Invalid username & password. ");
}
}
}catch(Exception e)
{
MessageBox.Show("No connection to the host");
}
}
private void materialFlatButton1_Click(object sender, EventArgs e)
{
this.Close();
}
private void materialRaisedButton1_Click(object sender, EventArgs e)
{

log();
}
private void materialFlatButton2_Click(object sender, EventArgs e)
{
log();
}
private void textBox2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
try
{
log();
}
catch (Exception elog)
{
MessageBox.Show(elog.ToString());
}
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox2_TextChanged(object sender, EventArgs e)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 102
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}
}
}
Mainframe
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using MySql.Data.MySqlClient;

namespace LoginModule.cs
{
public partial class Mainframe : MaterialSkin.Controls.MaterialForm
{

public Mainframe()
{
InitializeComponent();
launch();
}

public void initializeListviewHeaderStyle()


{
materialListView1.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView10.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView11.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView13.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView2.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView3.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView4.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView5.HeaderStyle = ColumnHeaderStyle.Clickable;
materialListView6.HeaderStyle = ColumnHeaderStyle.Clickable;
}

public void launch()


{
initializeListviewHeaderStyle();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 103
viewdamageid();
viewfinishdamage();
dataproductunarchived();
dataproductarchived();
databrandpartneraccountunarchived();
databrandpartneraccountarchived();
dataCashierAccountUnarchived();
dataCashierAccountArchived();
viewlogs();
countunarchiveditems();
countarchiveditems();
countunarchivedcash();
countarchivedcash();
countunarchivedbp();
countarchivedbp();
}
public void countunarchivedbp()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_useraccountsid) AS '" + "countubp" + "'
from tbl_useraccounts where col_usertypeid='3' AND col_status='unarchived'";

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
label19.Text = read["countubp"].ToString();
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("Lost connection to the host");
}
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 104
public void countarchivedbp()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_useraccountsid) AS '" + "countabp" + "'
from tbl_useraccounts where col_usertypeid='3' AND col_status='archived'";

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
label25.Text = read["countabp"].ToString();
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void countunarchivedcash()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_useraccountsid) AS '" + "countuc" + "'
from tbl_useraccounts where col_usertypeid='2' AND col_status='unarchived'";

MySqlDataReader read = command.ExecuteReader();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 105
while (read.Read())
{
label44.Text = read["countuc"].ToString();
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void countarchivedcash()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_useraccountsid) AS '" + "count" + "' from
tbl_useraccounts where col_usertypeid='2' AND col_status='archived'";

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
label37.Text = read["count"].ToString();
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void viewlogs()
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 106
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView10.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
string query = "Select * from tbl_logs";
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_logid"].ToString());
items.SubItems.Add(read["col_activity"].ToString());
items.SubItems.Add(read["col_dateofactivity"].ToString());
materialListView10.Items.Add(items);
materialListView10.FullRowSelect = true;
}
conn.Close();

}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void recountbp()
{
countunarchivedbp();
countarchivedbp();
}
public void recountcash()
{
countarchivedcash();
countunarchivedcash();
}
public void databrandpartneraccountarchived()
{
try
{
materialListView6.Items.Clear();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 107
string query = "select * from tbl_brandpartner b " +
"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where u.col_status='archived' and t.col_usertypeid=3";
command.CommandText = query;

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView6.Items.Add(items);
materialListView6.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}

public void printunarchivedproduct()


{
try

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 108
{
if (materialListView1.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView1.SelectedItems[data];
String id = list.SubItems[0].Text;
label6.Text = id.ToString();
//materialListView1.Columns[0].Width = 0;
}
else
{
defaultFaultSelectID();
}

}
catch (Exception e)
{
MessageBox.Show("Select only one record below");
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_product p " +
"inner join tbl_brandpartner b " +
"on p.col_useraccountsid = b.col_useraccountsid " +
"inner join tbl_category c " +
"on c.col_categoryid = p.col_categoryid " +
"where p.col_productid = '" + label6.Text + "'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}

}
public void printarchivedproduct()
{
try

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 109
{
if (materialListView2.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView2.SelectedItems[data];
String id = list.SubItems[0].Text;
label9.Text = id.ToString();
}
else
{
defaultFaultSelectID();
}

}
catch (Exception e)
{
//MessageBox.Show("Select only one record below");
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_product p " +
"inner join tbl_brandpartner b " +
"on p.col_useraccountsid = b.col_useraccountsid " +
"inner join tbl_category c " +
"on c.col_categoryid = p.col_categoryid " +
"where p.col_productid = '" + label9.Text + "'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void unarchiveproduct()
{

}
public void countunarchiveditems()

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 110
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_productid) AS '" + "items" + "' from
tbl_product where col_status='unarchived'";

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
label1.Text = read["items"].ToString();
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
public void countarchiveditems()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

MySqlCommand command2 = conn.CreateCommand();


command.Connection = conn;
command.CommandText = "select COUNT(col_productid) AS '" + "items" + "' from
tbl_product where col_status='archived'";

MySqlDataReader read = command.ExecuteReader();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 111
while (read.Read())
{
label13.Text = read["items"].ToString();
}
conn.Close();
}
catch (Exception)
{

MessageBox.Show("No connection to the host");

}
}

public void databrandpartneraccountunarchived()


{
try
{
materialListView3.Items.Clear();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();

string query = "select * from tbl_brandpartner b " +


"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where u.col_status='unarchived' and t.col_usertypeid=3";
command.CommandText = query;

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString());;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 112
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView3.Items.Add(items);
materialListView3.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}

}
public void dataCashierAccountUnarchived()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_useraccounts u " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where u.col_status='unarchived' and t.col_usertypeid=2";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 113
materialListView5.Items.Add(items);
materialListView5.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}

public void dataCashierAccountArchived()


{
materialListView4.Items.Clear();
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_useraccounts u " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where u.col_status='archived' and t.col_usertypeid=2";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView4.Items.Add(items);
materialListView4.FullRowSelect = true;
}
conn.Close();
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 114
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}

public void dataproductunarchived()


{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_product P " +
"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid "
+
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where P.col_status='unarchived'";

command.CommandText = query;

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{

ListViewItem items = new ListViewItem(read["col_productid"].ToString());


items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_productprice"].ToString());

materialListView1.Items.Add(items);
materialListView1.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 115
}
public void dataproductarchived()
{
try
{
materialListView2.Items.Clear();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_product P " +
"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid "
+
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where P.col_status='archived'";
//string query = "select * from tbl_product where col_status='archived'";
command.CommandText = query;

MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_productid"].ToString());

items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_productprice"].ToString());

materialListView2.Items.Add(items);
materialListView2.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}

}
public void searchunarchived()
{
string search = "col_productcode";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 116
string searchby = null;
try {
searchby = comboBox1.SelectedItem.ToString();
}
catch (Exception e) { //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Product Code")
{
search = "col_productcode";
}
else if (searchby == "Product Brand")
{
search = "col_brandname";
}
else if (searchby == "Product Name")
{
search = "col_productname";
}
else if (searchby == "Category")
{
search = "col_categoryname";
}
}

string query = "select * from tbl_product P " +


"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid " +
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where P.col_productcode like '" + textBox1.Text + "%' and P.col_status='unarchived'";

if (searchby != null)
{
query = "select * from tbl_product P " +
"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid " +
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where " + search + " like '" + textBox1.Text + "%' and P.col_status='unarchived'";
}

try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView1.Items.Clear();
conn.Open();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 117
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_productid"].ToString());
items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_productprice"].ToString());
materialListView1.Items.Add(items);
materialListView1.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}

public void searcharchived()


{
string search = "col_productcode";
string searchby = null;
try
{
searchby = comboBox3.SelectedItem.ToString();
}
catch (Exception e)
{ //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Product Code")
{
search = "col_productcode";
}
else if (searchby == "Product Brand")
{
search = "col_brandname";
}
else if (searchby == "Product Name")

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 118
{
search = "col_productname";
}
else if (searchby == "Category")
{
search = "col_categoryname";
}
}

string query = "select * from tbl_product P " +


"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid " +
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where P.col_productcode like '" + textBox2.Text + "%' and P.col_status='archived'";

if (searchby != null)
{
query = "select * from tbl_product P " +
"INNER JOIN tbl_brandpartner B ON P.col_useraccountsid = B.col_useraccountsid " +
"INNER JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where " + search + " like '" + textBox2.Text + "%' and P.col_status='archived'";
}

try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView2.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_productid"].ToString());
items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_productprice"].ToString());
materialListView2.Items.Add(items);
materialListView2.FullRowSelect = true;
}
conn.Close();
}
catch (Exception)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 119
MessageBox.Show("No connection to the host");

}
}
public void searchunarchivedbp()
{
string search = "b.col_brandname";
string searchby = null;
try
{
searchby = comboBox5.SelectedItem.ToString();
}
catch (Exception e)
{ //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Brandname")
{
search = "b.col_brandname";
}
else if (searchby == "Lastname")
{
search = "u.col_lastname";
}
else if (searchby == "Firstname")
{
search = "u.col_firstname";
}
else if (searchby == "Username")
{
search = "u.col_user";
}

string query = "select * from tbl_brandpartner b " +


"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where b.col_brandname like '" + textBox3.Text + "%' and u.col_status='unarchived'
and t.col_usertypeid=3";

if (searchby != null)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 120
{
query = "select * from tbl_brandpartner b " +
"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where " + search + " like '" + textBox3.Text + "%'and u.col_status='unarchived' and
t.col_usertypeid=3";
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView3.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView3.Items.Add(items);
materialListView3.FullRowSelect = true;
}
conn.Close();
}
catch
{
MessageBox.Show("No connection to the host");
}
}
}

public void searcharchivedbp()

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 121
{
string search = "b.col_brandname";
string searchby = null;
try
{
searchby = comboBox6.SelectedItem.ToString();
}
catch (Exception e)
{ //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Brandname")
{
search = "b.col_brandname";
}
else if (searchby == "Lastname")
{
search = "u.col_lastname";
}
else if (searchby == "Firstname")
{
search = "u.col_firstname";
}
else if (searchby == "Username")
{
search = "u.col_user";
}

string query = "select * from tbl_brandpartner b " +


"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +
"on t.col_usertypeid = u.col_usertypeid " +
"where b.col_brandname like '" + textBox4.Text + "%' and col_status='archived' and
u.col_usertypeid=3";

if (searchby != null)
{
query = "select * from tbl_brandpartner b " +
"inner join tbl_useraccounts u " +
"on b.col_useraccountsid = u.col_useraccountsid " +
"inner join tbl_usertype t " +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 122
"on t.col_usertypeid = u.col_usertypeid " +
"where " + search + " like '" + textBox4.Text + "%'and col_status='archived' and
u.col_usertypeid=3";
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView6.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView6.Items.Add(items);
materialListView6.FullRowSelect = true;
}
conn.Close();

}
catch (Exception)
{
MessageBox.Show("No connection to the host");

} }
}
public void searchunarchivedcashier()
{
string search = "u.col_lastname";
string searchby = null;
try
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 123
searchby = comboBox8.SelectedItem.ToString();
}
catch (Exception e)
{ //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Lastname")
{
search = "col_lastname";
}
else if (searchby == "Firstname")
{
search = "col_firstname";
}
else if (searchby == "Username")
{
search = "col_user";
}

string query = "select * from tbl_useraccounts " +


"where col_lastname like '" + textBox7.Text + "%' and col_status='unarchived' and
col_usertypeid=2";

if (searchby != null)
{
query = "select * from tbl_useraccounts " +
"where " + search + " like '" + textBox7.Text + "%'and col_status='unarchived' and
col_usertypeid=2";
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView5.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 124
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView5.Items.Add(items);
materialListView5.FullRowSelect = true;
}
conn.Close();

}
catch (Exception)
{
MessageBox.Show("No connection to the host");

} }
}
public void searcharchivedcashier()
{
string search = "u.col_lastname";
string searchby = null;
try
{
searchby = comboBox4.SelectedItem.ToString();
}
catch (Exception e)
{ //MessageBox.Show(e.ToString());
}

if (searchby != null)
{
if (searchby == "Lastname")
{
search = "col_lastname";
}
else if (searchby == "Firstname")
{
search = "col_firstname";
}
else if (searchby == "Username")
{
search = "col_user";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 125
}

string query = "select * from tbl_useraccounts " +


"where col_lastname like '" + textBox6.Text + "%' and col_status='archived' and
col_usertypeid=2";

if (searchby != null)
{
query = "select * from tbl_useraccounts " +
"where " + search + " like '" + textBox6.Text + "%'and col_status='archived' and
col_usertypeid=2";
}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView4.Items.Clear();
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_useraccountsid"].ToString());

items.SubItems.Add(read["col_user"].ToString());
//items.SubItems.Add(read["col_password"].ToString());
items.SubItems.Add(read["col_lastname"].ToString());
items.SubItems.Add(read["col_firstname"].ToString());
items.SubItems.Add(read["col_middlename"].ToString()); ;
items.SubItems.Add(read["col_address"].ToString());
//items.SubItems.Add(read["col_dateofbirth"].ToString());
items.SubItems.Add(read["col_gender"].ToString());
items.SubItems.Add(read["col_contactnum"].ToString());

materialListView4.Items.Add(items);
materialListView4.FullRowSelect = true;
}
conn.Close();

}
catch (Exception)
{
MessageBox.Show("No connection to the host");

} }

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 126
}
private void materialRaisedButton1_Click(object sender, EventArgs e)
{
Login a = new Login();
a.Show();
this.Close();
}
private void materialFlatButton4_Click(object sender, EventArgs e)
{
//searchunarchived();
if (label6.Text == "SI")
{
MessageBox.Show("Select a record below");
}
else
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_product p SET " +
"col_status = 'archived' " +
"where p.col_productid = '" + label6.Text + "'";
command.CommandText = query;
command.ExecuteScalar();
conn.Close();
}
catch (Exception)
{
MessageBox.Show("No connection to the host");

materialListView1.Items.Clear();
materialListView2.Items.Clear();

dataproductunarchived();
dataproductarchived();
defaultFaultSelectID();
}
}

private void materialFlatButton6_Click(object sender, EventArgs e)


{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 127
NewProduct a = new NewProduct();
a.Show();
this.Close();
}

private void materialFlatButton1_Click(object sender, EventArgs e)


{

NewProduct a = new NewProduct();


a.Show();
this.Hide();

private void materialFlatButton2_Click(object sender, EventArgs e)


{
if (label6.Text == "SI")
{
MessageBox.Show("Select a record below");
}
else
{
ViewProductInfo a = new ViewProductInfo(label6.Text);
a.Show();
this.Hide();
}

private void materialListView1_MouseDoubleClick(object sender, MouseEventArgs e)


{
if (materialListView1.SelectedItems.Count > 0)
{
ListViewItem item = materialListView1.SelectedItems[0];
label6.Text = item.SubItems[0].Text;
}
else
{
defaultFaultSelectID();
}
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 128
searchunarchived();
}
private void materialRaisedButton1_Click_2(object sender, EventArgs e)
{

DialogResult dialog = MessageBox.Show( "Are You sure you want to Log-out?",


"Message", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
Login a = new Login();
a.Show();
this.Hide();
}
}

private void materialFlatButton7_Click(object sender, EventArgs e)


{
NewBrandPartnerAccount a = new NewBrandPartnerAccount();
a.Show();
this.Hide();
}

private void materialListView2_DoubleClick(object sender, EventArgs e)


{
printarchivedproduct();
}

private void materialFlatButton20_Click(object sender, EventArgs e)


{
if (label9.Text == "SI")
{
MessageBox.Show("Select a record below");
}
else
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_product p SET " +
"col_status = 'unarchived' " +
"where p.col_productid = '" + label9.Text + "'";
command.CommandText = query;
command.ExecuteScalar();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 129
conn.Close();
}
catch (Exception)
{
MessageBox.Show("No connection to the host");
}

materialListView1.Items.Clear();
materialListView2.Items.Clear();

dataproductunarchived();
dataproductarchived();
defaultFaultSelectID();
}
}

private void textBox2_KeyPress(object sender, KeyPressEventArgs e)


{
searchunarchived();
}

private void comboBox1_SelectedValueChanged(object sender, EventArgs e)


{
searchunarchived();

private void materialFlatButton23_Click(object sender, EventArgs e)


{
if (label15.Text != "SI")
{
ViewBrandPartnerInfo a = new ViewBrandPartnerInfo(label15.Text);
a.Show();
this.Hide();
}
else
{
MessageBox.Show("Select a record below");
}
}
public void printbrandpartnerunarchived()
{
if (materialListView3.SelectedItems.Count > 0)
{
int data = 0;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 130
ListViewItem list = materialListView3.SelectedItems[data];
String id = list.SubItems[0].Text;
label15.Text = id.ToString();
}
else
{
defaultFaultSelectID();
}
}
public void printbrandpartnerarchived()
{
if (materialListView6.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView6.SelectedItems[data];
String id = list.SubItems[0].Text;
label21.Text = id.ToString();
}
else
{
defaultFaultSelectID();
}
}
private void materialListView3_MouseDoubleClick(object sender, MouseEventArgs e)
{
printbrandpartnerunarchived();
}
public void archivedbrandpartner()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_useraccounts SET " +
"col_status = 'archived'" +
"WHERE col_useraccountsid='" + label15.Text + "'";
command.CommandText = query;
command.ExecuteScalar();

conn.Close();
}
catch (Exception)
{
MessageBox.Show("No connection to the host");

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 131
}
}
private void materialFlatButton9_Click(object sender, EventArgs e)
{
if (label15.Text != "SI")
{
archivedbrandpartner();
materialListView6.Items.Clear();
materialListView3.Items.Clear();
databrandpartneraccountunarchived();
databrandpartneraccountarchived();
recountbp();
defaultFaultSelectID();
}
else
{
MessageBox.Show("Select a record below");
}

private void materialListView6_MouseDoubleClick(object sender, MouseEventArgs e)


{
printbrandpartnerarchived();
}

private void materialFlatButton15_Click(object sender, EventArgs e)


{
NewCashier a = new NewCashier();
a.Show();
this.Hide();
}
private void materialFlatButton17_Click(object sender, EventArgs e)
{
if (label40.Text != "SI")
{
ViewCashierInfo a = new ViewCashierInfo(label40.Text);
a.Show();
this.Hide();
}
else
{
MessageBox.Show("Select a record below");
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 132
}

private void printcashieridunarchived()


{
if (materialListView5.SelectedItems.Count > 0)
{
ListViewItem item = materialListView5.SelectedItems[0];
label40.Text = item.SubItems[0].Text;
}
else
{
defaultFaultSelectID();
}
}

private void materialListView5_MouseDoubleClick(object sender, MouseEventArgs e)


{
printcashieridunarchived();
}

private void printcashieridarchived()


{
if (materialListView4.SelectedItems.Count > 0)
{
ListViewItem item = materialListView4.SelectedItems[0];
label33.Text = item.SubItems[0].Text;
}
else
{
defaultFaultSelectID();
}
}

private void materialListView4_MouseDoubleClick(object sender, MouseEventArgs e)


{
printcashieridarchived();
}

private void materialFlatButton16_Click(object sender, EventArgs e)


{
if (label40.Text != "SI")
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 133
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_useraccounts SET " +
"col_status = 'archived' " +
"WHERE col_useraccountsid='" + label40.Text + "'";
command.CommandText = query;
command.ExecuteScalar();
conn.Close();
}
catch (Exception)
{

MessageBox.Show("No connection to the host");


}

materialListView4.Items.Clear();
materialListView5.Items.Clear();
recountcash();
dataCashierAccountUnarchived();
dataCashierAccountArchived();
defaultFaultSelectID();
}
else
{
MessageBox.Show("Select a record below");
}

private void materialFlatButton13_Click(object sender, EventArgs e)


{
if (label33.Text != "SI")
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_useraccounts SET " +
"col_status = 'unarchived' " +
"WHERE col_useraccountsid='" + label33.Text + "'";
command.CommandText = query;
command.ExecuteScalar();
conn.Close();
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 134
catch (Exception)
{
MessageBox.Show("No connection to the host");

materialListView4.Items.Clear();
materialListView5.Items.Clear();

dataCashierAccountUnarchived();
dataCashierAccountArchived();

recountcash();
defaultFaultSelectID();
}
else
{
MessageBox.Show("Select a Record below.");
}
}

private void textBox2_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searcharchived();
}

private void materialListView3_SelectedIndexChanged(object sender, EventArgs e)


{
printbrandpartnerunarchived();
}

private void textBox3_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searchunarchivedbp();
}

private void materialListView6_SelectedIndexChanged(object sender, EventArgs e)


{
printbrandpartnerarchived();
}

private void textBox4_TextChanged(object sender, EventArgs e)


{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 135
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searcharchivedbp();
}

private void materialFlatButton10_Click(object sender, EventArgs e)


{
if (label21.Text != "SI")
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_useraccounts SET " +
"col_status = 'unarchived' " +
"where col_useraccountsid = '" + label21.Text + "'";
command.CommandText = query;
command.ExecuteScalar();
conn.Close();
}
catch (Exception)
{
MessageBox.Show("No connection to the host");

materialListView6.Items.Clear();
materialListView3.Items.Clear();

databrandpartneraccountunarchived();
databrandpartneraccountarchived();
recountbp();
defaultFaultSelectID();

}
else
{
MessageBox.Show("Select a record below.");
}
}

private void textBox7_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searchunarchivedcashier();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 136
}

private void textBox6_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searcharchivedcashier();
}

private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void comboBox3_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void comboBox5_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void comboBox6_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void comboBox8_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void comboBox4_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;
}

private void materialFlatButton19_Click(object sender, EventArgs e)


{
NewCategory a = new NewCategory();
a.Show();
this.Hide();
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 137
private void textBox5_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void disableConfirmDamage()


{
if (label3.Text != "0" || label3.Text != "")
{
groupBox6.Enabled = true;
}
else
{
groupBox6.Enabled = false;
}
}

private void viewdamageid()


{
try
{
int count = 0;
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView11.Items.Clear();
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "SELECT count(*) as count FROM tbl_damage d " +
"inner join tbl_order o " +
"on d.col_orderid = o.col_orderid " +
"inner join tbl_transaction t " +
"on t.col_transactionid = o.col_transactionid " +
"inner join tbl_product p " +
"on p.col_productid = o.col_productid " +
"where d.col_status='pending-change' OR d.col_status='pending-refund'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
read.Read();
count = int.Parse(read[0].ToString());
conn.Close();

if (count > 0)
{

conn.Open();
command = conn.CreateCommand();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 138
query = "SELECT * FROM tbl_damage d " +
"inner join tbl_order o " +
"on d.col_orderid = o.col_orderid " +
"inner join tbl_transaction t " +
"on t.col_transactionid = o.col_transactionid " +
"inner join tbl_product p " +
"on p.col_productid = o.col_productid " +
"where d.col_status='pending-change' OR d.col_status='pending-refund'";
command.CommandText = query;
read = command.ExecuteReader();

while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_damageitemid"].ToString());

items.SubItems.Add(read["col_orderid"].ToString());
items.SubItems.Add(read["col_transactioncode"].ToString());
items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
//items.SubItems.Add(read["col_staticquantity"].ToString());
//items.SubItems.Add(read["col_reason"].ToString());
items.SubItems.Add(read["col_status"].ToString());

materialListView11.Items.Add(items);
materialListView11.FullRowSelect = true;
}
conn.Close();
groupBox6.Enabled = true;

}
else
{
groupBox6.Enabled = false;
}
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");
}
}
private void printdamageid()
{
try
{
if (materialListView11.SelectedItems.Count > 0)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 139
{
int data = 0;
ListViewItem list = materialListView11.SelectedItems[data];
String id = list.SubItems[0].Text;
lblTransactionCode.Text = list.SubItems[2].Text;

label3.Text = id.ToString();
disableConfirmDamage();

}
else
{
defaultFaultSelectID();

}
catch (Exception e)
{
//MessageBox.Show("Select only one damage product");
}
try
{

MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);


string query = "SELECT * FROM tbl_damage d " +
"inner join tbl_order o " +
"on d.col_orderid = o.col_orderid " +
"inner join tbl_product p " +
"on p.col_productid = o.col_productid where col_damageitemid='" + label3.Text +
"'";
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = query;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
label18.Text = read["col_orderid"].ToString();
label24.Text = read["col_staticquantity"].ToString();
label30.Text = read["col_status"].ToString();
label36.Text = read["col_productcode"].ToString();
label42.Text = read["col_quantitybought"].ToString();
label46.Text = read["col_productprice"].ToString();
label11.Text = read["col_subtotal"].ToString();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 140
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to the host");

}
}
public void viewfinishdamage()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView13.Items.Clear();
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "SELECT * FROM tbl_damage d " +
"inner join tbl_order o " +
"on d.col_orderid = o.col_orderid " +
"inner join tbl_product p " +
"on p.col_productid = o.col_productid where d.col_status='Changed' OR
d.col_status='Refunded' ";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_damageitemid"].ToString());

items.SubItems.Add(read["col_orderid"].ToString());
//items.SubItems.Add(read["col_transactionid"].ToString());
items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
//items.SubItems.Add(read["col_staticquantity"].ToString());
//items.SubItems.Add(read["col_reason"].ToString());
items.SubItems.Add(read["col_status"].ToString());

materialListView13.Items.Add(items);
materialListView13.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 141
MessageBox.Show("No connection to the host" +e);
}

}
private void materialFlatButton3_Click(object sender, EventArgs e)
{
try
{

DialogResult dialogResult = MessageBox.Show("Are you sure you want to confirm",


"Confirmation", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
if (label30.Text == "pending-change")
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command3 = conn.CreateCommand();
command3.CommandText = "UPDATE tbl_damage SET col_status='Changed'
where col_damageitemid='" + label3.Text + "'";
command3.ExecuteScalar();
viewfinishdamage();
viewdamageid();
MessageBox.Show("Successfully Confirmed");
conn.Close();
}
else if (label30.Text == "pending-refund")
{
double returnPrice = 0;
MySqlConnection conn2 = new
MySqlConnection(ConnectionString.myConnection);
conn2.Open();
MySqlCommand command4 = conn2.CreateCommand();
command4.CommandText = "UPDATE tbl_damage SET col_status='Refunded'
where col_damageitemid='" + label3.Text + "'";
command4.ExecuteScalar();
conn2.Close();

conn2.Open();
MySqlCommand command = conn2.CreateCommand();
string query = "(Select SUM(`col_subtotal`) from tbl_order o " +
"inner join tbl_transaction t " +
"on t.col_transactionid = o.col_transactionid " +
"where t.col_transactioncode = '" + lblTransactionCode.Text +
"' and o.col_orderstatus='Sales') ";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 142
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
read.Read();
returnPrice = double.Parse(read[0].ToString());
conn2.Close();

conn2.Open();
command4 = conn2.CreateCommand();
command4.CommandText = "UPDATE tbl_transaction SET " +
"col_totalprice= " + returnPrice +
" where col_transactioncode ='" + lblTransactionCode.Text + "'";
command4.ExecuteScalar();
conn2.Close();

viewdamageid();
viewfinishdamage();
MessageBox.Show("Successfully Confirmed");

clearDamage();

}
}
else if (dialogResult == DialogResult.No)
{
clearDamage();
}

}
catch (Exception a)
{
MessageBox.Show("No connection to the host" + a);
}

}
private void clearDamage()
{
label3.Text = "";
label18.Text = "";
label24.Text = "";
label30.Text = "";
label36.Text = "";
label42.Text = "";
label46.Text = "";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 143
groupBox6.Enabled = false;
}

private void materialListView11_MouseDoubleClick(object sender, MouseEventArgs e)


{
printdamageid();
}

private void materialRaisedButton4_Click(object sender, EventArgs e)


{
new viewAdminAccount().Show();
this.Hide();
}

private void materialFlatButton5_Click(object sender, EventArgs e)


{

try
{
DialogResult dialogResult = MessageBox.Show("Are you sure you want to cancel",
"Confirmation", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
if (label30.Text == "pending-change")
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command3 = conn.CreateCommand();
command3.CommandText = "UPDATE tbl_damage SET col_status='change-
cancelled' where col_damageitemid='" + label3.Text + "'";
command3.ExecuteScalar();
viewfinishdamage();
viewdamageid();
MessageBox.Show("Successfully Cancelled");
conn.Close();

}
else if (label30.Text == "pending-refund")
{
double price = 0;
int qty = 0;
qty = int.Parse(label42.Text) + int.Parse(label24.Text);
price = (double.Parse(label46.Text) * int.Parse(label24.Text)) +
double.Parse(label11.Text);

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 144
MySqlConnection conn2 = new
MySqlConnection(ConnectionString.myConnection);
conn2.Open();
MySqlCommand command4 = conn2.CreateCommand();
command4.CommandText = "UPDATE tbl_damage SET col_status='refund-
cancelled' where col_damageitemid='" + label3.Text + "'";
command4.ExecuteScalar();
conn2.Close();

conn2.Open();
command4 = conn2.CreateCommand();
command4.CommandText = "UPDATE tbl_order SET " +
"col_quantitybought='" + qty + "'" +
" WHERE col_orderid='" + label18.Text + "'";

command4.ExecuteScalar();
conn2.Close();

conn2.Open();
MySqlCommand command3 = conn2.CreateCommand();
command3.CommandText = "UPDATE tbl_order SET " +
"col_subtotal='" + price + "'" +
" WHERE col_orderid='" + label18.Text + "'";

command3.ExecuteScalar();
conn2.Close();

viewdamageid();
viewfinishdamage();
MessageBox.Show("Successfully Cancelled");
clearDamage();
}
}
else if (dialogResult == DialogResult.No)
{
clearDamage();
}
}
catch (Exception a)
{
MessageBox.Show("No connection to the host"+a);
}
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 145
private void materialListView2_MouseClick(object sender, MouseEventArgs e)
{
printarchivedproduct();
}

private void defaultFaultSelectID()


{
materialListView1.SelectedIndices.Clear();
materialListView10.SelectedIndices.Clear();
materialListView11.SelectedIndices.Clear();
materialListView13.SelectedIndices.Clear();
materialListView2.SelectedIndices.Clear();
materialListView3.SelectedIndices.Clear();
materialListView4.SelectedIndices.Clear();
materialListView5.SelectedIndices.Clear();
materialListView6.SelectedIndices.Clear();

label6.Text = "SI";
label9.Text = "SI";
clearDamage();

label15.Text = "SI";
label21.Text = "SI";

label40.Text = "SI";
label33.Text = "SI";

private void outsideListview_Click(object sender, EventArgs e)


{
defaultFaultSelectID();
}

private void genericTabControl_SelectedTabIndexChanged(object sender, EventArgs e)


{
defaultFaultSelectID();
}

private void materialListView1_SelectedIndexChanged(object sender, EventArgs e)


{

if (materialListView1.SelectedItems.Count > 0)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 146
{
ListViewItem item = materialListView1.SelectedItems[0];
label6.Text = item.SubItems[0].Text;
}
else
{
defaultFaultSelectID();
}
}

private void listviewHeader_Click(object sender, ColumnClickEventArgs e)


{
defaultFaultSelectID();
}

private void materialListView11_SelectedIndexChanged(object sender, EventArgs e)


{
printdamageid();
}

private void materialListView2_SelectedIndexChanged(object sender, EventArgs e)


{
printarchivedproduct();
}

private void materialListView5_SelectedIndexChanged(object sender, EventArgs e)


{
printcashieridunarchived();
}

private void materialListView4_SelectedIndexChanged(object sender, EventArgs e)


{
printcashieridarchived();
}

private void tabOutsideListview_PreviewKeyDown(object sender,


PreviewKeyDownEventArgs e)
{
if (e.KeyCode == Keys.Tab)
{
defaultFaultSelectID();
}
}
}
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 147
New Cashier
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace LoginModule.cs
{
public partial class NewCashier : MaterialSkin.Controls.MaterialForm
{
public NewCashier()
{
InitializeComponent();
}
public void addnewCashierAccount()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
if (label1.Text == "")
{
MessageBox.Show("Complete the Form");
}
else
{
conn.Open();
MySqlCommand command = conn.CreateCommand();
command.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox9.Text + "' ";
MySqlDataReader read = command.ExecuteReader();

int count = 0;
while (read.Read())
{
count++;
}
conn.Close();

if (count >= 1)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 148
MessageBox.Show("The Username is already taken, please try another one");
}
else
{

conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = "insert into tbl_useraccounts (col_usertypeid, " +
"col_user, " +
"col_password, " +
"col_lastname, " +
"col_firstname, " +
"col_middlename, " +
"col_address, " +
//"col_dateofbirth, " +
"col_gender, " +
"col_contactnum, " +
"col_status) " +
"values ((SELECT col_usertypeid from tbl_usertype where
col_userrole='Cashier'),'" +
textBox9.Text + "','" +
textBox11.Text + "','" +
textBox3.Text + "','" +
textBox1.Text + "','" +
textBox2.Text + "','" +
textBox5.Text + "','" +
//dateTimePicker1.Text + "','" +
comboBox1.SelectedItem.ToString() + "','" +
textBox6.Text +
"','unarchived')";
command2.ExecuteScalar();
conn.Close();

MessageBox.Show("Saved Successfully");

Mainframe a = new Mainframe();


a.Show();
this.Hide();
}
}
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 149
}
}
private void materialFlatButton1_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(textBox9.Text) ||
string.IsNullOrWhiteSpace(textBox11.Text)||
string.IsNullOrWhiteSpace(textBox3.Text) ||
string.IsNullOrWhiteSpace(textBox1.Text) ||
string.IsNullOrWhiteSpace(textBox2.Text) ||
string.IsNullOrWhiteSpace(textBox5.Text) ||
string.IsNullOrWhiteSpace(comboBox1.Text)||
string.IsNullOrWhiteSpace(textBox6.Text) )
{
MessageBox.Show("Please don't leave any blank field(s).");
}
else if (textBox10.Text != textBox11.Text)
{
MessageBox.Show("Password does not match the confirm password.");
}
else
{
addnewCashierAccount();

}
}

private void materialFlatButton2_Click(object sender, EventArgs e)


{
Mainframe a = new Mainframe();
a.Show();
this.Hide();

private void textBox6_TextChanged(object sender, EventArgs e)


{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);

private void textBox9_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 150
private void textBox10_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);

private void textBox11_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);

private void textBox5_TextChanged(object sender, EventArgs e)


{
new DataHandling().namingTrap_TextChanged(sender, e);

private void textBox2_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox3_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void genericTextBoxTrim_Leave(object sender, EventArgs e)


{
new DataHandling().genericTextBoxTrim_Leave(sender, e);
}
}
}
New Category
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 151
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace LoginModule.cs
{
public partial class NewCashier : MaterialSkin.Controls.MaterialForm
{
public NewCashier()
{
InitializeComponent();
}
public void addnewCashierAccount()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
if (label1.Text == "")
{
MessageBox.Show("Complete the Form");
}
else
{
conn.Open();
MySqlCommand command = conn.CreateCommand();
command.CommandText = "select * from tbl_useraccounts where col_user = '" +
textBox9.Text + "' ";
MySqlDataReader read = command.ExecuteReader();

int count = 0;
while (read.Read())
{
count++;
}
conn.Close();

if (count >= 1)
{
MessageBox.Show("The Username is already taken, please try another one");
}
else
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 152
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = "insert into tbl_useraccounts (col_usertypeid, " +
"col_user, " +
"col_password, " +
"col_lastname, " +
"col_firstname, " +
"col_middlename, " +
"col_address, " +
//"col_dateofbirth, " +
"col_gender, " +
"col_contactnum, " +
"col_status) " +
"values ((SELECT col_usertypeid from tbl_usertype where
col_userrole='Cashier'),'" +
textBox9.Text + "','" +
textBox11.Text + "','" +
textBox3.Text + "','" +
textBox1.Text + "','" +
textBox2.Text + "','" +
textBox5.Text + "','" +
//dateTimePicker1.Text + "','" +
comboBox1.SelectedItem.ToString() + "','" +
textBox6.Text +
"','unarchived')";
command2.ExecuteScalar();
conn.Close();

MessageBox.Show("Saved Successfully");

Mainframe a = new Mainframe();


a.Show();
this.Hide();
}
}
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");
}
}
private void materialFlatButton1_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(textBox9.Text) ||

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 153
string.IsNullOrWhiteSpace(textBox11.Text)||
string.IsNullOrWhiteSpace(textBox3.Text) ||
string.IsNullOrWhiteSpace(textBox1.Text) ||
string.IsNullOrWhiteSpace(textBox2.Text) ||
string.IsNullOrWhiteSpace(textBox5.Text) ||
string.IsNullOrWhiteSpace(comboBox1.Text)||
string.IsNullOrWhiteSpace(textBox6.Text) )
{
MessageBox.Show("Please don't leave any blank field(s).");
}
else if (textBox10.Text != textBox11.Text)
{
MessageBox.Show("Password does not match the confirm password.");
}
else
{
addnewCashierAccount();

}
}

private void materialFlatButton2_Click(object sender, EventArgs e)


{
Mainframe a = new Mainframe();
a.Show();
this.Hide();

private void textBox6_TextChanged(object sender, EventArgs e)


{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);

private void textBox9_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox10_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 154
}

private void textBox11_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);

private void textBox5_TextChanged(object sender, EventArgs e)


{
new DataHandling().namingTrap_TextChanged(sender, e);

private void textBox2_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox3_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void genericTextBoxTrim_Leave(object sender, EventArgs e)


{
new DataHandling().genericTextBoxTrim_Leave(sender, e);
}
}
}
New Product
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 155
using MySql.Data.MySqlClient;
using System.Text.RegularExpressions;

namespace LoginModule.cs
{
public partial class NewProduct : MaterialSkin.Controls.MaterialForm
{
public NewProduct()
{
InitializeComponent();
viewcategory();
viewbrand();
}
public void viewcategory()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
comboBox2.Items.Clear();

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_category";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
comboBox2.Items.Add(read["col_categoryname"].ToString());

}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}
public void viewbrand()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
comboBox1.Items.Clear();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 156
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_brandpartner";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{
comboBox1.Items.Add(read["col_brandname"].ToString());
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}

public void additem()


{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
command.CommandText = "select * from tbl_product where col_productcode = '" +
textBox1.Text + "' ";
MySqlDataReader read = command.ExecuteReader();

int count = 0;
while (read.Read())
{
count++;
}
conn.Close();

if (count >= 1)
{
MessageBox.Show("The product code is already taken, please try another one");
}
else
{
conn.Open();
MySqlCommand command2 = conn.CreateCommand();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 157
command2.CommandText = "insert into tbl_product (col_useraccountsid,
col_categoryid, col_productcode, col_productname, col_productprice, col_status) " +
"values ((SELECT col_useraccountsid from tbl_brandpartner where
col_brandname='" + comboBox1.Text + "' limit 1)," +
"(SELECT col_categoryid from tbl_category c inner join tbl_brandpartner b on
c.col_useraccountsid = b.col_useraccountsid where b.col_brandname='" + comboBox1.Text + "'
and col_categoryname= '" + comboBox2.Text + "' limit 1),'" +
textBox1.Text + "','" +
textBox3.Text + "', round(" +
textBox2.Text + ",2),'unarchived')";

command2.ExecuteNonQuery();

conn.Close();
MessageBox.Show("Successfully Added!");
Mainframe a = new Mainframe();
a.Show();
this.Close();
}

}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}

private void materialFlatButton1_Click(object sender, EventArgs e)


{
double b;
bool isBValid = double.TryParse(textBox2.Text, out b);
if (string.IsNullOrWhiteSpace(comboBox1.Text) ||
string.IsNullOrWhiteSpace(comboBox2.Text) ||
string.IsNullOrWhiteSpace(textBox1.Text) ||
string.IsNullOrWhiteSpace(textBox3.Text) ||
string.IsNullOrWhiteSpace(textBox2.Text))
{
MessageBox.Show("Please don't leave any blank field(s).");
}
else if (textBox2.Text == ".")
{
MessageBox.Show("Invalid Price value.");
}
else if(b <= 0)
{
MessageBox.Show("Price should be greater than 0");

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 158
}
else
{
additem();
}
}

private void materialFlatButton2_Click(object sender, EventArgs e)


{

Mainframe a = new Mainframe();


a.Show();
this.Close();

//private void textBox2_TextChanged(object sender, KeyPressEventArgs e)


//{
// new DataHandling().decimalNumberTrap_KeyPress(sender, e);
// //if (string.IsNullOrWhiteSpace(textBox2.Text))
// //{
// // textBox2.Text = "1.00";
// //}
// //else if (System.Text.RegularExpressions.Regex.IsMatch(textBox2.Text,
"(\\..*\\.)|[^\\d+\\.\\d+]|[^\\.\\d+]"))
// //{
// // //MessageBox.Show("Please enter only numbers.");
// // textBox2.Text = "1.00";
// //}
//}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)


{
try
{
comboBox2.Text = "";
comboBox2.Items.Clear();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_category c " +
"inner join tbl_brandpartner b " +
"on c.col_useraccountsid = b.col_useraccountsid " +
"where b.col_brandname='" + comboBox1.Text + "'";
command.CommandText = query;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 159
MySqlDataReader read = command.ExecuteReader();
while (read.Read())
{
comboBox2.Items.Add(read["col_categoryname"].ToString());
}
conn.Close();
}
catch (Exception a)
{
MessageBox.Show("No connection to host");
}
}

private void textBox3_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox2_KeyPress(object sender, KeyPressEventArgs e)


{
new DataHandling().decimalNumberTrap_KeyPress(sender, e);

private void genericTextBoxTrim_Leave(object sender, EventArgs e)


{
new DataHandling().genericTextBoxTrim_Leave(sender, e);
}

private void textBox2_TextChanged(object sender, EventArgs e)


{

}
}
Transaction Module
using System;
using System.Collections.Generic;
using System.ComponentModel;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 160
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using MySql.Data.MySqlClient;

namespace LoginModule.cs
{
public partial class TransactionModule : MaterialSkin.Controls.MaterialForm
{

public TransactionModule(string id)


{
InitializeComponent();
label17.Text = id;
displayDate();
TransactionOutput();
TodaysSales();
textBox6.Visible = true;
label25.Visible = true;
viewcashier();
materialListView1.HeaderStyle = ColumnHeaderStyle.Clickable;
}
public void viewcashier()
{
try {
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select col_user from tbl_useraccounts where col_useraccountsid='" +
label17.Text + "'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
while (read.Read())
{
label3.Text = (read["col_user"].ToString());
}
conn.Close();
}
catch (Exception e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 161
MessageBox.Show("No connection to host");

}}
public void logaddtocart()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " added item " +
tbProductCode.Text.ToString() + " to the cart in the Transaction Code" +
labelTransactionCode.Text.ToString();

MySqlCommand command2 = conn.CreateCommand();

string query = "insert into tbl_logs(col_activity,col_dateofactivity)" +


"values ('" + a + "',now())";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
catch (Exception e)
{
MessageBox.Show("No connection to host");

}
public void logvoidfromcart()
{

try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " voided item " +
tbProductCode.Text.ToString() + "from the cart in the Transaction Code" +
labelTransactionCode.Text.ToString();

MySqlCommand command2 = conn.CreateCommand();

string query = "insert into tbl_logs(col_activity,col_dateofactivity)" +


"values ('" + a + "',now())";
command2.CommandText = query;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 162
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

}
}
public void logpurchase()
{

try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " added a new transaction " +
labelTransactionCode.Text.ToString();

MySqlCommand command2 = conn.CreateCommand();

string query = "insert into tbl_logs(col_activity,col_dateofactivity)" +


"values ('" + a + "',now())";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

}
}
public void logcancel()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " cancel transaction " +
labelTransactionCode.Text.ToString();

MySqlCommand command2 = conn.CreateCommand();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 163
string query = "insert into tbl_logs(col_activity,col_dateofactivity)" +
"values ('" + a + "',now())";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

}
public void logreturn()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " returned item " +
tbProductCode.Text.ToString();

MySqlCommand command2 = conn.CreateCommand();

string query = "insert into tbl_logs(col_activity,col_dateofactivity)" +


"values ('" + a + "',now())";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

}
}
public void displayDate()
{

timer1.Start();
label2.Text = DateTime.Now.ToString("yyyy-MM-dd");

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 164
label16.Text = DateTime.Now.ToString("yyy-MM-dd");
label19.Text = DateTime.Now.ToLongTimeString();
label7.Text = DateTime.Now.ToLongTimeString();

}
public void OrderDelete()
{
try
{

MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);


MySqlCommand command = conn.CreateCommand();

conn.Open();
command.CommandText = "Delete from tbl_order where col_orderstatus='unfinished'";
command.ExecuteScalar();
conn.Close();

}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}
public void TransactionDelete()
{
try
{

MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);


MySqlCommand command = conn.CreateCommand();

conn.Open();
command.CommandText = "Delete from tbl_transaction where col_transactioncode='" +
labelTransactionCode.Text + "'";
command.ExecuteScalar();
conn.Close();

}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 165
public void printitemdetails()
{
selectOrderIdClear();
try
{
if (materialListView2.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView2.SelectedItems[data];
String id = list.SubItems[0].Text;
tbProductCode.Text = id.ToString();
}

}
catch (Exception e)
{
MessageBox.Show("Select only one Product at a time");

}
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select P.col_productid,P.col_productcode, P.col_productname ," +
"B.col_brandname, C.col_categoryname, P.col_productprice from tbl_product P " +
"LEFT JOIN tbl_brandpartner B ON B.col_useraccountsid = P.col_useraccountsid " +
"LEFT JOIN tbl_category C ON C.col_categoryid = P.col_categoryid " +
"where P.col_status='unarchived' and P.col_productcode='" + tbProductCode.Text +
"'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
tbSearchItem.Clear();
tbQuantity.Enabled = true;
tbQuantity.Clear();
tbProductCode.Clear();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_productid"].ToString());
tbProductCode.Text = (read["col_productcode"].ToString());
tbProductName.Text = (read["col_productname"].ToString());
tbBrand.Text = (read["col_brandname"].ToString());
tbCategory.Text = (read["col_categoryname"].ToString());
tbPrice.Text = (read["col_productprice"].ToString());

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 166
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");
}

}
public void printorderid()
{
try
{
if (materialListView1.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView1.SelectedItems[data];
String id = list.SubItems[0].Text;
tbOrderId.Text = id.ToString();
tbQuantity.Enabled = false;
}
else
{
tbOrderId.Clear();
}

}
catch (Exception e)
{
MessageBox.Show("Select only one product");
}
}

public void searchProduct()


{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView2.Items.Clear();
conn.Open();
string query1 = "select * from tbl_product where col_productcode like '" +
tbSearchItem.Text + "%' and col_status='unarchived'";

MySqlCommand command2 = conn.CreateCommand();


command2.CommandText = query1;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 167
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
materialListView2.Items.Add(items);
materialListView2.FullRowSelect = true;
}
conn.Close();
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");
}
}
public void Change()
{
double Num;
if (!string.IsNullOrWhiteSpace(tbAmount.Text) && double.TryParse(tbAmount.Text, out
Num))
{
double money = Double.Parse(tbAmount.Text);
double total = Double.Parse(labelTotalSales.Text);
labelChange.Text = (money - total).ToString();
}
}
public void TodaysSales()
{
try
{
MySqlConnection con = new MySqlConnection(ConnectionString.myConnection);
con.Open();
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = con;
cmd.CommandText = "select SUM(col_totalprice) as price from tbl_transaction where
col_dateofpurchase='" + label2.Text + "'";
MySqlDataReader basa = cmd.ExecuteReader();
while (basa.Read())
{
label5.Text = basa["price"].ToString();

}
con.Close();
}
catch (Exception e) { MessageBox.Show("No connection to host"); }

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 168
}
public void TransactionOutput()
{
try
{
MySqlConnection con = new MySqlConnection(ConnectionString.myConnection);
con.Open();
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = con;
cmd.CommandText = "select MAX(col_transactionid) as ayD from tbl_transaction";
MySqlDataReader basa = cmd.ExecuteReader();
while (basa.Read())
{
string ayd = basa["ayD"].ToString();
int plus1 = Int32.Parse(ayd);
int total = plus1 + 1;
labelTransactionCode.Text = "PCS0" + total;
}
con.Close();
InsertTransaction();
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}
public void InsertOrder()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
if (tbProductCode.Text == "" || tbProductName.Text == "")
{
MessageBox.Show("Please select an item you wish to add");
}
else
{
MySqlCommand command2 = conn.CreateCommand();

string query = "insert into


tbl_order(col_transactionid,col_productid,col_staticprice,col_quantitybought,col_subtotal,col_orde
rstatus) " +
"values ((Select col_transactionid from tbl_transaction where col_transactioncode
='" + labelTransactionCode.Text + "'), " +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 169
"(Select col_productid from tbl_product where col_productcode='" +
tbProductCode.Text + "'),'"+tbPrice.Text+"','" + tbQuantity.Text + "','" +
tbSubtotal.Text + "','unfinished')";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
//MessageBox.Show(query);
}
}
catch (Exception e)
{
MessageBox.Show("No Connection to host");

}
}
public void InsertTransaction()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
if (label1.Text == "")
{
MessageBox.Show("Please Complete the Form");
}
else
{
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = "insert into
tbl_transaction(col_transactioncode,col_useraccountsid,col_totalprice,col_dateofpurchase) values
('" + labelTransactionCode.Text + "','" + label17.Text + "','" + labelTotalSales.Text + "',now())";
command2.ExecuteScalar();
conn.Close();
}
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}
public void InsertTransactionTotalAmount()
{
try
{
double tenderAmount, TotalSales;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 170
double.TryParse(tbAmount.Text, out tenderAmount);
double.TryParse(labelTotalSales.Text, out TotalSales);
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
if (labelTotalSales.Text == "0.00")
{
MessageBox.Show("Please select an item.");
}
else if (materialListView1.Items.Count == 0)
{
MessageBox.Show("You havent ordered yet.");
}
else if (string.IsNullOrWhiteSpace(tbAmount.Text))
{
MessageBox.Show("Please enter tender amount.");
}
//else if (int.Parse(tbAmount.Text) == 0)
//{
// MessageBox.Show("Tender should be greater than 0.");
//}
else if (tbAmount.Text == "" || tbAmount.Text == ".")
{
MessageBox.Show("Please enter tender amount.");
}
else if (tenderAmount < TotalSales)
{
MessageBox.Show("Insufficient Tender amount.");
}
else
{
double change = Double.Parse(labelChange.Text);

conn.Open();
MySqlCommand command2 = conn.CreateCommand();
string query = "UPDATE tbl_transaction SET " +
"col_totalprice= " + TotalSales +
" WHERE col_transactioncode='" + labelTransactionCode.Text + "'";
command2.CommandText = query;
command2.ExecuteScalar();
conn.Close();

conn.Open();
MySqlCommand command3 = conn.CreateCommand();
string query2 = "UPDATE tbl_order SET " +
"col_orderstatus='Sales' Where col_transactionid = (SELECT col_transactionid
from tbl_transaction where col_transactioncode = '" + labelTransactionCode.Text + "')";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 171
// MessageBox.Show(query2);
command3.CommandText = query2;
command3.ExecuteScalar();
conn.Close();

printDocument1.DefaultPageSettings.PaperSize = new
System.Drawing.Printing.PaperSize("custom", 400, 800);
printPreviewDialog1.Size = new System.Drawing.Size(400, 800);
printPreviewDialog1.ShowDialog();

MessageBox.Show("Transaction Saved!");

TransactionModule a = new TransactionModule(label17.Text);


a.Show();
this.Hide();

materialListView1.Items.Clear();
materialListView2.Items.Clear();
labelTotalSales.Text = "0.00";
tbAmount.Text = "0.00";
labelChange.Text = "0.00";

}
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}

}
public void viewOrder()
{
try
{
materialListView1.Items.Clear();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);

conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "Select * from tbl_order o " +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 172
"inner join tbl_transaction t " +
" on t.col_transactionid = o.col_transactionid " +
"inner join tbl_product p " +
"on o.col_productid = p.col_productid " +
"inner join tbl_brandpartner b " +
"on p.col_useraccountsid = b.col_useraccountsid " +
"inner join tbl_category c " +
"on c.col_categoryid = p.col_categoryid " +
"where t.col_transactioncode = '" + labelTransactionCode.Text + "' and
o.col_orderstatus='unfinished'";

command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_orderid"].ToString());
items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_productprice"].ToString());
items.SubItems.Add(read["col_quantitybought"].ToString());
items.SubItems.Add(read["col_subtotal"].ToString());
materialListView1.Items.Add(items);
}
conn.Close();
//MessageBox.Show(query);

subtotal();
total();

materialListView2.Items.Clear();

tbSubtotal.Clear();
tbSearchItem.Clear();
tbQuantity.Clear();
tbPrice.Clear();
tbOrderId.Clear();
tbProductName.Clear();
tbProductCode.Clear();
tbBrand.Clear();
tbCategory.Clear();
}
catch (Exception e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 173
MessageBox.Show("No connection");
}
}
public void remove()
{
try
{
if (tbOrderId.Text == "" || materialListView1.SelectedIndices.Count <= 0)
{
MessageBox.Show("Please select an item from the item list");
}
else
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = "UPDATE tbl_order SET " +
"col_orderstatus='void'" +
" WHERE col_orderid='" + tbOrderId.Text + "'";
command2.ExecuteScalar();
conn.Close();

logvoidfromcart();
viewOrder();
}

}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}
}
public void subtotal()
{
try
{
double itemsold = Double.Parse(tbQuantity.Text);
double price = Double.Parse(tbPrice.Text);
tbSubtotal.Text = (price * itemsold).ToString();
}
catch (Exception e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 174
}
}
public void total()
{
float value = 0;

for (int i = 0; i < materialListView1.Items.Count; i++)


{
value += float.Parse(materialListView1.Items[i].SubItems[7].Text);
}

labelTotalSales.Text = Convert.ToString(value);

}
private void materialFlatButton1_Click(object sender, EventArgs e)
{
Mainframe a = new Mainframe();
a.Show();
this.Close();
}
private void timer1_Tick(object sender, EventArgs e)
{
label7.Text = DateTime.Now.ToLongTimeString();
label2.Text = DateTime.Now.ToString("yyyy-MM-dd");
label16.Text = DateTime.Now.ToString("yyy-MM-dd");
label19.Text = DateTime.Now.ToLongTimeString();
timer1.Start();
}
private void materialFlatButton2_Click(object sender, EventArgs e)
{

}
public void cleartextBoxes()
{
tbAmount.Clear();
tbBrand.Clear();
tbCategory.Clear();
tbOrderId.Clear();
tbPrice.Clear();
tbProductCode.Clear();
tbProductName.Clear();
tbQuantity.Clear();
tbSubtotal.Clear();
}
private void textBox3_TextChanged(object sender, EventArgs e)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 175
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
cleartextBoxes();
if (tbSearchItem.Text == "")
{
materialListView2.Items.Clear();
}
else
{
searchProduct();
}
}
private void updatespecifiedorder()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command2 = conn.CreateCommand();
command2.CommandText = "insert into
tbl_damage(col_transactionid,col_orderid,col_reason,col_staticquantity,col_status) " +
"values ((Select col_transactionid from tbl_transaction where col_transactioncode='"
+ textBox8.Text + "')," +
"(Select col_orderid from tbl_order where col_orderid = '" +
textBox2.Text + "'),'" +
textBox9.Text + "','" +
textBox6.Text +
"','pending-refund')";

command2.ExecuteScalar();
conn.Close();
conn.Open();
MySqlCommand command3 = conn.CreateCommand();
command3.CommandText = "UPDATE tbl_order SET " +
"col_subtotal='" + textBox12.Text + "'" +
" WHERE col_orderid='" + textBox2.Text + "'";

command3.ExecuteScalar();
conn.Close();
conn.Open();
MySqlCommand command4 = conn.CreateCommand();
command4.CommandText = "UPDATE tbl_order SET " +
"col_quantitybought='" + textBox10.Text + "'" +
" WHERE col_orderid='" + textBox2.Text + "'";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 176
command4.ExecuteScalar();
conn.Close();
MessageBox.Show("Product successfully added to the pending process for refund");

clearAllControl();
}
catch (Exception e)
{
MessageBox.Show("no connection to host");
}
}
private void materialFlatButton3_Click(object sender, EventArgs e)
{
if (comboBox1.Text == "")
{
MessageBox.Show("Please select between Change or Refund");

}
else if (comboBox1.SelectedItem == "Change")
{
inserttopending();
}
else if (comboBox1.SelectedItem == "Refund")
{
int a, b;
bool isAValid = int.TryParse(textBox5.Text, out a);
bool isBValid = int.TryParse(textBox6.Text, out b);

if (isAValid && isBValid)


{
if (b == 0)
{
MessageBox.Show("The item you are returning should not be zero", "Message");
}
else if (a < b)
{
MessageBox.Show("The item you are returning is more than the item you
bought", "Message");
}
else if (a >= b)
{
inserttopending();
}
}
else

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 177
{
MessageBox.Show("Return item should not be blank");

}
}
private void inserttopending()
{
try
{
if (textBox8.Text != "")
{
if (comboBox1.SelectedItem == "Change")
{
logreturn();
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command2 = conn.CreateCommand();

string query = "insert into


tbl_damage(col_transactionid,col_orderid,col_reason,col_staticquantity,col_status) " +
"values ((Select col_transactionid from tbl_transaction where
col_transactioncode='" + textBox8.Text + "')," +
"(Select col_orderid from tbl_order where col_orderid = '" + textBox2.Text + "'),'" +
textBox9.Text + "','" +
textBox6.Text +
"', 'pending-change' )";
command2.CommandText = query;
command2.ExecuteNonQuery();
conn.Close();
MessageBox.Show("Product successfully added to the pending process for change
item");
clearAllControl();
}
else if (comboBox1.SelectedItem == "Refund")
{
textBox6.Visible = true;
label25.Visible = true;
logreturn();
updatespecifiedorder();
}
else
{
MessageBox.Show("Unable to return item /n Return item as?");

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 178
}
}
}
catch (Exception e)
{
MessageBox.Show("No connection to host");
}

}
private void clearAllControl()
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox6.Clear();
textBox7.Clear();
textBox9.Clear();
textBox10.Clear();
comboBox1.Text = "";
textBox12.Clear();
textBox11.Clear();
materialListView4.Items.Clear();
textBox8.Clear();
materialListView3.Items.Clear();

private void clearorderdetails()


{
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox6.Clear();
textBox7.Clear();
textBox9.Clear();
textBox10.Clear();
comboBox1.Text = "";
textBox12.Clear();
textBox11.Clear();
materialListView3.Items.Clear();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 179
private void textBox2_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(tbAmount.Text))
{
//tbAmount.Text = "0.00";
labelChange.Text = "0.00";
}
//else if (System.Text.RegularExpressions.Regex.IsMatch(tbAmount.Text,
"(\\..*\\.)|[^\\d+\\.\\d+]|[^\\.\\d+]"))
//{
// //MessageBox.Show("Please enter only numbers.");
// new DataHandling().decimalNumberTrap_KeyPress(sender, e);
//}
else
{
if (System.Text.RegularExpressions.Regex.IsMatch(tbAmount.Text, "\\d+"))
{
Change();
}
}
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && e.KeyChar != '.')
{
e.Handled = true;
}

if (e.KeyChar == '.' && (sender as TextBox).Text.IndexOf('.') > -1)


{
e.Handled = true;
}
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
{
e.Handled = true;
}

}
private void btnBack_Click(object sender, EventArgs e)
{
// Login a = new Login();
// a.Show();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 180
//this.Hide();
materialListView1.SelectedIndices.Clear();
try {
if (materialListView1.Items.Count == 0)
{
MessageBox.Show("You haven't ordered yet");
}
else
{
DialogResult dialog = MessageBox.Show("Are You sure you want to Cancel the
Transaction?", "Message", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
logcancel();
materialListView1.Items.Clear();
materialListView2.Items.Clear();
labelTotalSales.Text = "0.00";
tbAmount.Text = "0.00";
labelChange.Text = "0.00";
tbProductCode.Clear();
tbSearchItem.Clear();
TransactionDelete();
OrderDelete();
TransactionModule a = new TransactionModule(label17.Text);
}
}
}catch(Exception a)
{
MessageBox.Show("No connection to host");

}
}
private void tbQuantity_TextChanged(object sender, EventArgs e)
{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);
subtotal();
}
private void materialListView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
printorderid();
}
private void btnPurchase_Click(object sender, EventArgs e)
{
materialListView1.SelectedIndices.Clear();
logpurchase();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 181
InsertTransactionTotalAmount();
}
private void materialFlatButton4_Click(object sender, EventArgs e)
{
materialListView1.SelectedIndices.Clear();
ChangePassword a = new ChangePassword(label17.Text);
a.Show();
}
private void materialDivider2_Click(object sender, EventArgs e)
{

}
private void TransactionModule_Load(object sender, EventArgs e)
{

private void materialListView2_DoubleClick(object sender, MouseEventArgs e)


{

//tbQuantity.Text = "1";
printitemdetails();

}
private void selectOrderIdClear()
{
materialListView1.SelectedIndices.Clear();
tbOrderId.Clear();
}
private void btnAddtoCart_Click(object sender, EventArgs e)
{
selectOrderIdClear();
if (string.IsNullOrWhiteSpace(tbProductCode.Text))
{
MessageBox.Show("Select Product code");
}
else if (string.IsNullOrWhiteSpace(tbQuantity.Text))
{
MessageBox.Show("Please enter quantity.");
}
else if (int.Parse(tbQuantity.Text) == 0)
{
MessageBox.Show("Quantity should be greater than 0.");
}
else

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 182
{
logaddtocart();
InsertOrder();
viewOrder();
tbQuantity.Enabled = false;
}
}
private void btnRemovefromCart_Click(object sender, EventArgs e)
{
remove();
}
public void searchtransaction()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
materialListView3.Items.Clear();
conn.Open();
string query1 = "select * from tbl_transaction t " +
"inner join tbl_order o on t.col_transactionid = o.col_transactionid " +
"where o.col_orderstatus='Sales' " +
"AND o.col_quantitybought > 0 " +
"AND t.col_transactioncode like '" + textBox1.Text + "%' GROUP BY
col_transactioncode";

MySqlCommand command2 = conn.CreateCommand();


command2.CommandText = query1;
MySqlDataReader read = command2.ExecuteReader();
while (read.Read())
{
ListViewItem items = new ListViewItem(read["col_transactionid"].ToString());
items.SubItems.Add(read["col_transactioncode"].ToString());
var dt = DateTime.Parse(read["col_dateofpurchase"].ToString());
items.SubItems.Add(dt.ToString("yyyy-MM-dd"));
materialListView3.Items.Add(items);
materialListView3.FullRowSelect = true;
}
conn.Close();

}
catch(Exception e)
{
MessageBox.Show("No connection to host");
}}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 183
private void textBox1_TextChanged(object sender, EventArgs e)
{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
//clearAllControlwithoutsearchtrans();
if (textBox1.Text == "")
{
materialListView3.Items.Clear();
clearorderdetails();

}
else
{
searchtransaction();
}
}
public void printorders()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();

materialListView4.Items.Clear();
MySqlCommand command = conn.CreateCommand();
string query = "Select * from tbl_order o " +
"inner join tbl_transaction t " +
" on t.col_transactionid = o.col_transactionid " +
"inner join tbl_product p " +
"on o.col_productid = p.col_productid " +
"inner join tbl_brandpartner b " +
"on p.col_useraccountsid = b.col_useraccountsid " +
"inner join tbl_category c " +
"on c.col_categoryid = p.col_categoryid " +
"where t.col_transactioncode = '" + textBox8.Text + "' and o.col_orderstatus='Sales' "
+
"and o.col_quantitybought > 0 ";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

while (read.Read())
{

ListViewItem items = new ListViewItem(read["col_orderid"].ToString());


items.SubItems.Add(read["col_productcode"].ToString());
items.SubItems.Add(read["col_productname"].ToString());

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 184
items.SubItems.Add(read["col_brandname"].ToString());
items.SubItems.Add(read["col_categoryname"].ToString());
items.SubItems.Add(read["col_staticprice"].ToString());
items.SubItems.Add(read["col_quantitybought"].ToString());
items.SubItems.Add(read["col_subtotal"].ToString());
materialListView4.Items.Add(items);
materialListView4.FullRowSelect = true;
}

conn.Close();
clearorderdetails();
}
catch(Exception e)
{
MessageBox.Show("No Connection to host");
}
}
public void printtransid()
{
try
{
if (materialListView3.SelectedItems.Count > 0)
{
int data = 0;
ListViewItem list = materialListView3.SelectedItems[data];
String id = list.SubItems[1].Text;
textBox8.Text = id.ToString();

printorders();
textBox1.Clear();

}
else
{

clearorderdetails();
}
}
catch (Exception E)
{
MessageBox.Show("Select only one transaction");
}
}

private void materialListView3_MouseDoubleClick(object sender, MouseEventArgs e)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 185
{

printtransid();

}
public void printorderdetails()
{

int data = 0;
try
{
if (materialListView4.SelectedItems.Count > 0)
{
ListViewItem list = materialListView4.SelectedItems[data];
String id = list.SubItems[0].Text;
textBox2.Text = id.ToString();
}
else
{
clearorderdetails();
}
}
catch (Exception e)
{
MessageBox.Show("Select only one order");
}

try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();

MySqlCommand command = conn.CreateCommand();


string query = "Select * from tbl_order o " +
"inner join tbl_transaction t " +
" on t.col_transactionid = o.col_transactionid " +
"inner join tbl_product p " +
"on o.col_productid = p.col_productid " +
"inner join tbl_brandpartner b " +
"on p.col_useraccountsid = b.col_useraccountsid " +
"inner join tbl_category c " +
"on c.col_categoryid = p.col_categoryid " +
"where o.col_orderid= '" + textBox2.Text + "'";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 186
while (read.Read())
{
textBox3.Text = read["col_productname"].ToString();
textBox4.Text = read["col_productcode"].ToString();
textBox5.Text = read["col_quantitybought"].ToString();
textBox7.Text = read["col_staticprice"].ToString();
}
conn.Close();

}
catch (Exception e)
{
MessageBox.Show("No connection to hoste");

}
}
private void materialListView4_SelectedIndexChanged(object sender, EventArgs e)
{

printorderdetails();
}

private void materialFlatButton5_Click(object sender, EventArgs e)


{
materialListView1.SelectedIndices.Clear();
DialogResult dialog = MessageBox.Show( "Are You sure you want to Log-out?",
"Message", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
TransactionDelete();
Login a = new Login();
a.Show();
this.Hide();
}
}

private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = true;

}
public void SubtractQuantityForDamage()
{

int a, b,c,d;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 187
bool isAValid = int.TryParse(textBox5.Text, out a);
bool isBValid = int.TryParse(textBox6.Text, out b);
bool isCValid = int.TryParse(textBox7.Text, out c);
bool isDValid = int.TryParse(textBox12.Text, out d);

if (isAValid && isBValid)


{
textBox10.Text = (a - b).ToString();
textBox11.Text = (c * b).ToString();
textBox12.Text = ((a - b) * c).ToString();
}
}
private void textBox6_TextChanged(object sender, EventArgs e)
{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);
SubtractQuantityForDamage();
}

private void textBox9_TextChanged(object sender, EventArgs e)


{
new DataHandling().namingTrap_TextChanged(sender, e);
}

private void tbAmount_KeyPress(object sender, KeyPressEventArgs e)


{
new DataHandling().decimalNumberTrap_KeyPress(sender, e);
}

private void materialListView4_MouseDoubleClick(object sender, MouseEventArgs e)


{
printorderdetails();
}

private void printDocument1_PrintPage(object sender,


System.Drawing.Printing.PrintPageEventArgs e)
{
int ii = 1;
int startX, startY, Offset, offsetHead;
//int total = 0;
startX = 10;

Offset = 0;
offsetHead = 20;

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 188
e.Graphics.DrawString(" \t\tPosh Concept Store", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 10, 20);
offsetHead += 20;
e.Graphics.DrawString(" \t\t#40 Salinas Drive ", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" \t\tLahug Cebu City ", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" \t\tCebu 6000 ", new Font("Arial", 12, FontStyle.Regular),
Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" ===================================== ", new
Font("Arial", 12, FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" " + label2.Text + " " + label7.Text, new Font("Arial", 12,
FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" Sales Invoice No." + labelTransactionCode.Text, new Font("Arial",
12, FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" Cashier ID: " + label17.Text, new Font("Arial", 12,
FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" ===================================== ", new
Font("Arial", 12, FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);
offsetHead += 20;
e.Graphics.DrawString(" " +
"ProdCode" + "\t" +
"Price" + "\t" +
"Qty" + "\t" +
"Sub total"
, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, 10, 20 + offsetHead);

startY = offsetHead + 40;


startX = 10;
for (int i = 0; i < materialListView1.Items.Count; i++)
{
// Not sure what/why these two are here
//startX += i;
//startY += ii++;

// Draw the row details for ? receipt


e.Graphics.DrawString(" " +
materialListView1.Items[i].SubItems[2].Text + "\t\t" +
materialListView1.Items[i].SubItems[5].Text + "\t" +

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 189
materialListView1.Items[i].SubItems[6].Text + "\t" +
materialListView1.Items[i].SubItems[7].Text
, new Font("Arial", 12, FontStyle.Regular), Brushes.Black, startX, startY + Offset);

// Move the next print position 'down the page' ie, y axis increases from top to bottom
Offset = Offset + 20;

//total += int.Parse(materialListView1.Items[i].SubItems[2].Text.ToString());

}
Offset += 20;
e.Graphics.DrawString(" =================================== ", new
Font("Arial", 12, FontStyle.Regular), Brushes.Black, startX, startY + Offset);
Offset += 20;
e.Graphics.DrawString(" \t\t\tTotal:\t" +
labelTotalSales.Text + "\t", new Font("Arial", 12, FontStyle.Regular), Brushes.Black,
startX, startY + Offset);
Offset += 20;
e.Graphics.DrawString(" \t\tTender Amount:\t" +
tbAmount.Text + "\t", new Font("Arial", 12, FontStyle.Regular), Brushes.Black, startX,
startY + Offset);
Offset += 20;
e.Graphics.DrawString(" \t\t\tChange:\t" +
labelChange.Text + "\t", new Font("Arial", 12, FontStyle.Regular), Brushes.Black,
startX, startY + Offset);
}

private void groupBox4_Enter(object sender, EventArgs e)


{

private void materialFlatButton6_Click(object sender, EventArgs e)


{
clearAllControl();
}

private void materialTabControl1_SelectedIndexChanged(object sender, EventArgs e)


{
clearAllControl();
OrderDelete();
materialListView1.Items.Clear();
materialListView2.Items.Clear();
labelTotalSales.Text = "0.00";
tbAmount.Text = "0.00";
labelChange.Text = "0.00";

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 190
tbQuantity.Text = "";
tbProductCode.Clear();
tbSearchItem.Text = "";
}

private void materialListView2_SelectedIndexChanged(object sender, EventArgs e)


{

private void materialListView2_MouseClick(object sender, MouseEventArgs e)


{
printitemdetails();
}

private void materialListView1_SelectedIndexChanged(object sender, EventArgs e)


{
printorderid();
}

private void materialListView4_SelectedIndexChanged_1(object sender, EventArgs e)


{

printorderdetails();
}

private void clickOutsideItemListview_Enter(object sender, EventArgs e)


{
selectOrderIdClear();
}

private void materialListView2_Enter(object sender, EventArgs e)


{
selectOrderIdClear();
}

private void materialListView1_ColumnClick(object sender, ColumnClickEventArgs e)


{
selectOrderIdClear();
}

private void materialListView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs


e)
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 191
if (e.KeyCode == Keys.Tab)
{
selectOrderIdClear();
}
}

private void tbAmount_Enter(object sender, EventArgs e)


{
tbAmount.SelectionStart = 0;
tbAmount.SelectionLength = tbAmount.Text.Length;
}

private void textBox9_Leave(object sender, EventArgs e)


{
new DataHandling().genericTextBoxTrim_Leave(sender, e);
}

private void materialListView3_SelectedIndexChanged(object sender, EventArgs e)


{
printtransid();
}

private void materialListView4_MouseLeave(object sender, EventArgs e)


{
clearorderdetails();
}
}
}
View Admin Account

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace LoginModule.cs
{
public partial class viewAdminAccount : MaterialSkin.Controls.MaterialForm
{

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 192
private string tempPass;

public viewAdminAccount()
{
InitializeComponent();
printAdmindetails();
}

public void printAdmindetails()


{

MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);


conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "select * from tbl_useraccounts u " +
"where u.col_useraccountsid = 17";
command.CommandText = query;
MySqlDataReader read = command.ExecuteReader();

read.Read();
textBox1.Text = read["col_firstname"].ToString();
textBox2.Text = read["col_middlename"].ToString();
textBox3.Text = read["col_lastname"].ToString();
//dateTimePicker1.Value = Convert.ToDateTime(read["col_dateofbirth"].ToString());
comboBox1.Text = read["col_gender"].ToString();
textBox5.Text = read["col_address"].ToString();
textBox6.Text = read["col_contactnum"].ToString();
textBox9.Text = read["col_user"].ToString();
textBox10.Text = read["col_password"].ToString();
tempPass = textBox10.Text;
conn.Close();

private void materialFlatButton2_Click(object sender, EventArgs e)


{
new Mainframe().Show();
this.Hide();
}

private void materialFlatButton1_Click(object sender, EventArgs e)


{
if (string.IsNullOrWhiteSpace(textBox9.Text) ||
(string.IsNullOrWhiteSpace(textBox11.Text) && textBox11.Enabled == true) ||

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 193
string.IsNullOrWhiteSpace(textBox3.Text) ||
string.IsNullOrWhiteSpace(textBox1.Text) ||
string.IsNullOrWhiteSpace(textBox2.Text) ||
string.IsNullOrWhiteSpace(textBox5.Text) ||
string.IsNullOrWhiteSpace(comboBox1.Text) ||
string.IsNullOrWhiteSpace(textBox6.Text))
{
MessageBox.Show("Please don't leave any blank field(s).");
}
else if (textBox10.Text != textBox11.Text && textBox10.Enabled == true )
{
MessageBox.Show("Password does not match the confirm password.");
}
else
{
update();
Mainframe a = new Mainframe();
a.Show();
this.Hide();
}
}

public void update()


{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
MySqlCommand command = conn.CreateCommand();
string query = "UPDATE tbl_useraccounts SET " +
"col_firstname = '" + textBox1.Text + "', " +
"col_middlename = '" + textBox2.Text + "', " +
"col_lastname = '" + textBox3.Text + "', " +
//"col_dateofbirth = '" + dateTimePicker1.Text + "', " +
"col_gender = '" + comboBox1.SelectedItem.ToString() + "', " +
"col_address = '" + textBox5.Text + "', " +
"col_contactnum = '" + textBox6.Text + "', " +
"col_user = '" + textBox9.Text + "', " +
"col_password = '" + textBox10.Text + "' " +
"WHERE col_useraccountsid='" + labelCashierId.Text + "'";
command.CommandText = query;
command.ExecuteScalar();
conn.Close();
}
catch (Exception)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 194
{
MessageBox.Show("Connection Lost");
}
}
private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = true;
}

private void textBox11_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox10_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void textBox5_TextChanged(object sender, EventArgs e)


{
new DataHandling().namingTrap_TextChanged(sender, e);
}

private void textBox2_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox3_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
new DataHandling().stringOnly_TextChanged(sender, e);
}

private void genericTextBoxTrim_Leave(object sender, EventArgs e)


{
new DataHandling().genericTextBoxTrim_Leave(sender, e);
}

private void textBox6_TextChanged(object sender, EventArgs e)

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 195
{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);

private void textBox4_TextChanged(object sender, EventArgs e)


{
new DataHandling().alphanumericTrap_TextChanged(sender, e);
}

private void materialCheckBox1_CheckedChanged(object sender, EventArgs e)


{
if (chkChangePassword.Checked == true)
{
textBox10.Text = "";
textBox10.Enabled = true;
textBox11.Enabled = true;
}
else
{
textBox10.Text = tempPass;
textBox10.Enabled = false;
textBox11.Enabled = false;
textBox11.Text = "";
}
}
}
}
BARCHART

url: "dataChart.php", //filterFile(),


dataType: "json",
method: "POST",
success: function(data) {
console.log(data);
var date = [];
var sales = [];

for(var i in data) {
date.push(data[i].date);
sales.push(data[i].sales);
}

var areaChartData = {
labels: date,

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 196
datasets : [
{
label: 'Daily Sales',
backgroundColor: 'rgba(200, 200, 200, 0.75)',
borderColor: 'rgba(200, 200, 200, 0.75)',
hoverBackgroundColor: 'rgba(200, 200, 200, 1)',
hoverBorderColor: 'rgba(200, 200, 200, 1)',
data: sales
}
]
};
DATACHART
if ( $_POST['fromdate'] && $_SESSION['userId'] && $_POST['todate']){
//echo $_SESSION['userId]];
// convert string to date
$todate = $_POST["todate"];
$fromdate = strtotime($_POST["fromdate"]);
$fromdate = date("Y-m-d", $fromdate);
$todate = strtotime($_POST["todate"]);
$todate = date("Y-m-d", $todate);

//query to get data from the table


$query = sprintf("SELECT col_dateofpurchase as date, col_totalprice as sales FROM
tbl_transaction WHERE col_dateofpurchase >= date('".$fromdate."') AND col_dateofpurchase <
date('".$todate."') GROUP by col_dateofpurchase ORDER BY col_dateofpurchase ASC" );

// change query if brand partner


if($_SESSION['usertype'] != '1')
{
$query = sprintf("SELECT t.col_dateofpurchase as date,t.col_totalprice as sales
FROM tbl_transaction t
inner join tbl_order o on o.col_transactionid = t.col_transactionid
inner join tbl_product p on o.col_productid = p.col_productid
inner join tbl_brandpartner b on b.col_useraccountsid = p.col_useraccountsid
where b.col_useraccountsid = " . $_SESSION['userId'] .
" and date(col_dateofpurchase) between date('$fromdate') and date('$todate')
GROUP by col_dateofpurchase
ORDER BY col_dateofpurchase ASC");
}

$data = array();
$result = mysqli_query($db, $query);
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
$data[] = $row;
}

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 197
echo json_encode($data);

}else{

//query to get data from the table


$query = sprintf("SELECT col_dateofpurchase as date,col_totalprice as sales,
col_useraccountsid FROM tbl_transaction GROUP by col_dateofpurchase ORDER BY
col_dateofpurchase ASC");

if($_SESSION['usertype'] != '1')
{
$query = sprintf("SELECT t.col_dateofpurchase as date,t.col_totalprice as sales
FROM tbl_transaction t
inner join tbl_order o on o.col_transactionid = t.col_transactionid
inner join tbl_product p on o.col_productid = p.col_productid
inner join tbl_brandpartner b on b.col_useraccountsid = p.col_useraccountsid
where b.col_useraccountsid = " . $_SESSION['userId'] .
" GROUP by col_dateofpurchase
ORDER BY col_dateofpurchase ASC");
}
LOGIN
<form class="modal-content animate" action="Controller/verify.php" method="POST">
<div class="imgcontainer">
<img src="posh.jpg" alt="Avatar" class="avatar">
</div>

<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="uname" required>

<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>

<button type="submit" >Login</button>

<label>
<?php if(isset($_GET["error"])){ ?>
<span style="color:red; font-weight:strong;"><?php echo "Invalid User" ?> </span>
<?php } ?>
</label>
</div>
</form>

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 198
SALES
<section class="content-header">
<h1> Sales Table </h1>
<br/>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"></span>
<div class="info-box-content">

<span class="info-box-text">Number of Transactions</span>


<span class="info-box-number"> <?php
if(isset($_SESSION['userId']) && $_SESSION['usertype'] != '1'){
$result=mysqli_query($db, "SELECT COUNT(col_transactioncode) as sales from
tbl_order o inner join tbl_product p on o.col_productid = p.col_productid inner join tbl_transaction t
on o.col_transactionid = t.col_transactionid inner join tbl_brandpartner b on b.col_useraccountsid
= p.col_useraccountsid where b.col_useraccountsid = '".$_SESSION['userId']."'");
}else{
$result=mysqli_query($db, 'SELECT Count(col_transactioncode) as sales FROM
tbl_transaction');
}
$row = mysqli_fetch_assoc($result);
$sum = $row['sales'];
echo $sum;
?></span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div>

<div class="col-md-3 col-sm-6 col-xs-12">


<div class="info-box">
<span class="info-box-icon bg-aqua"> </span>
<div class="info-box-content">

<span class="info-box-text">Total Sales</span>


<span class="info-box-number">
<?php

if(isset($_SESSION['userId']) && $_SESSION['usertype'] != '1'){


$result=mysqli_query($db, "SELECT sum(col_subtotal) as value FROM tbl_order
o inner join tbl_product p on o.col_productid = p.col_productid inner join tbl_transaction t on
o.col_transactionid = t.col_transactionid inner join tbl_brandpartner b on b.col_useraccountsid =
p.col_useraccountsid where b.col_useraccountsid = '".$_SESSION['userId']."'");
}else{
$result=mysqli_query($db, 'SELECT SUM(col_totalprice) as value FROM
tbl_transaction');

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 199
}
$row = mysqli_fetch_assoc($result);
$sum = $row['value'];
echo $sum;
?>
</span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div>
<div class="col-md-3 col-sm-6 col-xs-12">

<div class="info-box">
<span class="info-box-icon bg-green"></span>
<div class="info-box-content">

<span class="info-box-text">Number of Sales</span>


<span class="info-box-number"> <?php

if(isset($_SESSION['userId']) && $_SESSION['usertype'] != '1'){


$result=mysqli_query($db, "SELECT COUNT(col_orderstatus) as sales
from tbl_order o inner join tbl_product p on o.col_productid = p.col_productid inner join
tbl_transaction t on o.col_transactionid = t.col_transactionid inner join tbl_brandpartner b on
b.col_useraccountsid = p.col_useraccountsid where b.col_useraccountsid =
'".$_SESSION['userId']."' and col_orderstatus = 'sales'");
}else{
$result=mysqli_query($db, 'SELECT Count(col_orderstatus) as sales
FROM tbl_order where col_orderstatus="Sales"');
}
$row = mysqli_fetch_assoc($result);
$sum = $row['sales'];
echo $sum;
?></span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"></span>
<div class="info-box-content">

<span class="info-box-text">Void Items</span>


<span class="info-box-number"> <?php

if(isset($_SESSION['userId']) && $_SESSION['usertype'] != '1'){

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 200
$result=mysqli_query($db, "SELECT COUNT(col_orderstatus) as void from
tbl_order o inner join tbl_product p on o.col_productid = p.col_productid inner join tbl_transaction t
on o.col_transactionid = t.col_transactionid inner join tbl_brandpartner b on b.col_useraccountsid
= p.col_useraccountsid where b.col_useraccountsid = '".$_SESSION['userId']."' and
col_orderstatus = 'void'" );
}else{
$result=mysqli_query($db, 'SELECT Count(col_orderstatus) as void from tbl_order
where col_orderstatus="Void"');
}

$row = mysqli_fetch_assoc($result);
$sum = $row['void'];
echo $sum;
?></span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</div>
</div >
</section>
SEARCHCASHIER
<?php

require_once ('Controller/db.php');

if (!$db)
{
trigger_error('Could not connect to MySQL: ' . mysqli_connect_error());

}
echo $_GET['keyword'];
$_GET['keyword'] = 'cashier';
if($_GET['keyword']){
$keyword = $_GET['keyword'];
$result = mysqli_query($db,"SELECT * from tbl_useraccounts where col_firstname LIKE
'%$keyword%' OR col_lastname LIKE '%$keyword%' OR col_middlename LIKE '%$keyword%'
OR col_user LIKE '%$keyword%' OR col_status LIKE '%$keyword%' ");
// $row = mysqli_fetch_assoc($result);

// $result = mysqli_query($db, $query);

//loop through the returned data


$data = array();
foreach ($result as $row) {
$data['col_firstname'] = $row['col_firstname'];
$data['col_lastname'] = $row['col_lastname'];
$data['col_middlename'] = $row['col_middlename'];

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 201
$data['col_user'] = $row['col_user'];
$data['col_status'] = $row['col_status'];
}
}
?>
<script type="text/javascript">
// pass PHP variable declared above to JavaScript variable
var data = <?php echo json_encode($data) ?>;
</script>

SEARCH BRANDPARTNER
<?php require ('header.php'); ?>

<body class="hold-transition skin-red-light sidebar-mini">


<?php include 'headernav.php'; ?>

<div class= "content-wrapper">

<section class="content-header">
<h1>
<h1> Brand Partner Table </h1>
</h1>

</section>

<!-- Main content -->


<section class="content">

<div class="box">

<div class="box-body">

<div class="input-group" style="width: 300px;" align="right" >


<input type="text" name="table_search" id="searchInputBrandpartners"
onkeyup="searchFuncBrandpartners()" class="form-control input-sm pull-right"
placeholder="Search. . . .">
<div class="input-group-btn">
<button class="btn btn-sm btn-danger">Go</button>
</div>
</div>

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 202
<!--div class="panel_body" align="right">
<b>From:</b>
<input type="date" name="" value="">
<b>To:</b>
<input type="date" name="" value="">
</div-->
</div>
<table id="brandPartnerTable" class="table table-bordered table-
hover">
<tr>
<tbody>

<th>Username</th>

<th>Last Name</th>

<th>First Name</th>

<th>Middle Name</th>

<?php
require 'bpquery.php'
?>

<?php

view_user();
?>

</tbody>
</tr>
</table>

</div><!-- /.box-body -->


</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->

<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<?php include 'footer_jqueries.php'; ?>
</body>
</html>

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 203
APPENDIX F. CURRICULUM VITAE OF RESEARCHERS

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 204
John Rey Cahimat
PSO 162 Hernan Cortes St. Subangdaku,
Mandaue City, Cebu 6000
09430990563
jurixcahimat69@gmail.com

Personal Information
Place of Birth Cebu, City
Age 19 years old
Birth of Date April 15, 1999
Height 5’6

Educational Background
Tertiary Bachelor of Science in Information Technology
October 2018-Current STI College Cebu; Salinas Drive,
Lahug, Cebu City

Secondary Saint Louis College-Cebu


2011-2015 Echaves St., Maguikay, Mandaue City

Elementary Subangdaku Elementary School


2005-2011 Subangdaku, Mandaue City

SKILLS/Special Skills
 Oriented in PHP Web Programming
 Oriented in Microsoft Office Application
 Oriented in Visual Studio C#
 Good Communication Skills

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 205
Career References
Mr. Michael Goho
CEO BMW

Ms. Fe Mojado
Co - Founder Phixer Inc.

Mr. Romar John Patindol


CEO Inday Mae’s Stopover

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 206
Ryanjie E. Salva
Busay, Cebu City
09287841796
ryanjiesalva@gmail.com

Personal Information
Place of Birth Soro-soro Mambajao Camiguin
Age 19 years Old
Birth of Date November 4, 1998
Height 5’6

Educational Background
Tertiary Bachelor of Science in Information Technology

October 2018-Current STI College Cebu; Salinas Drive,


Lahug, Cebu City

Secondary Mambajao National High School


Mambajao, Camiguin

Elementary Soro-soro Elementary School


Soro-soro Mambajao Camiguin

SKILLS/Special Skills
 Oriented in PHP Web Programming
 Oriented in Microsoft Office Application
 Oriented in Visual Studio C#
 Good Communication Skills

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 207
Career References
Mr. Michael Goho
CEO BMW

Ms. Fe Mojado
Co - Founder Phixer Inc.

Mr. Romar John Patindol


CEO Inday Mae’s Stopover

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 208
Jenalyn B. Naldoza
P.Rodriguiz Capitol Site Cebu City
09955989222
jenalynbonior@gmail.com

Objective
To pursue a challenging career in a progressive environment where I can utilize my skills
and abilities in the field of Information Technology and to gain further experience.

Personal Information
Place of Birth Trinidad, Bohol
Age 31 years old
Birth of Date July 3, 1987
Height 5’
Status Married

Educational Background
Tertiary Bachelor of Science in Information Technology

October 2018-Current STI College Cebu; Salinas Drive,


Lahug, Cebu City

2008-2009 Diploma in Information Technology


STI College Tagbilaran,
Tagbilaran City, Bohol

2010-2011 TESDA, Balilihan, Bohol


Commercial Cooking NC-II

Secondary Hinlayagan National High School


2003-2004 Trinidad, Bohol

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 209
Elementary Sto. Tomas Elementary School
1999-2000 Trinidad, Bohol

Work Experience
From-To Position Company
May 2013-Oct.2015 OIC Berlein Elec.Corp
March 2012-April 2013 Electronic Assembler Mitsumi Elec.Corp
March-June 2006 Sales Lady DM Enterprises
March-September 2005 Machine Operator Vital Company

SKILLS/Special Skills
 Adobe Photoshop
 MS Word
 Power Point
 Excel
 Windows Movie Maker
 Mixing Music
 Sports
 Volleyball
 Singing
 Dancing

Career References
Mr. Michael Goho
CEO BMW

Ms. Fe Mojado
Co - Founder Phixer Inc.

Mr. Romar John Patindol


CEO Inday Mae’s Stopover

SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 210

You might also like