Professional Documents
Culture Documents
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:
October 2018
ADVISER’S RECOMMENDATION SHEET
Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing
by:
_____________________________
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
Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing
developed by:
___________________________ __________________________
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
Sales Monitoring System for Posh and Fab Concept Store with Online
Viewing
___________________________
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
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
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
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
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
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
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
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
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
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.
Currently, the staff will have to create their own excel document every day in
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
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
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.
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
The general objective of the proposed system is narrowed down in a specific objective:
o Create a system that can help our client search, store and display
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
administrator only.
every month.
Desktop Application
Item Form
archiving a 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
o The admin has an access role of viewing the brand partner’s information
o The admin can add a brand partner account, edit a brand partner account
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 15
For the Cashier
Transaction Form
o Change Password.
Website
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 16
For the Brand Partners
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 does not have Secure Sockets Layer (SSL) Certificate that
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.
Methodology
In this study, the proponents decided to use Scrum Methodology to fulfill and reach the
methodology for handling rapidly evolving projects. Scrum emphasizes teamwork where
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
Daily Scrum- The daily scrum is a short everyday meeting (no more than 15 minutes)
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
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
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
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 20
Maslow’s Hierarchy of Needs
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
found a similar hierarchy of needs among business owners. These are: Sufficient
Sales (every sale is critical); Financial Management (costs and profitability are
sales to occur); Personnel (ramp up — enough support to deliver the product 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
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
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
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
development and growth of the company and thus in turn to socioeconomic growth
In this theory, it’s stated that there is space to create something new to apply the
innovation in different periods, and how they compete for dominance today. It
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
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
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
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.
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 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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 25
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 26
Data Flow Diagram
Figure 7.0 shows the supremacy of the administrator in the whole system structure over
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
Figure 13.0 illustrates where the system automatically sends an email notification to the
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 30
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 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
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
Figure 18.0 shows that the system will generate reports and export monthly sales via email
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
To achieve the desired features of what the client asked, the proponents used
The proponents used the programming languages to have a structure for the
XAMPP
Development tool used by the proponents to test their work locally without
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
SVN (Subversion)
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
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
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 38
Identify whether product was sold or not
Transactions
Real-time calculations
After the series of tests conducted by the proponents, though errors were encountered, the
The table below are the lists of the test conducted by the proponents that shows the steps
Desktop Application
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 39
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
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 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.
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 42
when it is
finalized then
purchase and
print invoice
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
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
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
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
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.
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
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
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
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 52
BIBLIOGRAPHY
https://resources.collab.net/agile-101/what-is-scrum
http://ownersview.com/business-owners-hierarchy-of-needs/
http://www.academia.edu/16863814/Sales_and_Inventory_Systemc
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/
https://www.w3schools.com/howto/howto_js_sidenav.asp
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
https://www.w3schools.com/js/js_functions.asp
https://www.w3schools.com/js/js_dates.asp
https://www.w3schools.com/bootstrap/bootstrap_tables.asp
https://www.simplypsychology.org/forgetting.html
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:
• 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
-and-
POSH AND FAB CONCEPT STORE is an establishment of different online sellers located
The IT Project Proposed System (Sales Monitoring System for Posh and Fab Concept Store
This Agreement Letter as all about the understanding between the parties with respect to
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
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
The following statements listed below signifies the understanding and agreements of both
parties, and the system can only be updated within next version upgrades.
administrator only.
every month.
Desktop Application
Item Form
archiving a product.
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 61
o Search specific product
o The admin has an access role of viewing the cashier’s information at the
o The admin has an access role of viewing the brand partner’s information
o The admin can add a brand partner account, edit a brand partner account
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 62
For the Cashier
Transaction Form
o Change Password.
Website
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 63
For the Brand Partners
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 does not have Secure Sockets Layer (SSL) Certificate that
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.
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.
Proponents: Okay miss but first can we ask your business background?
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.
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.
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.
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
5. This button allows you to login only if it’s provided with valid username and
password.
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 70
Products Unarchived
1 2 3
4
5 6
table
5. This combo box allows you to select the item you want to search by
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 71
Add New Product
1
2
3
4
6 7
3. This combo box must be filled with correct Product Brand Partner
6. This button allows you to submit or save the product only if all the fields of the
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 72
Update Product
1
2
3
4
5
6 7
Partner
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 73
Products Archived
1
2
3 4
item in table
3. This combo box allows you to select the type of text you want to
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
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
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
1 7
2 8
3 9
4
10
5
11
6
12
13 14
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
1 7
2 8
3 9
4 10
5 11
6 12
13 14
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 78
Cashier Accounts Table
1 2 3
4 5
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
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
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
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
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 83
User’s Manual for Cashier on Desktop
Login Form
5 6
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
3. This textbox allows you to enter quantity of product you want to 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
14. This label shows the total number of products sold today
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
3. This table shows all product being purchased base from the transaction code
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 86
6. This textbox shows the product code being selected
9. This combo box allows you to select if you want to refund or change
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
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
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
3. This button allows you to login only if the username and password you
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 89
Dashboard
1
2 5
3
4 6
3. This button will show all user accounts registered the system
5. This button shows all the sales base on the date range of user
preferences
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 90
Sales Table
1 2 3 4
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 91
Cashier Table
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 92
Change Password
3 4
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;
}
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);
}
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();
}
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();
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();
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();
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();
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;
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");
}
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();
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();
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)
{
}
}
conn.Open();
MySqlCommand command = conn.CreateCommand();
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");
}
}
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");
}
}
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;
while (read.Read())
{
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;
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";
}
}
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");
}
}
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";
}
}
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";
}
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");
}
}
}
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";
}
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";
}
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
}
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();
}
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 127
NewProduct a = new NewProduct();
a.Show();
this.Close();
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 128
searchunarchived();
}
private void materialRaisedButton1_Click_2(object sender, EventArgs e)
{
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();
}
}
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");
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 132
}
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)
{
materialListView4.Items.Clear();
materialListView5.Items.Clear();
recountcash();
dataCashierAccountUnarchived();
dataCashierAccountArchived();
defaultFaultSelectID();
}
else
{
MessageBox.Show("Select a record below");
}
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.");
}
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 135
new DataHandling().alphanumericTrap_TextChanged(sender, e);
searcharchivedbp();
}
materialListView6.Items.Clear();
materialListView3.Items.Clear();
databrandpartneraccountunarchived();
databrandpartneraccountarchived();
recountbp();
defaultFaultSelectID();
}
else
{
MessageBox.Show("Select a record below.");
}
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 136
}
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);
}
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
{
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
{
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;
}
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();
}
label6.Text = "SI";
label9.Text = "SI";
clearDamage();
label15.Text = "SI";
label21.Text = "SI";
label40.Text = "SI";
label33.Text = "SI";
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();
}
}
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");
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();
}
}
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);
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");
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();
}
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 154
}
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");
}
}
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");
}
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 158
}
else
{
additem();
}
}
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");
}
}
}
}
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
{
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();
}
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();
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();
}
}
public void logcancel()
{
try
{
MySqlConnection conn = new MySqlConnection(ConnectionString.myConnection);
conn.Open();
string a = "Useraccountsid: " + label17.Text.ToString() + " cancel transaction " +
labelTransactionCode.Text.ToString();
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();
}
}
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
{
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
{
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");
}
}
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();
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!");
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;
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);
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();
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();
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;
}
}
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)
{
//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";
}
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())
{
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");
}
}
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();
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();
}
}
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);
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);
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);
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 190
tbQuantity.Text = "";
tbProductCode.Clear();
tbSearchItem.Text = "";
}
printorderdetails();
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 191
if (e.KeyCode == Keys.Tab)
{
selectOrderIdClear();
}
}
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();
}
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();
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();
}
}
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;
}
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 195
{
new DataHandling().numbersOnlyTrap_TextChanged(sender, e);
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);
$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{
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>
<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">
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">
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);
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'); ?>
<section class="content-header">
<h1>
<h1> Brand Partner Table </h1>
</h1>
</section>
<div class="box">
<div class="box-body">
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 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
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.
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
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.
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
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.
SALES MONITORING SYTEM FOR POSH AND FAB CONCEPT STORE WITH ONLINE VIEWING 210