Sie sind auf Seite 1von 71

Chapter 1

Project Context

People in this generation have their own gadgets almost every company uses

technology for them to utilize. PC is the most popular and used in our today’s technology.

Many Companies prefer using technologies to speed up their process and works but some

small companies doesn’t bother using it not because they can’t afford it but because it’s a

little hard to explain and understand especially for workers who don’t have experience on

it.

Technologies is important not just for companies but also for our daily lives and it

is also very useful in other activities like making purchases, communication, shopping

etc. Many job opportunities require a solid foundation and knowledge for and without it,

the world will still have no progress in trend nowadays like computers, smartphones, and

TVs.

Majority of the people are aware that computers are important part in our life in

this generation of technology. However, some of them cannot utilize the potential of

having computer. They use it for e-mail, social media, games and entertainment. Many

people used it for gaming, but in what way will it affect their work and speed in progress.

The issues they might dealt are:

 Too focused on using computers for entertainment


 Having a hard time on understanding how computer works
 Having a hard time to figure on how the system will make their work

faster

1
With the use of Easy to understand and simple system, even workers who do not

have high knowledge about computer will easily use the system, the proposed application

will make manufacturing and ordering faster and more reliable than ever.

Purpose and Description

The system is type of program which joins two types of system into one since the

target company involved in this kind transaction having them into one system will greatly

benefit not just the owner but also the employees that will make the job easier.

This software has been made because the company still uses the old type of

transaction which is the use of paper, with a big company like this using papers for

transaction is hard since it was only stored in a certain areas. Also is prone on natural

disasters like fire etc.

Having this type of system will save a lot of work especially on writing things in

paper also more secure since it’s online and lower the chance of losing it since it’s on

computer in which you can back up easily.

Using computerized sales and inventory systems allows for much greater

accuracy in stocking and product management. They encourage ease of interaction

between employees as transactions are processed and items move from the business to

the consumer. Computerized transactions help provide better insight into which products

are most popular. It also allows for enhanced marketing, stocking and oversight of critical

sales objectives.

2
Computerized sales and inventory systems save time for businesses by speeding

up transactions while raising accuracy. This allows for confidence in accounting and

accountability among employees as it is easy to verify how much money and what time

transactions took place.

In using this computerized sales and inventory system you can establish the

benefits you and your business handling may have. First is time savings. The amount of

time that can be saved by a business is perhaps the biggest benefit of using a

computerized inventory system. In cases where a shop maintains all data manually, its

manager must reconcile each sales receipt with every piece of physical inventory.

Depending on the size of the establishment and how many different products are sold,

this can be a daunting and time consuming task. However, used of an inventory system,

the master inventory list would be updated electronically each time a sale is made.

The company Tata Simeon Quality is managed by small manpower. The business

sells different sizes of items. Like some other store, the business does their physical

counting of stocks manually. Technically, the company is only using a manual system that

may cause to duplication of documents and work redundancy. The business is just

depending on their manual listing of products and inputs of data which is possible to

commit errors. The business can’t view their proper records of sales or income in a given

time of the year. It also doesn’t have its proper listings of product.

3
Objectives of the Project

The proponents now endorse our proposal which can help to implement good and

accurate system to the company. The proponents gave their best to satisfy the current

needs of the business by making a computerized sales and inventory system that will help

them in their business. Develop and implement computerized sales and inventory system

for the selected companies operation.

Specific Objectives

 Makes checking of how many stocks are left faster.


 Easier to deduct items from the inventory by using the system.
 To monitor the business earning per day.
 Selling items automatically deducts the quantity to the system

Scopes and Limitations

The proponents proposed system for the company can do stock maintenance,

product maintenance, transaction, product transaction, create an account and reports.

To design, develop and implement a module that will handle the security for the

system.

User Accounts – this contains the function for adding, and editing user name and

password. (Of course the authorized user can only be the one using the system.)

Owner - can access the entire system.

Personnel - can access only the inventory

To design, develop and implement a file maintenance module that will handle the

files, records and important data of the business.

4
Products - it contains all the record of adding of products.

Employees - it contains all the record of adding and deleting of employees. To

design, develop and implement a sales module that will handle the sales transaction of

their company.

Purchased Order - a module that handles generating of purchase ordered for the

supplier when they came.

Return Order – list of items buys by the customer to the business but needed to

be return because of some damage product and must change with new ones but this must

be within the store only.

Transaction History – list of transaction that happen during purchased order, will

include time and date the price and how many items are bought.

To design, develop and implement an inventory module that will handle the

inventory of products. All items that are available in the company are monitored by the

use of the following inventory methods8

Critical level – items that are low on stock will be monitored by the system in

order to have sufficient stock.

Reports – this includes all the history that has been made in the system.

5
Destroyed Order – list of items that have been damage or destroyed in

unavoidable circumstances

Earnings – Includes the cash in, cash out, loss and total earning of the company

Limitations

 Auditing is not included in the system

Chapter 2

Review of Related Literature and Systems

6
Local

According to de Alday, Espino, Ragudo, (2010)

Based on the research entitled “Computerized Sales and Inventory system for Ronmon

Trading” (de Alday, Espino, Ragudo, 2010), the replacement of the manual system with the

proposed system provided more efficient and accurate processing of transaction. The said system

is much reliable, eliminated errors and inaccurate information, and provided integrity valuable

reports.

According to Bisagas, Arivada, and Tanteo (2009)


“Inventory System of Best Choice Rice Dealer” by Bisagas, Arivada, and Tanteo

(October, 2009). The process of counting the sacks of rice is done manually, which corresponds to

difficulty in tallying the number of available stocks and sold items.


The manual generation of inventory reports such as daily, weekly, quarterly and annual

inventory list of records remains as one of their key problem since the establishment of the

business. The transaction processing system for Best Choice Rice Dealer will minimize the

difficulty of owner in processing inventory. It will monitor the availability of product items for

reorder to prevent under stocking, overstocking or running out of stocks, the system will also

generate necessary reports of inventory such as sales reports.

According to StudyMode.com (2012)


It is without a doubt that one of the major roles played by today in almost every area in

the society particularly in business and marketing is the computerized system. This system

enables us to make every detailed work and follows accurate directives without error. This study

is prepared for the implementation of the Sales Inventory System in Borderless Hub Philippines,

Inc. located in Rm. 306-307 Pink Walters Building Quimpo Boulevard, Davao City. In order to

know the problem, we conducted an interview with the managing team for sales, billing, and

7
inventory. This led us to problems like the manual time-consuming record of documents, billing

errors and difficulty in data retrieval.


The basic advantages of the proposed system are to make the process fast and well-

organized which means that they can process much more quickly than humans. Data retrieval has

to be searched in lots of registers slowly and it wastes a lot of time. The current system that the

company uses is manual receipt recording. It makes the data not reliable enough as it is

handwritten and there is a high probability of errors to occur. Data recording consumes a lot of

space since it is stored in cabinets and folders. It is also prone to data loss where it could be

missing because of improper file management.


Inventory is a company’s merchandise, goods and materials that are contained in the store

factory at any given time. The employees need to know how many units of their products are

available for reservation and sales and the items that are sold. All of these rely on the inventory

system to present solutions. The sales inventory system would provide service to the user, input

information to the database, summarize the inquiry of bills, and manage the product releases and

storage. This would generate a faster improvisation of work given less time and effort.

According to StudyMode.com (2010)


Computer-based system is a complex system wherein information technology plays a

major role. It makes the work easier, faster and more accurate. Due to that fact, the automated

scheme has become essential to small and big companies for they are expected to give the best

services possible. Nevertheless, some businesses still prefer sticking with the system that is not

integrated with technology. Probable causes are computer illiterate staff and lack of funds.

Companies, especially the big ones are recommended to switch from manual to automated

systems because this will improve the efficiency and productivity of the business which will

uplift the industry’s reputation.


One of the most sought after automated systems of different companies is a purchasing

and inventory system which comes hand in hand. A purchasing and inventory system is very

8
important in every organization because a good purchase and inventory management can create

excellent productivity. Primarily, inventory work consists of input, output and restock. Input is a

process of buying new products into the inventory and replacing the old products with the new

ones. Meanwhile, output is a procedure of taking out the products from the inventory for sales

or usage and refill is a process of increasing the number of existing products in the inventory in

order to fulfill the insufficient products or escalating demands. Most of the retailing market is

using traditional way in the inventory management system where a person is assigned to

check and record the stock by hand using pen and paper. It is where operations with regards to all

the stock will be archived.

According to Averion, Gaela, and Libo (2009)


In the study from Averion, Gaela, and Libo (2009) entitled “Monitoring and Inventory for

discovery Mall.com”, it stated that:


It will minimize the difficulty of the manager in processing inventory because physical

counting products, stocks and computing inventory summary will be the system job. It will

monitor the availability of products, items to prevent under stocking, over stocking and running

out of stock. The system will also simplify the transaction between dealer and supplier

relationship because of the updated supplier information and price list of items will correspond to

collaboration with other supplier.

Related Literature
Foreign

According to Sales and Inventory system for Schema Mega Center


Also stated in the research, “Sales and Inventory System For Schema Mega center”

(Almeda, Dañez, Geronimo), the proposed system are not just only accurate, reliable, and fast in

processing transactions rather it is also provided more systematic way of transacting with the

9
members and through the billing system also helped the employees to save a lot of time on

transaction processing.

U.S. Small Business Administration (2010)


According to the U.S. Small Business Administration, “Inventory refers to stocks of

anything necessary to do business” (U.S. Small Business Administration, 2010). The U.S. Small

Business Administration publication describes what constitutes successful inventory management

balancing cost versus benefits of inventory, including maintaining a wide assortment without

spreading the rapidly moving items too thin, increasing inventory turnover without sacrificing

service, keeping stock low without sacrificing performance, obtaining lower prices bymaking

volume purchases, maintaining an adequate inventory without an excess of absolute items.

According to J. De Leon, M. Ferrer (2009)

Under the Korean Red Ginseng Enterprise Sales and Inventory System, the researchers

came up with a computerized sales and inventory system. The proponents used database to easy

access of files and for easier and faster processing of the selling and inventory transaction. The

program was designated to generate reports such as monthly reports, inventory reports, sales

invoice and list of items. In connection with the proposed system, the proponents proposed a new

and faster way of processing business transactions. The system also helped the user to know the

availability of the products. It also helped the manager to monitor the stocks and to get immediate

notice for acquisition of additional products.


The Proponents acquires knowledge about the file processing and report generations through this

study. It also gives the proponents ideas to create the proposed system’s reports in online sales

10
and inventory system. Automation is mandatory, thus automated report generation for precise

reports is to beincluded in the proponent’s proposed system.

According to Laranang, Maaño, and Nañola (2009)


The study entitled “Osaka Sales and Inventory System” (Laranang, Maaño, and Nañola,

2009) states that business nowadays takes the advantage of using modern technology to improve

their status and ensuring an efficient and newer way to make their work easier. They state that the

main problem of the Osaka Iridology is what modern effective tool must be use in creating and

developing a sales and inventory system that will manage efficiently their transaction. So they

develop a system that inclusively for the transaction of Osaka Iridology, such as monitoring of

their medicine and their daily sales.

Sales and Inventory system for Schema Mega Center


Also stated in the research, “Sales and Inventory System For Schema Mega center”

(Almeda, Dañez, Geronimo), the proposed system are not just only accurate, reliable, and fast in

processing transactions rather it is also provided more systematic way of transacting with the

members and through the billingsystem also helped the employees to save a lot of time on

transaction processing.

Chapter 3

Technical Background

11
Description of the System

The system is proposed for the Tata Simeon Quality which is located in Paombong,

Bulacan. The system will feature an easy to use system that comes up with a user-friendly

interface that enables the admin or the personnel that will use it to click navigation bars which has

respective functions such as Inventory wherein they can check the availability of the products, the

admin can also add or delete product in this tab. And the Ordering tab, in this tab the system will

show all the product and the user will just choose the quantity on how many product they want

and the system will automatically sum all the price, this depends on what products the customers

had ordered, which will lead to the next tab the Transaction History tab where it shows all the

product that has been sold, including the quantity and the price of the product. Lastly is the User

Tab wherein only the admin users can access, in this tab the admin can add and delete new users

for the new personnel. There will also be a reservation tab, if the costumer asks for reservation for

products all the info will be display to this tab.

Hardware Requirements

Since the store uses the old manual system, they need to provide a computer for the

computerized system that we proposed to them. The computer should have at least 2.4 GHz dual

core processor, 4 GB worth of RAM, 80 GB hard drive. This will be use for the necessary data

storage to store data from current users and future users. This will also be enough for the required

minimum for said program. Since it is a computerized system it doesn’t recommend internet

connection to use the system.

Software Requirements

The programming language that will be use to this system is Visual Basic 6.0 which is

developed by Microsoft because it is one of the most used and easiest programming language

12
when it comes to making form applications. And we will be using MySQL as our database for

managing and storing all the data.

Visual Basic 6.0 is a programming environment from Microsoft in which a programmer

uses a graphical user interface to choose and modify preselected section of code written in the

Basic Programming Language.

MySQL is a database management system, an Oracle-backed open source relational

database. We choose this as it runs virtually on almost platforms.

Implementation Plan

With this the proposed project is complete, the program will now be completed by

selected Programmer accompanied by the Project Manager to ensure that the propose system will

be followed. The manager will also report all the status to other member so they can give their

opinion whenever and also can make changes if there is any need for upgrade. Also one of the

member will be needed for ensuring that the system will work on every testing phase and check if

there is a bug that needs to be fix. And with this the Implementation plan will commence.

Population and Locale of the Project

The implemented system target customers is at Paombong, Bulacan. With total

population of 53,294 as of 2018, the proposed project will also be valid at other neighboring

cities that needed condiments for their businesses.

Development Model

13
Figure 1 Waterfall Development Model

The Waterfall Development Model will be implemented in developing the Inventory and

Ordering System for Tata Simeon’s Quality. The system development model is composed of 6

phases namely:

14
Phase 1 – User Requirements, in this phase we interview the owner to learn their business process

on how each transaction flow, also in here we learn that we need to put an inventory system that

can show each of their item.

Phase 2 – Design, in this phase we brainstorm on how we put things in the system. Each of us

suggested a specific design and vote in which is the best option to put in the system.

Phase 3 – Coding, this phase our assigned programmer creates all the images us groupmates had

put into place. This also include the design of the system to be functional.

Phase 4 – Integration, us members will be checking the errors in this phase we will test the

system if its bug free and if the systems works smoothly

Phase 5 – Deployment, “beta phase” the phase where we let the client check the system and check

if it’s good for public use.

Phase 6 – Maintenance, things that needed to change, any suggestion or upgrade that needs to be

done on the system are in this phase.

15
Project Design and Analysis

Use Case

Figure 2 (Use Case Diagram)

16
Context Diagram

Figure 3 (Context Diagram)

17
System FlowChart

Figure 4 (FlowChart)

18
Figure 4.1 (Products)

19
Figure 4.2 (Categories)

Figure 4.3 (Ordering)

20
Figure 4.4 (Logs)

21
Database Design

Figure 5 (Database Design)

Data Dictionary

Table 1 – category

Key Name Data type Description

PK Id Integer(11) Product category ID

22
name Varchar(255) Product category name

Table 2 – logs

Key Name Data type Description


FK Id Int(11) ID of user

category Varchar(535) Name of product


description Varchar(255) Record
date datetime Date of log
Table 3 – prod

Key Name Data type Description

PK id Integer(11) Product ID
FK category_id Integer(11) Product category ID

name Varchar(255) Product name


quantity Integer(11) Product quantity

price Float Product price


description Varchar(255) Product descripton

Table 4 – cart

23
Key Name Data type Description

PK id Integer(11) ID of the cart


FK prod_id Integer(11) ID of the product

category_id Varchar(255) ID of Category


prod_name Varchar(255) Name of the product

quantity Integer(11) Quantity of the product


price Float Price of the product

Total Float Total price


Table 5 – transact

Key Name Data type Description

PK id Integer(11) Transaction ID
cart_id Integer(11) Cart ID

totaplrice Float Total price of the cart


cashtendered Float Cash payed

pchange Float
handler Varchar(255) Name of personnel

date Varchar(255) Date of transaction


Table 6 – logs

Key Name Data type Description

FK id Int(11) ID of user
username Varchar(255) Username of user

password Varchar(255) Password of user


user_type Varchar(255) Type of user

name Varchar(255) Name of user


tel Varchar(255) Telephone number of user

email Varchar(255) Email address of user

24
User Interface (Prospective)

Inventory Tab

Figure 6 (Inventory Tab)

25
Ordering Tab (Suka)

Figure 6.1 (Ordering Tab for Suka)

26
Transaction History

Figure 6.2 (Transaction History)

27
Schedule and Timeline

Figure 7 Gantt chart

28
Verification, Validation and Testing

After the coding is done, Testing for bugs and compatibly will be conducted to ensure

that the system is running properly. Several test will be prepared to confirm if the proposed

features are followed. Checking and cleaning for code errors will be done, also testing the

program at rough condition will be done to ensure the stability of the program.

Each tab will be check for errors and glitches that can happen in the system, any glitches

that have been missed during the checking will be removed. And will also let some people try it

to ensure that the system is easy to use.

29
Chapter 4

Presentation, Analysis, and Interpretation of Data

Table 7. “Respondents”

Respondents Frequency Percentage

Client 1 10%

Personnel 2 20%

IT Expert 3 30%

Users 4 40%

Total 10 100%

The subject of the study will comprise Client, Personnel, IT Experts, and Users. The data

is presented in the Table 7

Research Instrument

Evaluation sheets will be used as the instrument of the data gathering in this study.

The evaluation sheets will determine how acceptable the proposed system is.

Implementing system design needed a complete number of information to formulate a

system that will gather the detailed requirements, design and analysis, implementation

30
and development testing, and evaluation. It will help the software developer to

summarize all the data that gathered through conducting several steps and add more

sequential steps to improve more.

Data Gathering

The researchers will distribute evaluation sheets to the people that will participate in

the survey to gathered data that will be tallied. The evaluation sheets will determine how

acceptable the proposed system is.

Statistical Treatment of Data

The study will utilize statistical test such as weighted mean to determine how acceptable

the proposed system is. Data will be analyzed, interpreted and presented in tables and

graphical forms. It needed to be organized first before analyzing and to be presented in to

tables and graphical forms. The easiest way to do this through the measures of mean.

These will help the researchers to explain how the data are concentrated.

Table 8. “Likert Scale”

Rating
Scale Range

5 Very Acceptable 4.50 - 5.0

4 Acceptable 3.5 - 4.49

3 Moderately Acceptable 2.5 - 3.49

31
2 Limited in Acceptability 1.5 - 2.49

1 Not Acceptable 1.0 -1.49

Table 9. “Criteria for System Evaluation.”

Criteria Indicator

 System can set appointment schedule


Performance
 It was simple to use this system

 The records can’t be simply accessed or edited by the user


Security
 Only the client can access the admin control
 The buttons are well organized and can be seen easily
Usability
 It was easy to find the information I needed
Interface
Adequacy  Interface meet the personal standard

Standard  Meets the standard required

Functionality  The functions of the system are reliable

Acceptability of the Tata Simeon Quality Inventory System

Assessment of the developed Inventory System is important to determine its acceptability

and efficiency. Acceptability is determined using 6 criteria defined as follows:

performance, security, usability, interface adequacy, standard and functionality of the

system. Evaluation on the basis of the identified criteria to determine system acceptability

was sought from 1 Client, 2 Personnel, 3 IT Expert, and 4 Users. The result of the

evaluation is presented below with the summarized overall assessments.

32
Table 10 “Tata Simeon Quality Inventory System in terms of performance”

Evaluation Ratings

In Weighted Means
Mean of
Performance Weighted Interpretation
IT Expert Users Means
Client Personnel

System can set


appointment
schedule 4 4.5 4.66 4.75 4.47 Acceptable

It was simple to Very


use this system 5 5 4.66 4.4 4.76
Acceptable
Overall Very
weighted mean 4.5 4.75 4.66 4.62 4.61
Acceptable

Table 10 shows that the Inventory System in terms of Performance is Very Acceptable

because of the all the users, IT expert and the client is satisfied in the performance of the

system and it is user friendly

33
Table 11 “Tata Simeon Quality Inventory System Security”

Evaluation Ratings

In Weighted Means Mean of


Security Weighted Interpretation
Means
Client Personnel IT Expert Users

The records can’t


be simply Very
5 4.5 5 4.5 4.75
Acceptable
accessed or edited
by the user
Only the client
can access the 4 4 4 4.5 4.12 Acceptable
admin control

Overall weighted
4.5 4.25 4.5 4.5 4.43 Acceptable
mean

Table 11 shows that the Inventory System in terms of Security is Acceptable because of

the client is verified to secure the account can edit the personal information of the

personnel. The admin account is the only one can edit the personnel profile and the

record of the inventory.

34
Table 12. “Tata Simeon Quality Inventory System Usability”

Evaluation Ratings

In Weighted Means Mean of


Usability Weighted Interpretation
Means
Client Personnel IT Expert Users

The buttons are


well organized
4 4.5 4.33 4.5 4.33 Acceptable
and can be seen
easily

It was easy to find Very


the information 4 5 4.66 4.5 4.54
needed Acceptable

Overall weighted
4 4.75 4.49 4.5 4.43 Acceptable
mean

Table 12 shows that the Inventory System in terms of Usability is Acceptable because all

the buttons are well organized and the all of item information need is easy to find.

35
Table 13. “Tata Simeon Quality Inventory System Interface Adequacy”

Evaluation Ratings

In Weighted Means Mean of


Interface
Weighted Interpretation
Adequacy Means
Client Personnel IT Expert Users

Interface meet
Very
the personal 5 4.5 4.66 4.5 4.66
acceptable
standard

Overall weighted Very


5 4.5 4.66 4.5 4.66
mean Acceptable

Table 13 shows that the Inventory System in terms of Interface Adequacy is very

acceptable because all of them take this survey and take chance to try our system their

standard in the interface is almost get the standard and standard requirements and it is

good to the eye of the user.

36
Table 14. “Tata Simeon Quality Inventory System Standard”

Evaluation Ratings

In Weighted Means Mean of


Standard Weighted Interpretation
Means
Client Personnel IT Expert Users

Meets the
4 4.5 4 4.5 4.25 Acceptable
standard required

Overall weighted
4 4.5 4 4.5 4.25 Acceptable
mean

Table 14 shows that the Inventory System in terms of Standard is Acceptable because of

our panel give us the required standard in research system and the client, user and IT

expert meets their standard to our system.

37
Table 15. “Tata Simeon Quality Inventory System Functionality”

Evaluation Ratings

In Weighted Means Mean of


Functionality Weighted Interpretation
Means
Client Personnel IT Expert Users

The functions of
the system are 4 4.5 4.33 4.25 4.27 Acceptable
reliable

Overall weighted
4 4.5 4.33 4.25 4.27 Acceptable
mean

Table 15 shows that the Inventory System in terms of Functionality is Acceptable because

of the panel required function to our research system is almost meet the all required

requirements and our client meet the functionality what they want to the system that’s

why our research system is acceptable.

38
Table 16 “General Weighted Means”

Criteria Weighted Means Description

Performance 4.61 Very Acceptable

Security 4.43 Acceptable

Usability 4.43 Acceptable

Interface Adequacy 4.66 Very Acceptable

Standard 4.25 Acceptable

Functionality 4.27 Acceptable

The table 16 Presents the summary of the weighted means and description of the six

indicators of the developed system. From its table, it can be seen that four indicators were

given the highest ratings of 4.66, and 4.61 for the Interface Adequacy and Performance.

High weighted mean of 4.66 for the Interface Adequacy were computed for the system. It

can be said as a whole the evaluators agree that the system is very acceptable as shown

by the computer general weighted mean of 4.66.

39
Chapter 5

Summary, Conclusion, Recommendations

Inventory and Ordering System is a system that provides information needed to

manage stocks of items, information of the different item in stocks and the amount

available. Inventory and Ordering System is the study of people, technology, and

organizations. Information isn’t worth much if it doesn’t serve any purpose. So, the study

is focused on the development of the proposed Inventory and Ordering System for Tata

Simeon Quality. It is located at Paombong Bulacan. The Shop has 1 owner and 2

Assistant. Their works are done manually, from selling items, to files and record keeping.

The designed system aims to utilize and enhance everything.

The researchers used the incremental development research method. Incremental

model is a method of software development where the product is designed, implemented

and tested incrementally (a little more is added each time) until the product is finished. It

involves both development and maintenance. The product is defined as finished when it

satisfies all of its requirements. This method is appropriate for the development of the

system, as this generates working software quickly and early during the software life

cycle, more flexible as it would cost less to change scope and requirements, easier to test

and debug, and so making every risk easier to manage.

40
Summary of Findings

The major focus of the project was the development of a Inventory and Ordering

System for Tata Simeon Quality that will provide a venue for buyers and our owner and

assistant to interact primarily for selling items and checking their stocks. The project

sought to answer the following questions:

Problem 1: What were the current systems being used by the Tata Simeon Quality to

interact with one another?

Currently, Tata Simeon Quality provides a manual files and record keeping, and

Manual Counting of Stocks and Items.

Problem 2: How was the model used in the development of the proposed Inventory

and Ordering System for Tata Simeon Quality?

Incremental development research method was used in the process of developing

the said system. Incremental model is a method of software development where the

product is designed, implemented and tested incrementally (a little more is added each

time) until the product is finished. It involves both development and maintenance.

This method is appropriate for the development of the system, as this generates

working software quickly and early during the software life cycle, more flexible as it

would cost less to change scope and requirements, easier to test and debug, and so

making every risk easier to manage.

41
Problem 3: What were the features of Inventory and Ordering System, for Tata

Simeon Quality?

The system is divided into two, one for the admin/owner and assistant/personel

User Interface. The admin UI contains Products, Categories, Transact, Earnings and

Logs. Products shows the product list of the company and also the add, delete and

updates of the products. Categories is where the list of the categories and description of

the items are show and divided. Transact is where the ordering system occurs, this is

where the owner sells the items and calculates that total amount that needed to pay.

Earning is where the total earning of the shop is totaled. Logs show the history of each

transaction and other movements on the system.

Problem 4: How acceptable was the proposed system in terms of the following:

a. Performance
b. Security
c. Usability
d. Interface Adequacy
e. Standard
f. Functionality

Six indicators were given the highest ratings of 4.66, 4.61, for the interface

adequacy and performance. These are described as very acceptable. On the other hand,

high weighted means of 4.43, 4.43, 4.25, and 4.27 for the security, usability, standard and

functionality which are described as acceptable. It can be said that as a whole, the

evaluators agree that the system is acceptable as shown by the computed general

weighted mean of 4.66.

42
Conclusions

On the basis of the aforementioned findings the following conclusions were derived:

1. Tata Simeon Quality provided a manual way of recording and stocks keeping

for their item records, and ordering items. They use filing cabinets to separate

the categories of the documents, and another separation for each product items.
2. Features of the system included a secure login, this provided the users access to

the website and use its functions. This system is divided into two, one UI for the

Owner/admins and another for personnel.


3. The developmental model used in Tata Simeon Quality proposed system is the

Incremental Method and was found to be the most effective and efficient in

creating an acceptable and proper system.


4. The Inventory and Ordering System is very acceptable in terms of accuracy and

functionality, efficiency, reliability, security, and user-friendliness.

Recommendations

In the light of the findings and conclusions of the study, the following are

recommended:

1. The proposed system developed the Inventory and Ordering System be utilized

by the owners and personnel.


2. Regular evaluation of the system to ensure continuous usage and identify

possible areas that needs improvements or repairs.

43
3. Keep a physical copy of all the item stocks, just in-case of some data loss and

malfunctions.

BIBLIOGRAPHY

(de Alday, Espino, Ragudo, 2010), Retrieved November 20, 2018 from

https://www.academia.edu/30725705/CHAPTER_2_RELATED_LITERATURE_AND_STUDIE
S_Computer-Based_Inventory_System

Bisagas, Arivada, and Tanteo (October 2009) Retrieved November 20, 2018, from

https://blablawriting.com/inventory-system-for-best-choice-rice-dealer-essay

44
StudyMode.com (2012) Retrieved November 20, 2018 from
https://www.academia.edu/16863814/Sales_and_Inventory_System_Thesis_Document
ation

Averion, Gaela, and Libo (2009) Retrieved November 20, 2018 from
https://www.coursehero.com/file/p48nnj60/Third-the-risk-of-fraud-any-computerized-
system-carries-the-risk-of-intrusion/

Schema Mega Center Retrieved November 20, 2018 from


https://www.coursehero.com/file/p7lvias/Sales-and-Inventory-system-for-Schema-
Mega-Center-Also-stated-in-the-research/

U.S. Small Business Administration (2010) Retrieved November 20, 2018 from
https://www.bartleby.com/essay/Foreign-Literature-PKYW429KRZYA
Korean Red Ginseng Enterprise Retrieved November 20,
2018 From https://www.scribd.com/doc/124653038/Inventory-System

“Osaka Sales and Inventory System” Retrieved November 20, 2018 from
https://studymoose.com/foreign-and-local-studies-essay

45
Appendices

Appendix A

46
Appendix B

System Evaluation Form

47
System Evaluation Sheet

Name: __________________________________ Date: ___________________

Company/Position/School/Grade/Year Level/: ______________________________

The researchers are conducting a survey to know if the proposed system meets the following
criteria. Kindly evaluate the proposed system in comparison to the existing system according to Accuracy,
Efficiency, Reliability, Security, User-Friendliness and Functionality

5 – Excellent 4 – Very Good 3 – Good 2 – Fair 1 – Poor

Rating
Criteria Indicator
1 2 3 4 5

System can add and delete items properly


Performance
It was simple to use this system

The records can’t be simply accessed or edit


by the owner or personnel
Security
Only the client can access the admin
control

The buttons are well organized and can be


Usability seen easily

It was easy to find the information I needed

Interface meet the personal standard


Interface
adequacy

Meet the standard required


Standard

The function of the system is reliable


Functionality

______________________________

Signature

Appendix C

48
Figure 8 (Sample Input)
this page is how transaction in the system occurs.

Figure 8.1 (Sample Output)


this tab can see the customers receipt for the recent transaction.

Appendix D

49
Figure 9 (Login Page)

This is the login page. This page is where you enter the registered username and

password to enter the system.

Figure 9.1 (Inventory)

This is the tab where the owner views the product list.

50
Figure 9.2 (Category Tab)

This is the index for the user to add categories.

Figure 9.3 (Update Tab)

This tab shows on where you can update the selected product.

51
Figure 9.4 (Admin Profile)

This is the index for the admin page that shows the profile for the admins.

Figure 9.5 (Transact Tab)

This in index shows how to sell or order products.

52
Figure 9.6 (Transaction History)

This Index shows the previous transaction.

Figure 9.7 (Log Tab)

This form of show the logs that have been made in the system.

53
Figure 9.8 (Loss Tab)

This is where Defective or Broken items are Inserted.

Appendix E

54
Appendix F

55
Main.vb PanelUsers.Show()
RefreshUserView()
Imports MySql.Data.MySqlClient End Sub
Imports System
Imports System.Diagnostics Private Sub Main_Load(sender As Object, e As EventArgs)
Imports System.IO Handles MyBase.Load
Imports PdfSharp Me.CenterToScreen()
Imports PdfSharp.Drawing RefreshProdView()
Imports PdfSharp.Pdf PanelInventory.Location = New Point(215, 143)
Imports MigraDoc.DocumentObjectModel PanelCategories.Location = New Point(215, 143)
Imports MigraDoc.Rendering PanelLogs.Location = New Point(215, 143)
PanelTransact.Location = New Point(215, 143)
Public Class Main PanelEarnings.Location = New Point(215, 143)
Public Shared varSelected As String = "" PanelUsers.Location = New Point(215, 143)
Public Shared varProdSelected As String Hidepanel()
Public Shared varCartSelected As String = ""
Public Shared varTransactSelected As String = "" End Sub
Public Shared varCategory As String = ""
Public Shared varUserSelected As String = "" Sub Hidepanel()
Public Shared varFrom, varExist As Integer PanelInventory.Hide()
Public Shared varInputq, varQuan, varCartQuan PanelCategories.Hide()
Dim vartotal, varAmount, varChange As Integer PanelLogs.Hide()
PanelTransact.Hide()
Private Sub btnProd_Click(sender As Object, e As PanelEarnings.Hide()
EventArgs) Handles btnProd.Click PanelUsers.Hide()
Hidepanel() End Sub
PanelInventory.Show()
RefreshProdView() Private Sub btnAddProd_Click(sender As Object, e As
End Sub EventArgs) Handles btnAddProd.Click
Me.Hide()
Private Sub btnCategories_Click(sender As Object, e As addProduct.Show()
EventArgs) Handles btnCategories.Click End Sub
Hidepanel()
PanelCategories.Show() Public Sub RefreshCategview()
RefreshCategview() Dim query1 As String
End Sub Try
DbFunction.Connect()
Private Sub btnLogs_Click(sender As Object, e As
EventArgs) Handles btnLogs.Click query1 = "select id as 'Category ID', name as 'Category
Hidepanel() Name' from tbl_category order by id ASC"
PanelLogs.Show() dtgCategories.DataSource =
RefreshLogview() DbFunction.ExecAdapter(query1)
End Sub dtgCategories.ClearSelection()
DbFunction.Close()
Private Sub btnTransact_Click(sender As Object, e As Catch ex As Exception
EventArgs) Handles btnTransact.Click MsgBox(ex.Message)
Hidepanel() Finally
PanelTransact.Show() DbFunction.Dispose()
RefreshTransactProdView() End Try
RefreshTransactNo() End Sub
RefreshCartView()
RefreshTotal() Public Sub RefreshProdView()
End Sub Dim query1 As String

Try
Private Sub btnEarnings_Click(sender As Object, e As DbFunction.Connect()
EventArgs) Handles btnEarnings.Click
Hidepanel() query1 = "select tbl_prod.id as 'Product ID',
PanelEarnings.Show() tbl_category.name as 'Category Name', tbl_prod.name as
RefreshEarnings() 'Product Name', tbl_prod.quantity as 'Quantity',
RefreshTotalEarnings() tbl_prod.price as 'Price', tbl_prod.description as 'Description'
End Sub from tbl_prod inner join tbl_category on
tbl_prod.category_id =tbl_category.id order by tbl_prod.id
Private Sub btnUsers_Click(sender As Object, e As ASC"
EventArgs) Handles btnUsers.Click dtgProd.DataSource =
Hidepanel() DbFunction.ExecAdapter(query1)

56
dtgProd.ClearSelection() DbFunction.Close()
DbFunction.Close() Catch ex As Exception
Catch ex As Exception MsgBox(ex.Message)
MsgBox(ex.Message) Finally
Finally DbFunction.Dispose()
DbFunction.Dispose() End Try
End Try End Sub
End Sub
Public Sub RefreshCartView()
Dim query1 As String
Public Sub RefreshLogView() Try
Dim query1 As String DbFunction.Connect()

Try query1 = "select prod_id as 'Product ID', prod_name


DbFunction.Connect() as 'Product Name', quantity as 'Quantity', price as 'Price',
total as 'Total' from tbl_cart where id = '" & txtTransact.Text
query1 = "select id as 'Log ID', category as 'Category', & "' order by id ASC"
description as 'Description', date as 'Date' from tbl_logs dtgCart.DataSource =
order by id DESC" DbFunction.ExecAdapter(query1)
dtgLogs.DataSource = dtgCart.ClearSelection()
DbFunction.ExecAdapter(query1) DbFunction.Close()
dtgLogs.ClearSelection() Catch ex As Exception
DbFunction.Close() MsgBox(ex.Message)
Catch ex As Exception Finally
MsgBox(ex.Message) DbFunction.Dispose()
Finally End Try
DbFunction.Dispose() End Sub
End Try
End Sub
Public Sub RefreshTotal()
Public Sub RefreshTransactNo() vartotal = 0
Dim query1, varNo As String For i = 0 To dtgCart.Rows.Count - 2
vartotal +=
Try Integer.Parse(dtgCart.Rows(i).Cells(4).Value.ToString)
DbFunction.Connect() Next
query1 = "select count(id) from tbl_transact"
varNo = DbFunction.ExecScalar(query1) txtTotal.Text = "PHP " & vartotal.ToString
If varNo = "0" Then End Sub
txtTransact.Text = "1"
Else Public Sub RefreshEarnings()
txtTransact.Text = Integer.Parse(varNo) + 1 Dim query1 As String
End If Try
DbFunction.Connect()
DbFunction.Close() query1 = "select id as 'Transaction ID', totalprice as
Catch ex As Exception 'Total Price', cashtendered as 'Cash Tendered', pchange as
MsgBox(ex.Message) 'Change', handler as 'Processed By', date as 'Date' from
Finally tbl_transact order by id ASC"
DbFunction.Dispose() dtgEarnings.DataSource =
End Try DbFunction.ExecAdapter(query1)
dtgEarnings.ClearSelection()
End Sub DbFunction.Close()
Catch ex As Exception
Public Sub RefreshTransactProdView() MsgBox(ex.Message)
Dim query1 As String Finally
Try DbFunction.Dispose()
DbFunction.Connect() End Try
End Sub
query1 = "select tbl_prod.id as 'Product ID',
tbl_category.name as 'Category Name', tbl_prod.name as Public Sub RefreshTotalEarnings()
'Product Name', tbl_prod.description as 'Description', vartotal = 0
tbl_prod.price as 'Price' from tbl_prod inner join For i = 0 To dtgEarnings.Rows.Count - 2
tbl_category on tbl_prod.category_id = tbl_category.id vartotal +=
where quantity != 0 order by tbl_prod.id ASC" Integer.Parse(dtgEarnings.Rows(i).Cells(1).Value.ToString)
dtgProdT.DataSource = Next
DbFunction.ExecAdapter(query1)
dtgProdT.ClearSelection() txtEarnings.Text = "PHP " & vartotal.ToString

57
End Sub Catch ex As Exception
MsgBox(ex.Message)
Public Sub RefreshUserView() Finally
Dim query1 As String DbFunction.Dispose()
Try End Try
DbFunction.Connect() Else
RefreshProdView()
query1 = "select id as 'User ID', username as End If
'Username', user_type as 'User Type', name as 'Name', tel End Sub
as 'Telephone Number', email as 'Email', status as 'Status'
from tbl_users where id != " & Login.actID & " and status != Private Sub btnAddQuan_Click(sender As Object, e As
'Archived' order by id ASC" EventArgs) Handles btnAddQuan.Click
dtgUsers.DataSource = Dim varTbl, varPk, varVal, varLog As String
DbFunction.ExecAdapter(query1)
dtgUsers.ClearSelection() Try
DbFunction.Close() varInputq = Integer.Parse(InputBox("Enter Quantity",
Catch ex As Exception "Add Quantity"))
MsgBox(ex.Message)
Finally Try
DbFunction.Dispose() DbFunction.Connect()
End Try Dim VarUpdatedq As Integer = 0
End Sub VarUpdatedq = Integer.Parse(varQuan) +
Integer.Parse(varInputq)
Private Sub Button11_Click(sender As Object, e As varTbl = "tbl_prod"
EventArgs) Handles Button11.Click varVal = " quantity = " & VarUpdatedq.ToString
updateProd.Show() varPk = "id = '" & varSelected & "'"
Me.Hide() varLog = "'Product','" & Login.actUser & " Updated
End Sub Quantity to " & VarUpdatedq.ToString & "(added " &
varInputq & ") for Product ID " & varSelected & "', '" &
Private Sub dtgProd_CellClick(sender As Object, e As System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")
DataGridViewCellEventArgs) Handles dtgProd.CellClick & "'"
If e.RowIndex = -1 Then
Return DbFunction.Updatedb(varTbl, varVal, varPk)
Else DbFunction.InsertLog(varLog)
varSelected = DbFunction.Close()
dtgProd.SelectedRows(0).Cells(0).Value.ToString varInputq = 0
varQuan = varQuan = 0
dtgProd.SelectedRows(0).Cells(3).Value.ToString
End If RefreshProdView()
End Sub MsgBox("Successfully Added Quantity")

Private Sub TextBox1_TextChanged(sender As Object, e As Catch ex As Exception


EventArgs) Handles txtSearch.TextChanged MsgBox(ex.Message)
If cmbSearch.Text <> "" Then Finally
Dim query1, varTbl As String DbFunction.Dispose()
If cmbSearch.Text = "Product ID" Then End Try
varTbl = "tbl_prod.id" Catch ex As Exception
ElseIf cmbSearch.Text = "Category" Then MsgBox("invalid input")
varTbl = "tbl_category.name" End Try
Else End Sub
varTbl = "tbl_prod.name"
End If Private Sub btnDeduct_Click(sender As Object, e As
Try EventArgs) Handles btnDeduct.Click
DbFunction.Connect() Dim varTbl, varPk, varVal, varLog As String

query1 = "select tbl_prod.id as 'Product ID', Try


tbl_category.name as 'Category Name', tbl_prod.name as varInputq = Integer.Parse(InputBox("Enter Quantity",
'Product Name', tbl_prod.quantity as 'Quantity', "Deduct Quantity"))
tbl_prod.price as 'Price', tbl_prod.description as 'Description' If varInputq <= varQuan Then
from tbl_prod inner join tbl_category on Try
tbl_prod.category_id = tbl_category.id where " & varTbl & " DbFunction.Connect()
LIKE '%" & txtSearch.Text & "%' order by tbl_prod.id ASC" Dim VarUpdatedq As Integer = 0
dtgProd.DataSource = VarUpdatedq = Integer.Parse(varQuan) -
DbFunction.ExecAdapter(query1) Integer.Parse(varInputq)
varTbl = "tbl_prod"
DbFunction.Close() varVal = " quantity = " & VarUpdatedq.ToString

58
varPk = "id = '" & varSelected & "'" ElseIf cmbLogS.Text = "Category" Then
varLog = "'Product','" & Login.actUser & " varTbl = "category"
Updated Quantity to " & VarUpdatedq.ToString & "(deducted ElseIf cmbLogS.Text = "Description" Then
" & varInputq & ") for Product ID " & varSelected & "', '" & varTbl = "description"
System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt") Else
& "'" varTbl = "date"
End If
DbFunction.Updatedb(varTbl, varVal, varPk) Try
DbFunction.InsertLog(varLog) DbFunction.Connect()
DbFunction.Close()
varInputq = 0 query1 = "select id as 'Log ID', category as
varQuan = 0 'Category', description as 'Description', date as 'Date' from
RefreshProdView() tbl_logs where " & varTbl & " LIKE '%" & txtLogS.Text & "%'
MsgBox("Successfully Deducted Quantity") order by id ASC"
dtgLogs.DataSource =
Catch ex As Exception DbFunction.ExecAdapter(query1)
MsgBox(ex.Message)
Finally DbFunction.Close()
DbFunction.Dispose() Catch ex As Exception
End Try MsgBox(ex.Message)
Else Finally
MsgBox("Invalid input") DbFunction.Dispose()
End If End Try
Catch ex As Exception Else
MsgBox("Invalid input") RefreshLogView()
End Try End If
End Sub End Sub

Private Sub btnAddCateg_Click(sender As Object, e As Private Sub txtSearchT_TextChanged(sender As Object, e


EventArgs) Handles btnAddCateg.Click As EventArgs) Handles txtSearchT.TextChanged
Me.Hide() If cmbSearchT.Text <> "" Then
addCategory.Show() Dim query1, varTbl As String
End Sub If cmbSearchT.Text = "Product ID" Then
varTbl = "tbl_prod.id"
Private Sub btnUpCateg_Click(sender As Object, e As ElseIf cmbSearchT.Text = "Category" Then
EventArgs) Handles btnUpCateg.Click varTbl = "tbl_category.name"
Me.Hide() Else
updateCateg.Show() varTbl = "tbl_prod.name"
End Sub End If

Private Sub dtgCategories_CellClick(sender As Object, e As Try


DataGridViewCellEventArgs) Handles dtgCategories.CellClick DbFunction.Connect()
varSelected =
dtgCategories.SelectedRows(0).Cells(0).Value.ToString query1 = "select tbl_prod.id as 'Product ID',
End Sub tbl_category.name as 'Category Name', tbl_prod.name as
'Product Name', tbl_prod.description as 'Description',
Private Sub btnRemCateg_Click(sender As Object, e As tbl_prod.price as 'Price' from tbl_prod inner join
EventArgs) Handles btnRemCateg.Click tbl_category on tbl_prod.category_id = tbl_category.id
Dim result As DialogResult = MessageBox.Show("Are where " & varTbl & " LIKE '%" & txtSearchT.Text & "%' order
you sure you want to remove this category?", "Remove by tbl_prod.id ASC"
Category", MessageBoxButtons.YesNo) dtgProdT.DataSource =
DbFunction.ExecAdapter(query1)
If result = DialogResult.Yes Then
varFrom = 2 DbFunction.Close()
EnterPassword.Show() Catch ex As Exception
Else MsgBox(ex.Message)
Finally
End If DbFunction.Dispose()
End Sub End Try
Else
Private Sub txtLogS_TextChanged(sender As Object, e As RefreshTransactProdView()
EventArgs) Handles txtLogS.TextChanged End If
If cmbLogS.Text <> "" Then End Sub
Dim query1, varTbl As String
If cmbLogS.Text = "Log ID" Then Private Sub btnAddCart_Click(sender As Object, e As
varTbl = "id" EventArgs) Handles btnAddCart.Click

59
Dim table, row, values, cid, pname, pprice, pquan As MsgBox("Added to Cart")
String DbFunction.Close()
Dim inputq, ptotal, varUpQuan As Integer
Dim res As MySqlDataReader RefreshCartView()
RefreshTransactProdView()
Dim query1, query2, query3 As String RefreshTotal()
varProdSelected = ""
Dim flag1 As Boolean Catch ex As Exception
MsgBox(ex.Message)
Try End Try
If varProdSelected <> "" Then Else
DbFunction.Connect() MsgBox("Insuffucient Quantity")
query1 = "select count(prod_id) from tbl_cart End If
where prod_id = " & varProdSelected & " and id = " & Else
txtTransact.Text MsgBox("Enter valid input for quantity")
varExist = DbFunction.ExecScalar(query1) End If
If varExist = "0" Then Else
DbFunction.Close()
query2 = "select * from tbl_category where name CartAddQuantity()
= '" & varCategory & "'" End If
res = DbFunction.ExecReader(query2) Else
If res.Read Then MsgBox("Select Product to Add")
cid = res.GetString(0) End If
res.Close() Catch ex As Exception
Else MsgBox(ex.Message)
MsgBox("Invalid") Finally
Exit Sub DbFunction.Dispose()
End If End Try
End Sub
query3 = "select * from tbl_prod where id = " &
varProdSelected Private Sub dtgProdT_CellClick(sender As Object, e As
res = DbFunction.ExecReader(query3) DataGridViewCellEventArgs) Handles dtgProdT.CellClick
If res.Read Then If e.RowIndex = -1 Then
pname = res.GetString(2) Return
pprice = res.GetString(4) Else
pquan = res.GetString(3) varProdSelected =
res.Close() dtgProdT.SelectedRows(0).Cells(0).Value.ToString
Else varCategory =
MsgBox("Invalid") dtgProdT.SelectedRows(0).Cells(1).Value.ToString
Exit Sub End If
End If End Sub

Try
inputq = Integer.Parse(InputBox("Enter
Quantity", "Quantity")) Private Sub btnVoid_Click(sender As Object, e As
Catch EventArgs) Handles btnVoid.Click
flag1 = True Dim result As DialogResult = MessageBox.Show("Are
End Try you sure you want to void this product?", "Void Product",
MessageBoxButtons.YesNo)
If flag1 = False Then
If inputq <= pquan Then If result = DialogResult.Yes Then
ptotal = Integer.Parse(pprice) * inputq varFrom = 3
varUpQuan = Integer.Parse(pquan) - inputq EnterPassword.Show()
Else
DbFunction.Updatedb("tbl_prod", " quantity
= " & varUpQuan.ToString, "id = '" & varProdSelected & "'") End If
End Sub
table = "tbl_cart"
row = "id, prod_id, category_id, prod_name, Private Sub btnAddQCart_Click(sender As Object, e As
quantity, price, total" EventArgs) Handles btnAddQCart.Click
values = txtTransact.Text & ",'" & CartAddQuantity()
varProdSelected & "'," & cid & ",'" & pname & "'," & End Sub
inputq.ToString & "," & pprice.ToString & "," & ptotal.ToString
& "" Private Sub btnDeductQCart_Click(sender As Object, e As
Try EventArgs) Handles btnDeductQCart.Click
DbFunction.Insertdb(table, row, values) Dim res As MySqlDataReader

60
End Try
Dim query1, pquan, pprice As String
Dim inputq, ptotal, varUpQuan, varUpCartQuan As End Sub
Integer
Dim flag1 As Boolean Private Sub btnCheckout_Click(sender As Object, e As
inputq = 0 EventArgs) Handles btnCheckout.Click
ptotal = 0 Dim table, row, values, varLog, query1 As String
varUpQuan = 0 Dim hasProduct As Integer
Try Dim flag1 As Boolean
If varCartSelected <> "" Then varAmount = 0
varChange = 0
DbFunction.Connect() Try
DbFunction.Connect()
query1 = "select * from tbl_prod where id = " & query1 = "select count(prod_id) from tbl_cart where
varCartSelected id = " & txtTransact.Text
hasProduct = DbFunction.ExecScalar(query1)
res = DbFunction.ExecReader(query1)
If res.Read Then If hasProduct <> "0" Then
pquan = res.GetString(3) Try
pprice = res.GetString(4) varAmount = Integer.Parse(InputBox("Enter
res.Close() Amount", "Checkout"))
Else Catch
MsgBox("Invalid") flag1 = True
Exit Sub End Try
End If
If flag1 = "False" Then
Try If varAmount >= vartotal Then
inputq = Integer.Parse(InputBox("Enter Quantity", varChange = varAmount - vartotal
"Quantity"))
Catch table = "tbl_transact"
flag1 = True row = "id, cart_id, totalprice, cashtendered,
End Try pchange, handler, date"
values = txtTransact.Text & "," &
If flag1 = False Then txtTransact.Text & "," & vartotal & "," & varAmount & "," &
If inputq <= varCartQuan Then varChange & ",'" & Login.actUser & "','" &
varUpQuan = Integer.Parse(pquan) + inputq System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")
& "'"
varUpCartQuan = Integer.Parse(varCartQuan) -
inputq varLog = "'Transaction','" & Login.actUser & "
ptotal = Integer.Parse(pprice) * varUpCartQuan Processed Transaction No " & txtTransact.Text & "', '" &
DbFunction.Updatedb("tbl_prod", " quantity = System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")
" & varUpQuan.ToString, "id = '" & varCartSelected & "'") & "'"
DbFunction.Updatedb("tbl_cart", " quantity = "
& varUpCartQuan & ", total = " & ptotal, "prod_id = '" & DbFunction.Insertdb(table, row, values)
varCartSelected & "'")
DbFunction.InsertLog(varLog)
DbFunction.Close()
DbFunction.Close()
RefreshCartView()
RefreshTransactProdView() PrintReceipt()
RefreshTotal() System.Threading.Thread.Sleep(2000)
Else RefreshTransactNo()
MsgBox("Invalid Quantity") RefreshCartView()
End If RefreshTransactProdView()
Else RefreshTotal()
MsgBox("Enter valid input for quantity")
End If Else
Else MsgBox("Insufficient Amount")
MsgBox("Choose Product to Add Quantity") End If
Exit Sub Else
End If MsgBox("Enter Valid Amount")
End If
Catch ex As Exception Else
MsgBox(ex.Message) MsgBox("Add Product to Cart")
Finally End If
DbFunction.Dispose()

61
Catch ex As Exception from tbl_users where " & varTbl & " LIKE '%" & txtSUser.Text
MsgBox(ex.Message) & "%' and status != 'Archived' order by id ASC"
Finally dtgUsers.DataSource =
DbFunction.Dispose() DbFunction.ExecAdapter(query1)
End Try dtgUsers.ClearSelection()
End Sub
DbFunction.Close()
Private Sub txtSEarnings_TextChanged(sender As Object, e Catch ex As Exception
As EventArgs) Handles txtSEarnings.TextChanged MsgBox(ex.Message)
If cmbEarnings.Text <> "" Then Finally
Dim query1, varTbl As String DbFunction.Dispose()
If cmbEarnings.Text = "Transaction ID" Then End Try
varTbl = "id" Else
ElseIf cmbEarnings.Text = "Processed By" Then RefreshUserView()
varTbl = "handler" End If
Else End Sub
varTbl = "date"
End If Private Sub dtgEarnings_CellDoubleClick(sender As Object,
e As DataGridViewCellEventArgs) Handles
Try dtgEarnings.CellDoubleClick
DbFunction.Connect() If e.RowIndex = -1 Then
query1 = "select id as 'Transaction ID', totalprice as Return
'Total Price', cashtendered as 'Cash Tendered', pchange as Else
'Change', handler as 'Processed By', date as 'Date' from varTransactSelected =
tbl_transact where " & varTbl & " LIKE '%" & dtgEarnings.SelectedRows(0).Cells(0).Value.ToString
txtSEarnings.Text & "%' order by id ASC" Me.Hide()
dtgEarnings.DataSource = viewTransaction.Show()
DbFunction.ExecAdapter(query1) End If
End Sub
DbFunction.Close() Private Sub btnAddUser_Click(sender As Object, e As
Catch ex As Exception EventArgs) Handles btnAddUser.Click
MsgBox(ex.Message) Me.Hide()
Finally addUSer.Show()
DbFunction.Dispose() End Sub
End Try
Else Private Sub dtgUsers_CellClick(sender As Object, e As
RefreshEarnings() DataGridViewCellEventArgs) Handles dtgUsers.CellClick
End If If e.RowIndex = -1 Then
End Sub Return
Else
varUserSelected =
Private Sub txtSUser_TextChanged(sender As Object, e As dtgUsers.SelectedRows(0).Cells(0).Value.ToString
EventArgs) Handles txtSUser.TextChanged End If
If cmbSUser.Text <> "" Then End Sub
Dim query1, varTbl As String
If cmbSUser.Text = "User ID" Then Private Sub btnUpdateUser_Click(sender As Object, e As
varTbl = "id" EventArgs) Handles btnUpdateUser.Click
ElseIf cmbSUser.Text = "Username" Then Me.Hide()
varTbl = "username" updateUser.Show()
ElseIf cmbSUser.Text = "User Type" Then End Sub
varTbl = "user_type"
ElseIf cmbSUser.Text = "Name" Then Private Sub btnRemUser_Click(sender As Object, e As
varTbl = "name" EventArgs) Handles btnRemUser.Click
ElseIf cmbSUser.Text = "Email" Then Dim result As DialogResult = MessageBox.Show("Are
varTbl = "email" you sure you want to remove this user?", "Remove User",
Else MessageBoxButtons.YesNo)
varTbl = "status"
End If If result = DialogResult.Yes Then
varFrom = 4
Try EnterPassword.Show()
DbFunction.Connect() Else

query1 = "select id as 'User ID', username as End If


'Username', user_type as 'User Type', name as 'Name', tel End Sub
as 'Telephone Number', email as 'Email', status as 'Status'

62
Private Sub dtgCart_CellClick(sender As Object, e As query1 = "Select * from tbl_prod where id = " &
DataGridViewCellEventArgs) Handles dtgCart.CellClick varCartSelected
If e.RowIndex = -1 Then res = DbFunction.ExecReader(query1)
Return If res.Read Then
Else pquan = res.GetString(3)
varCartSelected = pprice = res.GetString(4)
dtgCart.SelectedRows(0).Cells(0).Value.ToString res.Close()
varCartQuan = Else
dtgCart.SelectedRows(0).Cells(2).Value.ToString MsgBox("Invalid")
End If Exit Sub
End Sub End If
Else
Private Sub btnRem_Click(sender As Object, e As MsgBox("Choose Product To Add Quantity")
EventArgs) Handles btnRem.Click Exit Sub
Dim result As DialogResult = MessageBox.Show("Are End If
you sure you want To remove this product?", "Remove End If
Product", MessageBoxButtons.YesNo)

If result = DialogResult.Yes Then Try


varFrom = 1 inputq = Integer.Parse(InputBox("Enter Quantity",
EnterPassword.Show() "Quantity"))
Else Catch
flag1 = True
End If End Try

End Sub If flag1 = False Then


If inputq <= pquan Then
Public Sub CartAddQuantity() varUpQuan = Integer.Parse(pquan) - inputq
Dim res As MySqlDataReader
If varExist = "1" Then
Dim query1, pquan, pprice, cartquan As String varUpCartQuan = Integer.Parse(cartquan) +
Dim inputq, ptotal, varUpQuan, varUpCartQuan As inputq
Integer ptotal = Integer.Parse(pprice) * varUpCartQuan
Dim flag1 As Boolean DbFunction.Updatedb("tbl_prod", " quantity =
inputq = 0 " & varUpQuan.ToString, "id = '" & varProdSelected & "'")
ptotal = 0 DbFunction.Updatedb("tbl_cart", " quantity = "
varUpQuan = 0 & varUpCartQuan & ", total = " & ptotal, "prod_id = '" &
varProdSelected & "'")
Try Else
DbFunction.Connect() varUpCartQuan = Integer.Parse(varCartQuan) +
If varExist = "1" Then inputq
query1 = "Select * from tbl_cart where prod_id = " ptotal = Integer.Parse(pprice) * varUpCartQuan
& varProdSelected DbFunction.Updatedb("tbl_prod", " quantity =
res = DbFunction.ExecReader(query1) " & varUpQuan.ToString, "id = '" & varCartSelected & "'")
If res.Read Then DbFunction.Updatedb("tbl_cart", " quantity = "
cartquan = res.GetString(4) & varUpCartQuan & ", total = " & ptotal, "prod_id = '" &
res.Close() varCartSelected & "'")
Else End If
MsgBox("Invalid") DbFunction.Close()
End
End If RefreshCartView()
query1 = "Select * from tbl_prod where id = " & RefreshTransactProdView()
varProdSelected RefreshTotal()
varCartSelected = ""
res = DbFunction.ExecReader(query1) varSelected = ""
If res.Read Then Else
pquan = res.GetString(3) MsgBox("Insuffucient Quantity")
pprice = res.GetString(4) End If
res.Close() Else
Else MsgBox("Enter valid input for quantity")
MsgBox("Invalid") End If
Exit Sub
End If Catch ex As Exception
Else MsgBox(ex.Message)
If varCartSelected <> "" Then Finally
DbFunction.Dispose()

63
End Try row.Format.Font.Bold = True
row.Shading.Color = Colors.AliceBlue
End Sub row.Cells(0).AddParagraph("ID")
row.Cells(1).AddParagraph("Category")
Private Sub btnPrintLog_Click(sender As Object, e As row.Cells(2).AddParagraph("Description")
EventArgs) Handles btnPrintLog.Click row.Cells(3).AddParagraph("Date")
Dim result As DialogResult = MessageBox.Show("Do you
want to print this Log?", "logs", MessageBoxButtons.YesNo) For i = 0 To dtgLogs.Rows.Count - 2
varLId = dtgLogs.Item(0, i).Value
If result = DialogResult.Yes Then varLCAteg = dtgLogs.Item(1, i).Value
Try varLDesc = dtgLogs.Item(2, i).Value
Dim varLId, varLCAteg, varLDesc, varLDate As String varLDate = dtgLogs.Item(3, i).Value
Dim doc As New Document
doc.Info.Title = "Logs" Dim row1 = table.AddRow
row1.Cells(0).AddParagraph(varLId)
Dim mystyle As Style = row1.Cells(1).AddParagraph(varLCAteg)
doc.Styles.Item(StyleNames.Normal) row1.Cells(2).AddParagraph(varLDesc)
mystyle.Font.Name = "Verdana" row1.Cells(3).AddParagraph(varLDate)
mystyle.Font.Size = 9 Next

mystyle = doc.Styles.AddStyle("Table", "Normal") Dim myRenderer As PdfDocumentRenderer = New


PdfDocumentRenderer
mystyle = doc.Styles.Item(StyleNames.Heading1) myRenderer.Document = doc
mystyle.Font.Name = "Arial" myRenderer.RenderDocument()
mystyle.Font.Size = 16
mystyle.Font.Bold = True Dim filename As String = "log.pdf"
mystyle.ParagraphFormat.Alignment =
ParagraphAlignment.Center myRenderer.PdfDocument.Save(filename)
Process.Start(filename)

Dim section As Section = doc.AddSection Catch ex As Exception


Dim header = section.AddParagraph MsgBox(ex.ToString)
End Try
Dim myHeader As Paragraph = Else
section.AddParagraph("LOGS")
myHeader.Style = StyleNames.Heading1 End If

Dim myspacing As Paragraph = End Sub


section.AddParagraph("")
myHeader.Style = StyleNames.Heading1 Private Sub btnPrintProd_Click(sender As Object, e As
EventArgs) Handles btnPrintProd.Click
Dim table = section.AddTable() Dim result As DialogResult = MessageBox.Show("Do you
want to print Product Details?", "Products",
table.Style = "Table" MessageBoxButtons.YesNo)
table.Borders.Width = 0.25
table.Borders.Left.Width = 0.5 If result = DialogResult.Yes Then
table.Borders.Right.Width = 0.5 Try
table.Rows.LeftIndent = 0 Dim varPId, varPCAteg, varPName, varPDesc,
varPQuan, varPprice As String
Dim column = table.AddColumn("1cm") Dim doc As New Document
column.Format.Alignment = doc.Info.Title = "Products"
ParagraphAlignment.Left
column = table.AddColumn("2.5cm") Dim mystyle As Style =
column.Format.Alignment = doc.Styles.Item(StyleNames.Normal)
ParagraphAlignment.Left mystyle.Font.Name = "Verdana"
column = table.AddColumn("10cm") mystyle.Font.Size = 9
column.Format.Alignment =
ParagraphAlignment.Left mystyle = doc.Styles.AddStyle("Table", "Normal")
column = table.AddColumn("2.5cm")
column.Format.Alignment = mystyle = doc.Styles.Item(StyleNames.Heading1)
ParagraphAlignment.Left mystyle.Font.Name = "Arial"
mystyle.Font.Size = 16
Dim row = table.AddRow mystyle.Font.Bold = True
row.HeadingFormat = True mystyle.ParagraphFormat.Alignment =
row.Format.Alignment = ParagraphAlignment.Center
ParagraphAlignment.Center

64
row1.Cells(5).AddParagraph(varPDesc)
Dim section As Section = doc.AddSection Next
Dim header = section.AddParagraph
Dim myRenderer As PdfDocumentRenderer = New
Dim myHeader As Paragraph = PdfDocumentRenderer
section.AddParagraph("PRODUCTS") myRenderer.Document = doc
myHeader.Style = StyleNames.Heading1 myRenderer.RenderDocument()

Dim myspacing As Paragraph = Dim filename As String = "products.pdf"


section.AddParagraph("")
myHeader.Style = StyleNames.Heading1 myRenderer.PdfDocument.Save(filename)
Process.Start(filename)
Dim table = section.AddTable()
Catch ex As Exception
table.Style = "Table" MsgBox(ex.ToString)
table.Borders.Width = 0.25 End Try
table.Borders.Left.Width = 0.5 Else
table.Borders.Right.Width = 0.5
table.Rows.LeftIndent = 0 End If
End Sub
Dim column = table.AddColumn("1.5cm")
column.Format.Alignment = Private Sub btnArch_Click(sender As Object, e As
ParagraphAlignment.Center EventArgs) Handles btnArch.Click
column = table.AddColumn("3.5cm") Me.Hide()
column.Format.Alignment = viewArchived.Show()
ParagraphAlignment.Left
column = table.AddColumn("2.5cm") End Sub
column.Format.Alignment =
ParagraphAlignment.Left Private Sub Button2_Click(sender As Object, e As
column = table.AddColumn("1.75cm") EventArgs) Handles Button2.Click
column.Format.Alignment = Dim result As DialogResult = MessageBox.Show("Are
ParagraphAlignment.Center you sure you want to Logout?", "Logout",
column = table.AddColumn("1.75cm") MessageBoxButtons.YesNo)
column.Format.Alignment =
ParagraphAlignment.Center If result = DialogResult.Yes Then
column = table.AddColumn("5cm")
column.Format.Alignment = Try
ParagraphAlignment.Left DbFunction.Connect()
DbFunction.InsertLog("'User', '" & Login.actUser & "
Dim row = table.AddRow Logged Out', '" &
row.HeadingFormat = True System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")
row.Format.Alignment = & "'")
ParagraphAlignment.Center DbFunction.Close()
row.Format.Font.Bold = True Catch ex As Exception
row.Shading.Color = Colors.AliceBlue MsgBox(ex.Message)
row.Cells(0).AddParagraph("Product ID") Finally
row.Cells(1).AddParagraph("Category") DbFunction.Dispose()
row.Cells(2).AddParagraph("Product Name") End Try
row.Cells(3).AddParagraph("Quantity") Me.Dispose()
row.Cells(4).AddParagraph("Price") Login.Show()
row.Cells(5).AddParagraph("Description") Else

For i = 0 To dtgProd.Rows.Count - 2 End If


varPId = dtgProd.Item(0, i).Value End Sub
varPCAteg = dtgProd.Item(1, i).Value
varPName = dtgProd.Item(2, i).Value Private Sub Main_FormClosing(sender As Object, e As
varPQuan = dtgProd.Item(3, i).Value FormClosingEventArgs) Handles MyBase.FormClosing
varPprice = dtgProd.Item(4, i).Value Dim result As DialogResult = MessageBox.Show("Are
varPDesc = dtgProd.Item(5, i).Value you sure you want to Logout?", "Logout",
MessageBoxButtons.YesNo)
Dim row1 = table.AddRow
row1.Cells(0).AddParagraph(varPId) If result = DialogResult.Yes Then
row1.Cells(1).AddParagraph(varPCAteg)
row1.Cells(2).AddParagraph(varPName) Try
row1.Cells(3).AddParagraph(varPQuan) DbFunction.Connect()
row1.Cells(4).AddParagraph(varPprice)

65
DbFunction.InsertLog("'User', '" & Login.actUser & " table.Borders.Left.Width = 0.5
Logged Out', '" & table.Borders.Right.Width = 0.5
System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt") table.Rows.LeftIndent = 0
& "'")
DbFunction.Close() Dim column = table.AddColumn("2.5cm")
Catch ex As Exception column.Format.Alignment =
MsgBox(ex.Message) ParagraphAlignment.Center
Finally column = table.AddColumn("2.5cm")
DbFunction.Dispose() column.Format.Alignment =
End Try ParagraphAlignment.Right
Me.Dispose() column = table.AddColumn("2.5cm")
Login.Show() column.Format.Alignment =
Else ParagraphAlignment.Right
e.Cancel = True column = table.AddColumn("2.5cm")
End If column.Format.Alignment =
End Sub ParagraphAlignment.Right
column = table.AddColumn("2.5cm")
Private Sub btnPrintTransact_Click(sender As Object, e As column.Format.Alignment =
EventArgs) Handles btnPrintTransact.Click ParagraphAlignment.Center
Dim result As DialogResult = MessageBox.Show("Do you column = table.AddColumn("3cm")
want to print Transaction Details?", "Transaction", column.Format.Alignment =
MessageBoxButtons.YesNo) ParagraphAlignment.Left

If result = DialogResult.Yes Then Dim row = table.AddRow


Try row.HeadingFormat = True
Dim varTId, varTPrice, varTendered, varTChange, row.Format.Alignment =
varTProcBy, varTDate As String ParagraphAlignment.Center
Dim doc As New Document row.Format.Font.Bold = True
doc.Info.Title = "Products" row.Shading.Color = Colors.AliceBlue
row.Cells(0).AddParagraph("Transaction ID")
Dim mystyle As Style = row.Cells(1).AddParagraph("Total Price")
doc.Styles.Item(StyleNames.Normal) row.Cells(2).AddParagraph("Cash Tendered")
mystyle.Font.Name = "Verdana" row.Cells(3).AddParagraph("Change")
mystyle.Font.Size = 9 row.Cells(4).AddParagraph("Processed By")
row.Cells(5).AddParagraph("Date")
mystyle = doc.Styles.AddStyle("Table", "Normal")
For i = 0 To dtgEarnings.Rows.Count - 2
mystyle = doc.Styles.Item(StyleNames.Heading1) varTId = dtgEarnings.Item(0, i).Value
mystyle.Font.Name = "Arial" varTPrice = dtgEarnings.Item(1, i).Value
mystyle.Font.Size = 16 varTendered = dtgEarnings.Item(2, i).Value
mystyle.Font.Bold = True varTChange = dtgEarnings.Item(3, i).Value
mystyle.ParagraphFormat.Alignment = varTProcBy = dtgEarnings.Item(4, i).Value
ParagraphAlignment.Center varTDate = dtgEarnings.Item(5, i).Value

mystyle = doc.Styles.Item(StyleNames.Heading9) Dim row1 = table.AddRow


mystyle.Font.Name = "Arial" row1.Cells(0).AddParagraph(varTId)
mystyle.Font.Size = 12 row1.Cells(1).AddParagraph(varTPrice)
mystyle.ParagraphFormat.Alignment = row1.Cells(2).AddParagraph(varTendered)
ParagraphAlignment.Right row1.Cells(3).AddParagraph(varTChange)
row1.Cells(4).AddParagraph(varTProcBy)
row1.Cells(5).AddParagraph(varTDate)
Dim section As Section = doc.AddSection Next
Dim header = section.AddParagraph
section.AddParagraph("")
Dim myHeader As Paragraph = myHeader.Style = StyleNames.Heading1
section.AddParagraph("Transactions")
myHeader.Style = StyleNames.Heading1 Dim TotalEarn As Paragraph =
section.AddParagraph("Total Earnings: " & txtEarnings.Text)
Dim myspacing As Paragraph = TotalEarn.Style = StyleNames.Heading9
section.AddParagraph("")
myHeader.Style = StyleNames.Heading1 Dim myRenderer As PdfDocumentRenderer = New
PdfDocumentRenderer
Dim table = section.AddTable() myRenderer.Document = doc
myRenderer.RenderDocument()
table.Style = "Table"
table.Borders.Width = 0.25 Dim filename As String = "earnings.pdf"

66
column = table.AddColumn("3cm")
myRenderer.PdfDocument.Save(filename) column.Format.Alignment =
Process.Start(filename) ParagraphAlignment.Center
column = table.AddColumn("3cm")
Catch ex As Exception column.Format.Alignment = ParagraphAlignment.Left
MsgBox(ex.ToString) column = table.AddColumn("3cm")
End Try column.Format.Alignment = ParagraphAlignment.Left
Else
Dim row = table.AddRow
End If row.HeadingFormat = True
End Sub row.Format.Alignment = ParagraphAlignment.Center
row.Format.Font.Bold = True
Sub PrintReceipt() row.Shading.Color = Colors.AliceBlue
Try row.Cells(0).AddParagraph("Product ID")
Dim varCId, varCName, varCquan, varCPrice, varCtotal row.Cells(1).AddParagraph("Product Name")
As String row.Cells(2).AddParagraph("Quantity")
Dim doc As New Document row.Cells(3).AddParagraph("Price")
doc.Info.Title = "Receipt" row.Cells(4).AddParagraph("Total Price")

Dim mystyle As Style = For i = 0 To dtgCart.Rows.Count - 2


doc.Styles.Item(StyleNames.Normal) varCId = dtgCart.Item(0, i).Value
mystyle.Font.Name = "Verdana" varCName = dtgCart.Item(1, i).Value
mystyle.Font.Size = 9 varCquan = dtgCart.Item(2, i).Value
mystyle.ParagraphFormat.Alignment = varCPrice = dtgCart.Item(3, i).Value
ParagraphAlignment.Left varCtotal = dtgCart.Item(4, i).Value

mystyle = doc.Styles.AddStyle("Table", "Normal") Dim row1 = table.AddRow


row1.Cells(0).AddParagraph(varCId)
mystyle = doc.Styles.Item(StyleNames.Heading1) row1.Cells(1).AddParagraph(varCName)
mystyle.Font.Name = "Arial" row1.Cells(2).AddParagraph(varCquan)
mystyle.Font.Size = 16 row1.Cells(3).AddParagraph(varCPrice)
mystyle.Font.Bold = True row1.Cells(4).AddParagraph(varCtotal)
mystyle.ParagraphFormat.Alignment =
ParagraphAlignment.Center Next

mystyle = doc.Styles.Item(StyleNames.Heading9) section.AddParagraph("")


mystyle.Font.Name = "Arial"
mystyle.Font.Size = 9
mystyle.ParagraphFormat.Alignment = Dim total = section.AddParagraph("Total Price: " &
ParagraphAlignment.Right txtTotal.Text)
total.AddLineBreak()
total.AddText("Cash Tendered: " & varamount)
Dim section As Section = doc.AddSection total.AddLineBreak()
Dim header = section.AddParagraph total.AddText("Change: " & varchange)

section.AddParagraph("Transaction ID: " & total.Style = StyleNames.Heading9


txtTransact.Text)
section.AddParagraph("Processed By: " & Dim myRenderer As PdfDocumentRenderer = New
Login.actUser) PdfDocumentRenderer
section.AddParagraph("Date: " & myRenderer.Document = doc
System.DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")) myRenderer.RenderDocument()
section.AddParagraph("")
Dim filename As String = "receipt.pdf"
Dim table = section.AddTable()
myRenderer.PdfDocument.Save(filename)
table.Style = "Table" Process.Start(filename)
table.Borders.Width = 0.25
table.Borders.Left.Width = 0.5 Catch ex As Exception
table.Borders.Right.Width = 0.5 MsgBox(ex.ToString)
table.Rows.LeftIndent = 0 End Try
End Sub
Dim column = table.AddColumn("3cm")
column.Format.Alignment = Private Sub btnPrintUser_Click(sender As Object, e As
ParagraphAlignment.Center EventArgs) Handles btnPrintUser.Click
column = table.AddColumn("3cm")
column.Format.Alignment = ParagraphAlignment.Left

67
Dim result As DialogResult = MessageBox.Show("Do you column = table.AddColumn("3.5cm")
want to print User Details?", "User", column.Format.Alignment =
MessageBoxButtons.YesNo) ParagraphAlignment.Left

If result = DialogResult.Yes Then Dim row = table.AddRow


Try row.HeadingFormat = True
Dim varTId, varTPrice, varTendered, varTChange, row.Format.Alignment =
varTProcBy, varTDate As String ParagraphAlignment.Center
Dim doc As New Document row.Format.Font.Bold = True
doc.Info.Title = "Users" row.Shading.Color = Colors.AliceBlue
row.Cells(0).AddParagraph("User ID")
Dim mystyle As Style = row.Cells(1).AddParagraph("Username")
doc.Styles.Item(StyleNames.Normal) row.Cells(2).AddParagraph("User Type")
mystyle.Font.Name = "Verdana" row.Cells(3).AddParagraph("Name")
mystyle.Font.Size = 9 row.Cells(4).AddParagraph("Contact")
row.Cells(5).AddParagraph("Email")
mystyle = doc.Styles.AddStyle("Table", "Normal")
For i = 0 To dtgUsers.Rows.Count - 2
mystyle = doc.Styles.Item(StyleNames.Heading1) Dim row1 = table.AddRow
mystyle.Font.Name = "Arial" row1.Cells(0).AddParagraph(dtgUsers.Item(0,
mystyle.Font.Size = 16 i).Value)
mystyle.Font.Bold = True row1.Cells(1).AddParagraph(dtgUsers.Item(1,
mystyle.ParagraphFormat.Alignment = i).Value)
ParagraphAlignment.Center row1.Cells(2).AddParagraph(dtgUsers.Item(2,
i).Value)
mystyle = doc.Styles.Item(StyleNames.Heading9) row1.Cells(3).AddParagraph(dtgUsers.Item(3,
mystyle.Font.Name = "Arial" i).Value)
mystyle.Font.Size = 12 row1.Cells(4).AddParagraph(dtgUsers.Item(4,
mystyle.ParagraphFormat.Alignment = i).Value)
ParagraphAlignment.Right row1.Cells(5).AddParagraph(dtgUsers.Item(5,
i).Value)
Next
Dim section As Section = doc.AddSection
Dim header = section.AddParagraph section.AddParagraph("")
myHeader.Style = StyleNames.Heading1
Dim myHeader As Paragraph =
section.AddParagraph("Users") Dim myRenderer As PdfDocumentRenderer = New
myHeader.Style = StyleNames.Heading1 PdfDocumentRenderer
myRenderer.Document = doc
Dim myspacing As Paragraph = myRenderer.RenderDocument()
section.AddParagraph("")
myHeader.Style = StyleNames.Heading1 Dim filename As String = "users.pdf"

Dim table = section.AddTable() myRenderer.PdfDocument.Save(filename)


Process.Start(filename)
table.Style = "Table"
table.Borders.Width = 0.25 Catch ex As Exception
table.Borders.Left.Width = 0.5 MsgBox(ex.ToString)
table.Borders.Right.Width = 0.5 End Try
table.Rows.LeftIndent = 0 Else

Dim column = table.AddColumn("2.0cm") End If


column.Format.Alignment = End Sub
ParagraphAlignment.Center
column = table.AddColumn("2.5cm") End Class
column.Format.Alignment =
ParagraphAlignment.Left DBFunction.vb
column = table.AddColumn("2.5cm")
column.Format.Alignment = Imports MySql.Data.MySqlClient
ParagraphAlignment.Left
column = table.AddColumn("3.5cm") Public Class DbFunction
column.Format.Alignment = Shared MysqlConn As New
ParagraphAlignment.Left MySqlConnection("server=localhost;user
column = table.AddColumn("2.5cm") id=root;password=;database=db_inventory")
column.Format.Alignment = Shared READER As MySqlDataReader
ParagraphAlignment.Left

68
Dim query = "DELETE FROM " & table & " WHERE " & pk
Public Shared Sub Connect() Dim command = New MySqlCommand(query,
MysqlConn.Open() MysqlConn)
End Sub 'MsgBox(query)
command.ExecuteNonQuery()
Public Shared Function ExecReader(ByVal query As String) End Sub
Dim Command = New MySqlCommand(query,
MysqlConn) Public Shared Sub LoadCateg(ByVal varcmb As Object)
READER = Command.ExecuteReader Dim query1 As String

Return READER Try


End Function DbFunction.Connect()
query1 = "select name from tbl_category"
Public Shared Function ExecScalar(ByVal query As String) varcmb.DataSource = New
Dim varRes BindingSource(DbFunction.ExecAdapter(query1), Nothing)
Dim Command = New MySqlCommand(query, varcmb.DisplayMember = "name"
MysqlConn)
varRes = Command.ExecuteScalar DbFunction.Close()
Catch ex As Exception
Return varRes.ToString MsgBox(ex.Message)
End Function Finally
DbFunction.Dispose()
Public Shared Function ExecAdapter(ByVal query As String) End Try
Dim table As New DataTable End Sub
Dim adapter = New MySqlDataAdapter(query,
MysqlConn) Public Shared Sub Close()
adapter.Fill(table) MysqlConn.Close()
Return table End Sub
End Function
Public Shared Sub Dispose()
Public Shared Sub Insertdb(ByVal table As String, ByVal MysqlConn.dispose()
rows As String, ByVal values As String) End Sub
Dim query = "INSERT INTO " & table & "(" & rows & ") End Class
VALUES (" & values & ")"
Dim command = New MySqlCommand(query,
MysqlConn)
'MsgBox(query)
command.ExecuteNonQuery()
End Sub

Public Shared Sub Updatedb(ByVal table As String, ByVal


values As String, ByVal pk As String)
Dim query = "Update " & table & " SET" & values & "
WHERE " & pk
Dim command = New MySqlCommand(query,
MysqlConn)
'MsgBox(query)
command.ExecuteNonQuery()
End Sub

Public Shared Sub InsertLog(ByVal values As String)


Dim query = "Insert into tbl_logs (category, description,
date) values (" & values & ")"
Dim command = New MySqlCommand(query,
MysqlConn)
'MsgBox(query)
command.ExecuteNonQuery()
End Sub

Public Shared Sub Deletedb(ByVal table As String, ByVal pk


As String)

Appendix G

69
Definition of Terms

Back-End Programming - Refers to the process of your system which cannot be seen by the

users.

Constraints – A limitation or restrictions.

Database – Virtual Storage

Front-End Programming - Refers to the design, typography, colors, and etc for your system.

Hardware – The physical components of your system.

MySQL – My Sequel, is an open sourced relational database management system (RDBMS).

Peopleware – Is a term used to refer to one of the three core aspects of computer technology,

the other two being hardware and software.

RAM (Random Access Memory) – Is a place in the computing device where the operating

system, application program and data in current use are kept so they can be quickly reached by

the device’s processor.

ROM (Read Only Memory) – The main memory of the computer.

SDLC (System Development LifeCycle) – Is a term used in systems engineering, to describe a

process for planning, creating, testing, and deploying an information system.

Schema – Is the skeleton structure that represents the logical view of the entire database.

Software – The applications of your system.

70
Technology – The application of scientific knowledge for practical purposes, especially in

industry.

UI (User Interface) – Describes the design and the main form users see in your system.

User-Friendly – Easy to use and understand.

71

Das könnte Ihnen auch gefallen