You are on page 1of 70

BANGALORE UNIVERSITY

A PROJECT REPORT
ON
“CAFETERIA MANAGEMENT SYSTEM”

Submitted in practical fulfillment for the award of the degree


BACHELOR OF COMPUTER APPLICATION
By
SUREKHA PARASHURAM 198MSB7071
UMASHREE C 198MSB7075

UNDER THE GUIDANCE OF


DR.MOHANA S H
DEPARTMENT OF COMPUTER APPLICATIONS

RNS FIRST GRADE COLLEGE


Channasandra,Bengaluru-560098
2021-2022

-
RNS FIRST GRADE COLLEGE
Channasandra, Bengaluru -560098

CERTIFICATE

This is to certify that SUREKHA PARASHURAM (Register No. 198MSB7071),


UMASHREE C (Register No. 198MSB7075) have successfully completed the project titled
“CAFETERIA MANAGEMENT SYSTEM” at RNS First Grade College under my
supervision and guidance in the fulfilment of requirements of V semester, Bachelor of
Computer Application of Bangalore University, Bangalore.

Signature of the Guide:

Head of the Department Principal

Signature of the Examiners :-

1)...........................

2)...........................
ACKNOWLEDGEMENT

We express my deep sense of gratitude to my guide Dr.MOHANA S H, Department of


Computer Applications for providing valuable suggestions and guidance during the
development, designing and implementation of the project, without which it would not have
been possible to complete the project.
We express my sincere thanks to our beloved Principal, Dr. Sudheer Pai K L, for providing
us all the facilities for laboratory and library.

We express my gratitude to our Vice Principal Prof. Shilpa Sarnad for her continuous
support and assistance during the course of my project.

We wish to reciprocate in full measure the kindness shown by Prof. Ravi K, Head of the
Department who inspired us with his valuable suggestions in successfully completing the
project work.

We express my grateful thanks to all the staff members, Department of Computer


Applications for their valuable assistance, encouragement and co-operation during this
wonderful learning experience.

Finally, We would like to express my sincere thanks to my parents and my friends for the
useful tips and moral support.
CAFETERIA MANAGEMENT SYSTEM

Table of Contents
Chapter 1 Introduction
1.1 Existing System...................................................................................................................2
1.2 Proposed System................................................................................................................2

Chapter 2 System Requirements


2.1 Software requirements.......................................................................................................4
2.2 Hardware requirements......................................................................................................4

Chapter 3 Software Components


3.1 Introduction to Microsoft Visual Basic 2010........................................................................5
3.2 Introduction to SQL Server....................................................................................................7

Chapter 4 Feasibility Study


4.1 Economical Feasibility Study.................................................................................................9
4.2 Technical Feasibility Study.....................................................................................................9
4.3 Behavioral feasibility Study....................................................................................................9
4.4 System Analysis......................................................................................................................9

Chapter 5 ER Diagram
5.1 ER Diagram...........................................................................................................................10

5.2 Dataflow Diagram.................................................................................................................12

Chapter 6 SDLC Diagram


6.1 SDLC.......................................................................................................................................13

Chapter 7 Database
7.1 LoginTable..................................................................................................................................15
7.2 EmployeeTable...........................................................................................................................15
7.3 CustomerTable...........................................................................................................................15
7.4 ManageitemTable......................................................................................................................16
7.5 OrderTable................................................................................................................................16

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 4


CAFETERIA MANAGEMENT SYSTEM

Chapter 8 Screen Shots


8.1 Splashcreen...............................................................................................................17

8.2 Login Form.................................................................................................................17

8.3 SendCode Form.........................................................................................................18

8.4 Reset Form.................................................................................................................18


8.5 MDIForm...................................................................................................................19
8.6 Employee Entry Form.................................................................................................19
8.7 Employee Details Form..............................................................................................20

8.8 Manage Items Form...................................................................................................20


8.9 Customer Form...........................................................................................................21
8.10 Place the Order Form...............................................................................................21
8.11 View Order Form......................................................................................................22

Chapter 9 Testing
9.1 Unit Testing................................................................................................................23

9.2 Block Box Testing.......................................................................................................24


9.3 White Box Testing......................................................................................................25

Chapter 10 Validation
10.1 Software Verification...............................................................................................27

Chapter 11 Source Code


11.1 SPLASH SCREEN......................................................................................................29

11.2 LOGIN FORM...........................................................................................................29

11.3 SENDCODE FORM...................................................................................................30

11.4 RESET FORM...........................................................................................................31

11.5 MDI FORM..............................................................................................................31

11.6 EmployeeDetails FORM..........................................................................................32

11.7 Employee Details CODE.........................................................................................33

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 5


CAFETERIA MANAGEMENT SYSTEM

11.8 Customer CODE.......................................................................................................................35

11.9 Manage Items CODE...............................................................................................................37

11.10 Place the Order CODE............................................................................................................39

11.11 View Order CODE..................................................................................................................42

Chapter 12 Conclusion..................................................................................................45
Bibliography............................................................................................................46

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 6


INTRODUCTION
CAFETERIA MANAGEMENT SYSTEM

PROJECT CATEGORY:
SCOPE:
As this is generic software it can be used by a wide variety of outlets (managers and
customers) to automate the process of manually maintain the record related to the subject of
maintain the transaction flows
GOAL:
The main goal of the application is to maintain the records of stock, billing. details of
purchases and sales and their current financial positions with the company

1.1 EXISTING SYSTEM:


The existing system has some disadvantages. They are as below:
▪ Lack of security data.
▪ More man powers.
▪ Its time consuming.
▪ Consumes large volume of pare work.
▪ Needs manual calculations.
▪ No direct role for the higher officials.
▪ Damage of machines due to lack of attention.
To avoid all these limitations and make the working more accurately the system needs to be
computerized in the effective manner

1.2 PROPOSED SYSTEM:


The main objective of the existing system is to provide a user-friendly interface. The
system, which is proposed now computerized all the details that are maintained manually.
Once the details are fed into the computer there is no need for various persons to deal with
separate sections. Only a single person is enough to maintain all the reports. The security can
also be given as per the requirement of the user
▪ Large volumes of data can be stored with case
▪ Maintenance of file is flexible
▪ Records stored are updated now and then.
▪ Stored data and procedures can be easily edited
▪ Reports can be generated with case
▪ Accurate calculations are made
▪ Less manpower required

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 9


CAFETERIA MANAGEMENT SYSTEM

PROJECT CATEGORY:
SCOPE:
As this is generic software it can be used by a wide variety of outlets (managers and
customers) to automate the process of manually maintain the record related to the subject of
maintain the transaction flows
GOAL:
The main goal of the application is to maintain the records of stock, billing. details of
purchases and sales and their current financial positions with the company

1.1 EXISTING SYSTEM:


The existing system has some disadvantages. They are as below:
▪ Lack of security data.
▪ More man powers.
▪ Its time consuming.
▪ Consumes large volume of pare work.
▪ Needs manual calculations.
▪ No direct role for the higher officials.
▪ Damage of machines due to lack of attention.
To avoid all these limitations and make the working more accurately the system needs to be
computerized in the effective manner

1.2 PROPOSED SYSTEM:


The main objective of the existing system is to provide a user-friendly interface. The
system, which is proposed now computerized all the details that are maintained manually.
Once the details are fed into the computer there is no need for various persons to deal with
separate sections. Only a single person is enough to maintain all the reports. The security can
also be given as per the requirement of the user
▪ Large volumes of data can be stored with case
▪ Maintenance of file is flexible
▪ Records stored are updated now and then.
▪ Stored data and procedures can be easily edited
▪ Reports can be generated with case
▪ Accurate calculations are made
▪ Less manpower required

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 9


CAFETERIA MANAGEMENT SYSTEM

CHARACTERSTICS OF PROPOSED SYSTEM:

USER FRIENDLY:
The proposed system is user friendly because the retrieval and storing of data is fast and
data is maintained efficiently. Moreover, the graphical user interface is provided in the
proposed system, which provides user to deal with the system very easily

REPORTS ARE EASILY GENERATED:


Reports can be easily generated in the proposed system so user can generate the report as
per the requirement (monthly) or in the middle of the session. User can give the notice to the
students so he she become regular

VERY LESS PAPER WORK:


The proposed system requires very less paper work. All the data is feted into the
computer immediately and reports can be generated through computers. Moreover, work
becomes very easy because there is no need to keep data on papers

COMPUTER OPERATOR CONTROL:


Computer operator control will be there so no chance of errors Moreover, storing and
retrieving of information is easy So, work can be done speedily and in time

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 10


SYSTEM
REQUIREMENTS
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 2

SYSTEM REQUIREMENTS:

2.1 HARDWARE REQUIREMENTS:


The hardware thus used here are consists of

Processor: Intel Core i3-8145U2 10GHz


RAM: 4 GB
Graphics :2.30 GHz
Quality: 64-bit Screen
Resolution: 1809
Mouse: Standard Optical

2.2 SOFTWARE REQUIREMENTS:


The software used here consists of

Operating System: Windows 10


Developing Tool: MS Visual Studio 2010
Front End (Design): VB NET
Back End (Database):MS SQL server 18

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 12


SOFTWARE
COMPONENTS
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 3

SOFTWARE COMPONENTS:
3.1 INTRODUCTION TO VISUAL BASIC NET (VB.NET) :
Visual Basic Net is an object-oriented computer programming language
implemented on the Net framework. Although it is an evolution of classic Visual Basic
language, it is not back words-compatible with VB6, and any code written in the old version
does not compile under VB.Net.
Like all other Net languages, VB.Net has complete support for object-oriented concepts
Everything in VB .Net is an object and all objects inherits from the base class object

VB Net is implemented by Microsoft's NET framework. Therefore, it has full access to all
the libraries in the Net framework. It's also possible to run VB Net programs on mono, the
open-source alternative to NET, not only under windows, but even Linux or Mac OSX The
following reasons make VB.Net a widely used professional language
▪ Modern, general purpose.
▪ object oriented.
▪ Component oriented.
▪ Easy to learn.
▪ Structured language.
▪ It produces efficient programs.
▪ It can be compiled on a variety of computer platforms.
▪ Part of NET Framework.

STRONG PROGRAMMING FEATURES OF VB.NET:


VB.Net has numerous strong programming features that make it endearing to multitude of
programmers worldwide. They are:
▪ Boolean conditions.
▪ Automatic garbage collection
▪ Standard library
▪ Assembly versioning
▪ Properties and events.
▪ Delegates and event management.
▪ Easy to use generics
▪ Indexers.
▪ Conditional compilation.
▪ Simple multithreading.

NET FRAMEWORK:

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 14


CAFETERIA MANAGEMENT SYSTEM

The .Net Framework is a revolutionary platform that helps you to write the following types of
applications:
▪ Windows application.
▪ Web applications.
▪ Web services.
The Net Framework applications are multi-platform applications. The framework has been
designed in such a way that it can be used from any of the following languages Visual Basic,
cl, C++, Jscript, and COBAL etc. All these languages can access the framework as well as
communicate with each other. The .NET Framework consists of an enormous library of codes
used by the client language like VB.Net. These languages use object-oriented methodology.
Following are some of the components of the Net Framework:
▪ Common Language Runtime (CLR)
▪ The Net Framework class library
▪ Common language specification
▪ Common Type System
▪ Metadata and assemblies
▪ Windows Forms
▪ ASP Net and ASP Net AJAX
▪ ADO Net
▪ Windows workflow Foundation (WF) • Windows Presentation Foundation
▪ Windows Communication Foundation (WCF)
▪ LINO
INTEGRATED DEVELOPMENT ENVIRONMENT (IDE) FOR VB.NET
Microsoft provides the following development tools for VB.Net programming
▪ Visual Studio 2010(VB)
▪ Visual Basic 2010 Express (VBE)
▪ Visual Web Developer
The last two are free using these tools, you can write all kinds of VB Net programs from
simple command-line applications to more complex applications Visual Basis express and
Visual Web Developer Express edition are trimmed down versions of Visual Studio and has
the same look and feel they retain most features of Visual Studio.
In addition, IDE is also responsible for coordinating and enabling communication between
services All editors, designers project types and other tools are implemented as packages .

Features of IDE are:


▪ Code Editor
▪ Debugger
▪ Designer
3.2 INTRODUCTION TO MICROSOFT SOL SERVER:
Microsoft SQL Server is a relational database management system developed by
Microsoft. A database server, it is a software product with the primary function of storing and

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 15


CAFETERIA MANAGEMENT SYSTEM

retrieving data. Requested by other applications, which may run either on the same computer
or on other computer across a network (Including the internet).
FEATURES OF MS SQL SERVER:
▪ Transparent data Encryption. The ability to encrypt an entire database
▪ Backup encryption Executed at backup time to prevent tampering
▪ External key management Storing keys separate from the data
▪ Auditing Monitoring of data access
▪ Data compression fact table size reduction and improved performance
▪ Resource governor Restrict users or groups from consuming high levels or
resource
▪ Hot plug CPU. Add CPUs on the fly
▪ Performance studio Collection of performance monitoring tools
▪ Installation improvements. Disk images and service pack uninstall packs.
Dynamic development new ADO and Visual studio options as well as dot net
▪ Entity data services. Lines of services (LOB) framework and entity query
language (eSQL).
▪ Data synchronizing. Development of frequently disconnected applications
▪ Large UDT. No size restriction on UDT.
▪ Dates and times. New data types, date, time, date and time off set.
▪ File stream. New data type varbinary (Max) file stream for managing the
binary data
▪ Table value parameters. The ability to pass an entire table to a stored
procedure.
▪ Spatial data. Data type for storing latitude, longitude and GPS entities
▪ SQL Server Integration service. Improved multiprocessor support and faster.
lookups
▪ SQL Server analysis server. Stack improvements, faster, faster block
computations.
▪ SQL Server Reporting server. Improved memory management and better
rendering

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 16


FEASIBILITY STUDY
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 4

FEASIBILITY STUDY
4.1 ECONOMICALLY FEASIBILITY:
The system being developed is economic with respect to School or Collage's point of
view. It is cost effective in the sense that has eliminated the paper work completely.
The system is also time effective because the calculations are automated which are made at
the end of the month or as per the user requirement. The result obtained contains minimum
errors and are highly accurate as the data is required.

4.2 TECHNICAL FEASIBILITY:


The technical requirement for the system is economic and it does not use any other additional
Hardware and software.

4.3 BEHAVIORAL FEASIBILITY:


The system working is quite easy to use and learn due to its simple but attractive interface
User requires no special training for operating the system.

4.4 SYSTEM ANALYSIS:


The terms analysis and synthesis stem from Greek, meaning "to take apart" and "to put
together," respectively. These terms are used in many scientific disciplines, from
mathematics and logic to economics and psychology, to denote similar investigative
procedures. Analysis is defined as "the procedure by which we break down an intellectual or
substantial whole into parts," while synthesis means "the procedure by which we combine
separate elements or components in order to form a coherent whole." System analysis
researchers apply methodology to the systems involved, forming an overall picture.
System analysis is used in every field where something is developed. Analysis can also be a
series of components that perform organic functions together, such as system engineering
System engineering is an interdisciplinary field of engineering that focuses on how complex
engineering projects should be designed and managed.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 18


ER DIAGRAM
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 5
5.1 ER DIAGRAM:

Employee Employee
Gender Name

Employee Employee
Phone No DOB

Employee Employee
Address ID
Employee Details

Employee Entry
Employee
Employee
Education
Position

Manages Manage Items

Contact Number

Item Price
Address Customer Name Item Num

Item Name Item Type


E-mail ID Customer ID

User Name Password

Customer
LOGIN

Manages ADMIN Manages Reset

Place the Order Send Code

Manages
Order Num Total

Cust Name
Price

Item Name Quality


View Order

Data Label Order Amt

Order Num Cust Name

Figure 5.1
DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 20
CAFETERIA MANAGEMENT SYSTEM

5.2 DATAFLOW:

A graphical tool used to describe and analysis the movement of data through a system
is called data flow diagram. Data flow diagram is the central basis, from which other
components are developed, the transformation of data from input to output, through process,
may be described logically and independent of the physical components associated with the
system.
The DFD is also known as a Data flow, Graph or a bubble chart.
Types of Data Flow Diagram:
1. Physical DFD
2. Logical DFD
1. Physical DFD:
Structure analysis states that current system should first understand correctly. The
physical DFD is the model of current system and is used to ensure that system has been
clearly understood. Physical DFD's shows actual devices, departments and people etc.

2. Logical DFD:
Logical DFD are the model of proposed system. They clearly should show the
requirement non which the new system should be built. Later during the design activity this
taken has basis for drawing the system structure charts.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 21


CAFETERIA MANAGEMENT SYSTEM

DATAFLOW DIAGRAM:

ADMIN LOGIN USER


LOGIN

INVALID

LOGIN RESET VALID


SEND Employee
LOGIN Entry LIST
CODE

Employee
LIST
Details

Manage
ITEM
Items

CUSTOMER Customer

Place the
PLACE THE
Order
ORDER

ORDER View
TABLE Order

Figure 5.2

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 22


SDLC DIAGRAM
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 6
6.1 SDLC DIAGRAM
Software Development Life Cycle

Figure 6.1
PHASES:
1.Planning:
In this phase, we assist whether or not a project should be undertaken. This stage involves
defining the problem and fixing up its boundaries. At the end of this stage, the design and
development team become clear with the project objectives and their work preview.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 24


CAFETERIA MANAGEMENT SYSTEM

2.Analysis:
In this stage, the requirements are studied and analysed. The technical development team
works with customers and system end users to identify the application domain, functions,
services performance capabilities, hardware constraints related to the system to be developed.
3.Design:
In this phase, a new system is designed according to the needs of the user. It is the phase
which find a solution for the given problem. This is the phase where the specification of each
and every component of the project are considered.
4.Implementation:
this is the phase where the system is actually developed. The whole of design phase is built
and implemented in this phase.
5.Testing and Integration:
this is most important phase where the system is judged for all its worth. the system is tested
under all kinds of adverse situations and environment to test its performance, reliability and
robustness. During this phase entire project functionality is tested with all of its units
integrated as a whole and then the system is tested with test data. During this phase the
developed system is reviewed against each and every customer requirement specification.
The developed system should be able to address all of user's needs and its functionality .

6.Maintenance:
This is the phase wherein the development team maintains. the system for the client. It
includes adding enhancements, improvements, updates to the newer versions and not just
correction of errors and emergency fixes of a systems break down.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 25


DATABASE
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 7
DATABASE:
7.1 LoginTable:-
Column Name Data Types
username varchar(50)
password varchar(50)

7.2 EmployeeTable:-
Column Name Data Types
empid varchar(50)
empname varchar(50)
empgd varchar(50)
empph varchar(50)
empadd varchar(50)
emppos varchar(50)
empedu varchar(50)
empdob datetime

7.3 CustomerTable:-
Column Name Data Types
CustomerID int
CustomerName nvarchar(50)
ContactNumber nvarchar(50)
Address nvarchar(50)
EmailID nvarchar(50)

7.4 ManageitemTable:-
Column Name Data Types
itemnum varchar(50)
itemname varchar(50)
itemtype varchar(50)
itemprice varchar(50)

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 27


CAFETERIA MANAGEMENT SYSTEM

7.5 OrderTable:-

Column Name Data Types


datelbl date
ordernum int
custname nvarchar(50)
orderamt nvarchar(50)

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 28


SCREENSHOTS
CAFETERIA MANAGEMENT SYSTEM

8.1 Splashcreen

Figure8.1

8.2 Login Form

Figure8.2

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 30


CAFETERIA MANAGEMENT SYSTEM

8.3 SendCode Form

Figure8.3

8.4 Reset Form

Figure 8.4

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 31


CAFETERIA MANAGEMENT SYSTEM

8.5 MDI Form

Figure8.5
8.6 Employee Entry Form

Figure 8.6

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 32


CAFETERIA MANAGEMENT SYSTEM

8.7 Employee Details Form

Figure 8.7
8.8 Manage Items Form

Figure 8.8

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 33


CAFETERIA MANAGEMENT SYSTEM

8.9 Customer Form

Figure8.9

8.10 Place the Order Form

Figure8.10

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 34


CAFETERIA MANAGEMENT SYSTEM

8.11 View Order Form

Figure8.11

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 35


TESTING
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 9

TESTING:

Software Testing is evaluation of the software against requirements gathered


from users and system specifications. Testing is conducted at the phase level in
software development life cycle or at module level in program code, Software
testing comprises of Validation and Verification.

9.1 UNIT TESTING:

Unit testing, a testing technique using which individual modules are tested to
determine if there are any issues by the developer himself. It is concerned with
functional correctness of the standalone modules. The main aim is to isolate
each unit of the system to identify, analyze and fix the defects.

ADVANTAGES OF UNIT TESTING:

▪ Reduces Defects in the newly developed features or reduces bugs when


changing the existing functionality.
▪ Reduces Cost of Testing as defects are captured in very early phase.
▪ Improves design and allows better refactoring of code.
▪ Unit Tests, when integrated with build gives the quality of the build as
well.

Unit Testing Techniques:

▪ Black Box Testing - Using which the user interface, input and output are
tested.
▪ White Box Testing - used to test each one of those functions’ behavior is
tested

9.2 BLACK BOX TESTING:

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 37


CAFETERIA MANAGEMENT SYSTEM

Black-box testing is a method of software testing that examines the


functionality of an application based on the specifications. It is also known as
Specifications based testing Independent Testing Team usually performs this
type of testing during the software testing life cycle.

This method of test can be applied to each and every level of software testing
such as unit integration, system and acceptance testing.

Black-box testing techniques:

▪ EQUIVALENCE CLASS-The input is divided into similar classes. If one


element of a class passes the test, it is assumed that all the class is passed.
▪ BOUNDARY VALUES -The input is divided into higher and lower end
values. If these values pass the test, it is assumed that all values in
between may pass too.
▪ CAUSE-EFFECT GRAPHING- In both previous methods, only one input
value at a time is tested Cause (input) - Effect (output) is a testing
technique where combinations of input values are tested in a systematic
way. PAIR -WISE TESTING- The behavior of software depends on
multiple parameters. In pair wise testing, the multiple parameters are
tested pair-wise for their different values.
▪ STATE-BASED TESTING- The system changes state on provision of
input. These systems are tested based on their states and input.

Advantages:

▪ Efficient when used on large systems.


▪ Since the tester and developer are independent of each other, testing is
balanced and unprejudiced.
▪ Tester can be non-technical

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 38


CAFETERIA MANAGEMENT SYSTEM

▪ There is no need for the tester to have detailed functional knowledge of


system.
▪ Tests will be done from an end user's point of view, because the end user
should accept the system. (This testing technique is sometimes also called
Acceptance testing.)
▪ Testing helps to identify vagueness and contradictions in functional
specifications
Disadvantages:

▪ Test cases are challenging to design without having clear functional


specifications.
▪ It is difficult to identify tricky inputs if the test cases are not developed
based on specifications.
▪ It is difficult to identify all possible inputs in limited testing time. As a
result, writing test cases may be slow and difficult.
▪ There are chances of having unidentified paths during the testing process.
▪ There is a high probability of repeating.
9.3 WHITE BOX TESTING:
White box testing is a testing technique, which examines the program structure
and derives test data from the program logic/code. The other names of glass box
testing are clear box testing, open box testing, logic driven testing or path driven
testing or structural testing.
The below are some White-box testing techniques:
▪ CONTROL-FLOW TESTING- The purpose of the control-flow testing to
set up test cases which cover all statements and branch conditions. The
branch conditions are Tested for being true and false, so that all
statements can be covered.
▪ DATA-FLOW TESTING - This testing technique emphasis to cover all
the data variables included in the program. It tests where the variables
were declared and defined and where they were used or changed.
Advantages:
▪ Side effects of having the knowledge of the source code are beneficial to
thorough testing.
▪ Optimization of code becomes easy as inconspicuous bottlenecks are
exposed Gives the programmer introspection because developers
carefully describe any new implementation.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 39


CAFETERIA MANAGEMENT SYSTEM

▪ Provides traceability of tests from the source, thereby allowing future


changes to the source to be easily captured in the newly added or
modified tests.
▪ Easy to automate.
▪ Provides clear, engineering-based rules for when to stop testing.
Disadvantages:

▪ White-box testing brings complexity to testing because the tester must


have knowledge of the program, including being a programmer. White-
box testing requires a programmer with a high level of knowledge due to
the complexity of the level of testing that needs to be done.
▪ On some occasions, it is not realistic to be able to test every single
existing condition of the application and some conditions will be
untested.
▪ The tests focus on the software as it exists, and missing functionality may
not be discovered. The resulting test can be fragile because they are
tightly coupled to the specific implementation of the thing being tested.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 40


VALIDATION
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 10

VALIDATION:
Validation is process of examining whether or not the software satisfies the user
requirements. It is carried out at the end of the SDLC. If the software matches
requirements for which it was made, it is validated.
▪ Validation ensures the product under development is as per the user
requirements.
▪ Validation answers the question - "Are we developing the product which
attempts that entire user needs from this software?"
▪ Validation emphasizes on user requirements.
SOFTWARE VERIFICATION:
Verification is the process of confirming if the software is meeting the business
requirements, and is developed adhering to the proper specifications and
methodologies.
▪ Verification ensures the product being developed is according to design
specifications.
▪ Verification answers the question- "Are we developing this product by
firmly following all design specifications?"
▪ Verifications concentrate on the design and system specifications.
Targets of the test are:
▪ Errors-These are actual coding mistakes made by developers. In addition,
there is a difference in output of software and desired output, is
considered as an error.
▪ Fault-When error exists fault occurs. A fault, also known as a bug, is a
result of an error which can cause system to fail.
▪ Failure-Failure is said to be the inability of the system to perform the
desired task. Failure occurs when fault exists in the system.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 42


CAFETERIA MANAGEMENT SYSTEM

VALIDATION TESTING:
The process of evaluating software during the development process or at the end
of the development process to determine whether it satisfies specified business
requirements. Validation Testing ensures that the product actually meets the
client's needs. It can also be defined as to demonstrate that the product fulfills
its intended use when deployed on appropriate.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 43


SOURCE CODE
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 11

11.1 SPLASH SCREEN

Public Class splashscreen


Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value <= 100 Then
Label1.Text = "loading"
If ProgressBar1.Value = 100 Then
Timer1.Dispose()
login.Show()
Me.Hide()
End If
End If

End Sub
End Class
11.2 LOGIN CODE

Imports System.Data
Imports System.Data.SqlClient
Public Class login
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim con As SqlConnection = New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=loginform;Integrated
Security=True")
Dim cmd As SqlCommand = New SqlCommand("select * from login
where username='" + txtuser.Text + "' and password ='" +
txtpass.Text + "'", con)
Dim sda As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dt As DataTable = New DataTable()
sda.Fill(dt)
If (dt.Rows.Count > 0) Then
con.Open()
cmd.ExecuteNonQuery()
MessageBox.Show("login successful")
con.Close()
mdi.Show()
Me.Close()

Else
MessageBox.Show("error", "information ",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 45


CAFETERIA MANAGEMENT SYSTEM

End Sub

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Label3.Click
sendcode.Show()
Me.Close()
End Sub
End Class

11.3 SENDCODE CODE

Imports System.Net
Imports System.Net.Mail
Public Class sendcode
Dim randomCode As String
Public Shared toUser As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
Dim from, pass, messageBody As String
Dim rand As Random = New Random()
randomCode = (rand.Next(999999)).ToString()
Dim message As MailMessage = New MailMessage()
toUser = txtemail.Text
from = "hashtagcoffee211@gmail.com"
pass = "*yourpassword*"
messageBody = "your reset code is" + randomCode
message.To.Add(toUser)
message.From = New MailAddress(from)
message.Body = messageBody
message.Subject = "password resetting code"
Dim smtp As SmtpClient = New SmtpClient("smtp.gmail.com")
smtp.EnableSsl = True
smtp.Port = 587
smtp.DeliveryMethod = SmtpDeliveryMethod.Network
smtp.Credentials = New NetworkCredential(from, pass)
Try
smtp.Send(message)
MessageBox.Show("please check your email and enter the
code in the enter code textbox")

Catch ex As Exception
MessageBox.Show(ex.Message)

End Try

End Sub

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 46


CAFETERIA MANAGEMENT SYSTEM

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
If (txtverify.Text.Equals(randomCode)) Then
toUser = txtemail.Text
reset.Show()
Me.Close()
Else
MessageBox.Show("wrong code")
End If
End Sub

End Class

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 47


CAFETERIA MANAGEMENT SYSTEM

11.4 RESET CODE

Imports System.Data

Imports System.Data.SqlClient
Public Class reset
Dim username As String = sendcode.toUser

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
If (txtverpass.Text.Equals(txtvernewpass.Text)) Then
Dim con As SqlConnection = New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=loginform;Integrated
Security=True")
Dim cmd As SqlCommand = New SqlCommand(" UPDATE
[dbo].[login] SET [username] = '" + username + "',[password] = '" +
txtvernewpass.Text + "'WHERE [username]='" + username + "'", con)
con.Open()
cmd.ExecuteNonQuery()
MessageBox.Show("password resetted successfully",
"inforamaton", MessageBoxButtons.OK, MessageBoxIcon.Information)
con.Close()
login.Show()
Me.Close()
Else
MessageBox.Show("please enter the exact same password in
two textbox")
End If
End Sub
End Class

11.5 MDI CODE

Public Class mdi


Private Sub EmployeedetailsToolStripMenuItem_Click(ByVal sender
As System.Object, ByVal e As System.EventArgs) Handles
EmployeedetailsToolStripMenuItem.Click
employeedetails.Show()
Me.Close()
End Sub

Private Sub DetailsToolStripMenuItem1_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
DetailsToolStripMenuItem1.Click
details.Show()
Me.Close()

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 48


CAFETERIA MANAGEMENT SYSTEM

End Sub

Private Sub ItemsToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ItemsToolStripMenuItem.Click
manageitems.Show()
Me.Close()
End Sub

Private Sub OrderToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
OrderToolStripMenuItem.Click
placetheorder.Show()
Me.Close()
End Sub

Private Sub ViewoderToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ViewoderToolStripMenuItem.Click
vieworder.Show()
Me.Close()
End Sub

Private Sub CustomerToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
CustomerToolStripMenuItem.Click
customer.Show()
Me.Close()
End Sub

Private Sub ExitToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ExitToolStripMenuItem.Click
Application.Exit()
End Sub
End Class

11.6 EmployeeDetails CODE

Imports System.Data.SqlClient
Imports System.Data

Public Class employeedetails


Dim con As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=employee;Integrated
Security=True")
Private Sub populate()
con.Open()

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 49


CAFETERIA MANAGEMENT SYSTEM

Dim sql = "select * from list "


Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
empdgv.DataSource = ds.Tables(0)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
con.Open()
Dim Query As String
Query = "insert into list values('" & empid.Text & "','" &
empname.Text & "','" & empgd.SelectedItem.ToString & "','" &
empph.Text & "','" & empadd.Text & "','" &
emppos.SelectedItem.ToString & "','" & empedu.Text & "','" &
empdob.Value & "')"
Dim cmd As SqlCommand = New SqlCommand(Query, con)
cmd.ExecuteNonQuery()
MsgBox("employee added")
con.Close()
populate()
End Sub
Private Sub employeedetails_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
populate()
End Sub

Private Sub clear()


empid.Text = ""
empname.Text = ""
emppos.Text = ""
empedu.Text = " "
empadd.Text = ""
empdob.Text = ""
empph.Text = " "
empgd.Text = ""

End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles empdelete.Click
If empid.Text = "" Then
MsgBox("select the employee to delete")
Else

Try
con.Open()

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 50


CAFETERIA MANAGEMENT SYSTEM

Dim query As String


query = "delete from list where EmpId='" &
empid.Text & "'"
Dim cmd As SqlCommand = New SqlCommand(query, con)
cmd.ExecuteNonQuery()
MsgBox("employee deleted successfully")
con.Close()
populate()
clear()
Catch ex As Exception
MsgBox(ex.Message)

End Try
End If
End Sub

11.7 Employee Details CODE

Imports System.Data.SqlClient

Imports System.Data
Public Class details
Dim con As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=employee;Integrated
Security=True")
Private Sub FetchEmployeeData()
If empid.Text = "" Then
MsgBox("enter the employee id")
Else
con.Open()
Dim Query = "select * from list where empid=" &
empid.Text & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(Query, con)
Dim dt As DataTable
dt = New DataTable
Dim sda As SqlDataAdapter
sda = New SqlDataAdapter(cmd)
sda.Fill(dt)
For Each dr As DataRow In dt.Rows
empnamelbl.Text = dr(1).ToString()
empgdlbl.Text = dr(2).ToString()
empphlbl.Text = dr(3).ToString()
empaddlbl.Text = dr(4).ToString()
empposlbl.Text = dr(5).ToString()
empedlbl.Text = dr(6).ToString()
empdoblbl.Text = dr(7).ToString()
empnamelbl.Visible = True
empgdlbl.Visible = True

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 51


CAFETERIA MANAGEMENT SYSTEM

empphlbl.Visible = True
empaddlbl.Visible = True
empposlbl.Visible = True
empedlbl.Visible = True
empdoblbl.Visible = True
Next
con.Close()
End If

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
FetchEmployeeData()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
mdi.Show()
Me.Close()
End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As


System.Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage
e.Graphics.DrawString("EMPLOYEE SUMMARY", New Font("arial",
20), Brushes.Crimson, 330, 100)
e.Graphics.DrawString("Name:" + empnamelbl.Text + vbTab +
"Address:" + empaddlbl.Text, New Font("century gothic", 22),
Brushes.Black, 140, 205)
e.Graphics.DrawString("Position:" + empposlbl.Text + vbTab +
"Education:" + empedlbl.Text, New Font("century gothic", 22),
Brushes.Black, 140, 260)
e.Graphics.DrawString("Phone:" + empphlbl.Text + vbTab +
"Gender:" + empgdlbl.Text, New Font("century gothic", 22),
Brushes.Black, 140, 325)
e.Graphics.DrawString("DOB:" + empdoblbl.Text + vbTab, New
Font("century gothic", 22), Brushes.Black, 200, 385)

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click
If PrintPreviewDialog1.ShowDialog() = DialogResult.OK Then
PrintDocument1.Print()
End If
End Sub
Private Sub clear()

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 52


CAFETERIA MANAGEMENT SYSTEM

empid.Text = ""
empnamelbl.Text = ""
empgdlbl.Text = ""
empphlbl.Text = ""
empaddlbl.Text = ""
empposlbl.Text = ""
empedlbl.Text = ""
empdoblbl.Text = ""

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button4.Click
clear()
End Sub
End Class

11.8 Customer CODE

Imports System.Data
Imports System.Data.SqlClient
Public Class customer
Dim con As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial
Catalog=custdetails;Integrated Security=True")
Private Sub populate()
con.Open()
Dim sql = "select * from customer "
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
custdv.DataSource = ds.Tables(0)
con.Close()
End Sub
Private Sub customer_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
populate()
End Sub

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles btnadd.Click
con.Open()
Dim Query As String

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 53


CAFETERIA MANAGEMENT SYSTEM

Query = "insert into customer values('" & CustomerID.Text &


"','" & CustomerName.Text & "','" & ContactNumber.Text & "','" &
Address.Text & "','" & EmailID.Text & "')"
Dim cmd As SqlCommand = New SqlCommand(Query, con)
cmd.ExecuteNonQuery()
MsgBox("customer added")
con.Close()
populate()
clear()

End Sub

Private Sub btndelete_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btndelete.Click
If CustomerID.Text = "" Then
MsgBox("select the customer to delete")
Else

Try
con.Open()
Dim query As String
query = "delete from customer where CustomerID=" &
CustomerID.Text & ""
Dim cmd As SqlCommand = New SqlCommand(query, con)
cmd.ExecuteNonQuery()
MsgBox("customer deleted successfully")
con.Close()
populate()
clear()

Catch ex As Exception
MsgBox(ex.Message)

End Try
End If
End Sub

Private Sub clear()


CustomerID.Text = ""
CustomerName.Text = ""
ContactNumber.Text = ""
Address.Text = ""
EmailID.Text = ""

End Sub

Private Sub btnclear_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btnclear.Click

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 54


CAFETERIA MANAGEMENT SYSTEM

clear()
End Sub

Private Sub btnhome_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles btnhome.Click
mdi.Show()
Me.Close()
End Sub

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles btnedit.Click
If CustomerID.Text = " " Or CustomerName.Text = " " Or
ContactNumber.Text = " " Or Address.Text = " " Or EmailID.Text = ""
Then
MsgBox("missing information")
Else
con.Open()
Dim query As String
query = "update customer set CustomerID='" &
CustomerID.Text & "',CustomerName='" & CustomerName.Text & "
',ContactNumber='" & ContactNumber.Text & " ',Address='" &
Address.Text & " ',EmailID='" & EmailID.Text & "' where
CustomerID='" & CustomerID.Text & "'"
Dim cmd As New SqlCommand(query, con)
cmd.ExecuteNonQuery()
MsgBox("customer Updated")
con.Close()
populate()
clear()
End If
End Sub

Private Sub custdv_CellMouseClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)
Handles custdv.CellMouseClick
Dim row As DataGridViewRow = custdv.Rows(e.RowIndex)
CustomerID.Text = row.Cells(0).Value.ToString()
CustomerName.Text = row.Cells(1).Value.ToString()
ContactNumber.Text = row.Cells(2).Value.ToString()
Address.Text = row.Cells(3).Value.ToString()
EmailID.Text = row.Cells(4).Value.ToString()

End Sub
End Class

11.9 Manage Items CODE

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 55


CAFETERIA MANAGEMENT SYSTEM

Imports System.Data.SqlClient
Imports System.Data
Public Class manageitems
Dim con As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=manageitem;Integrated
Security=True")
Private Sub populate()
con.Open()
Dim sql = "select * from item "
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
itemgv.DataSource = ds.Tables(0)
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
con.Open()
Dim Query As String
Query = "insert into item values('" & itemnum.Text & "','" &
itemname.Text & "','" & itemtype.SelectedItem.ToString & "','" &
itemprice.Text & "')"
Dim cmd As SqlCommand = New SqlCommand(Query, con)
cmd.ExecuteNonQuery()
MsgBox("item added")
con.Close()
populate()
clear()
End Sub

Private Sub manageitems_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
populate()
End Sub
Private Sub Label11_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Label11.Click
Application.Exit()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
mdi.Show()
Me.Close()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button2.Click

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 56


CAFETERIA MANAGEMENT SYSTEM

If itemnum.Text = "" Then


MsgBox("select the item to delete")
Else

Try
con.Open()
Dim query As String
query = "delete from item where itemnum =" &
itemnum.Text & ""
Dim cmd As SqlCommand = New SqlCommand(query, con)
cmd.ExecuteNonQuery()
MsgBox("item deleted successfully")
con.Close()
populate()
clear()

Catch ex As Exception
MsgBox(ex.Message)

End Try
End If

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
If itemnum.Text = " " Or itemname.Text = " " Or
itemtype.SelectedItem = " " Or itemprice.Text = " " Then
MsgBox("missing information")
Else
con.Open()
Dim query As String
query = "update item set itemnum='" & itemnum.Text &
"',itemname='" & itemname.Text & " ',itemtype='" &
itemtype.SelectedItem.ToString() & " ',itemprice='" & itemprice.Text
& " ' where itemnum='" & itemnum.Text & "'"
Dim cmd As New SqlCommand(query, con)
cmd.ExecuteNonQuery()
MsgBox("item Updated")
con.Close()
populate()
clear()
End If
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button5.Click
clear()
End Sub

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 57


CAFETERIA MANAGEMENT SYSTEM

Private Sub clear()


itemnum.Text = ""
itemname.Text = ""
itemtype.Text = ""
itemprice.Text = ""
End Sub

Private Sub itemgv_CellMouseClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)
Handles itemgv.CellMouseClick
Dim row As DataGridViewRow = itemgv.Rows(e.RowIndex)
itemnum.Text = row.Cells(0).Value.ToString()
itemname.Text = row.Cells(1).Value.ToString()
itemtype.Text = row.Cells(2).Value.ToString()
itemprice.Text = row.Cells(3).Value.ToString()

End Sub
End Class

11.10 Place the Order CODE

Imports System.Data.SqlClient
Imports System.Data
Public Class placetheorder
Dim con As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=manageitem;Integrated
Security=True")
Dim conn As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=order;Integrated
Security=True")
Dim con1 As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial
Catalog=custdetails;Integrated Security=True")
Private Sub populate()
con.Open()
Dim sql = "select * from item "
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
itemgv.DataSource = ds.Tables(0)
con.Close()
End Sub
Private Sub filterbycategory()
con.Open()

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 58


CAFETERIA MANAGEMENT SYSTEM

Dim sql = "select * from item where itemtype='" +


cat.SelectedItem.ToString() + "'"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
itemgv.DataSource = ds.Tables(0)
con.Close()
End Sub
Dim table = New DataTable
Dim flag = 0

Private Sub placetheorder_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
populate()
table.columns.add("Number", Type.GetType("System.Int32"))
table.columns.add("Item", Type.GetType("System.String"))
table.columns.add("Category", Type.GetType("System.String"))
table.columns.add("Unitprice", Type.GetType("System.Int32"))
table.columns.add("Quantity", Type.GetType("System.Int32"))
table.columns.add("Total", Type.GetType("System.Int32"))
ordersgv.DataSource = table
datelbl.Text = DateTime.Today.Date.ToString()
populate1()

End Sub

Private Sub Label11_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Label11.Click
Application.Exit()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
mdi.Show()
Me.Close()
End Sub
Dim num = 0, qty As Integer
Dim price, tot
Dim itemname As String
Dim catg As String
Dim sum = 0

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
If qtytb.Text = "" Then

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 59


CAFETERIA MANAGEMENT SYSTEM

MessageBox.Show("what is the quantity of item?")


ElseIf flag = 0 Then
MessageBox.Show("select the product to be ordered")
Else
num = num + 1
tot = price * Convert.ToInt32(qtytb.Text)
qty = Convert.ToInt32(qtytb.Text)
table.rows.add(num, itemname, catg, price, qty, tot)
ordersgv.DataSource = table
flag = 0
End If
sum = sum + tot
orderamt.Text = sum

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
conn.Open()
Dim query As String
query = "insert into ordertable values('" + datelbl.Text +
"','" + ordernum.Text + "','" + CustomerName.Text + "','" +
orderamt.Text + "')"
Dim cmd As SqlCommand = New SqlCommand(query, conn)
cmd.ExecuteNonQuery()
MsgBox("order placed successfully")
conn.Close()
End Sub

Private Sub cat_SelectionChangeCommitted(ByVal sender As Object,


ByVal e As System.EventArgs) Handles cat.SelectionChangeCommitted
filterbycategory()

End Sub

Private Sub btnprint_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btnprint.Click
PrintPreviewDialog1.Document = PrintDocument1
PrintPreviewDialog1.PrintPreviewControl.Zoom = 1
PrintPreviewDialog1.ShowDialog()

End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As


System.Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 60


CAFETERIA MANAGEMENT SYSTEM

Dim f10 As New Font("calibri", 16, FontStyle.Regular)

Dim logoimg As Image =


My.Resources.ResourceManager.GetObject("logo")
e.Graphics.DrawImage(logoimg, CInt((e.PageBounds.Height =
7000)), 50, 100, 100)
e.Graphics.DrawString("*****HASHTAG COFFEE*****", New
Font("arial", 20), Brushes.Black, 200, 50)
e.Graphics.DrawString("MG Road ,Bengaluru", New
Font("arial", 20), Brushes.Black, 250, 90)
e.Graphics.DrawString("hashtagcoffee211@gmail.com", New
Font("arial", 20), Brushes.Black, 250, 120)
e.Graphics.DrawString("Order Number :" + ordernum.Text, New
Font("century gothic", 20), Brushes.Black, 70, 250)
e.Graphics.DrawString("Customer Name :" + CustomerName.Text,
New Font("century gothic", 20), Brushes.Black, 70, 290)
e.Graphics.DrawString("Item" + vbTab + "Quantity" + vbTab +
"Amount", New Font("century gothic", 20), Brushes.Black, 140, 350)
e.Graphics.DrawString("-------------------------------------
--------------------------------", New Font("arial", 20),
Brushes.Black, 140, 390)
Dim height As Integer
ordersgv.AllowUserToAddRows = False
For row As Integer = 0 To ordersgv.RowCount - 1
height += 15

e.Graphics.DrawString(ordersgv.Rows(row).Cells(2).Value.ToString +
vbTab + ordersgv.Rows(row).Cells(4).Value.ToString + vbTab +
ordersgv.Rows(row).Cells(5).Value.ToString, f10, Brushes.Black, 140,
440 + height)

Next
e.Graphics.DrawString("-------------------------------------
--------------------------------", New Font("arial", 20),
Brushes.Black, 140, 550)
e.Graphics.DrawString("Total :" + orderamt.Text, New
Font("century gothic", 22), Brushes.Black, 600, 600)
e.Graphics.DrawString("THANK YOU FOR VISITING ", New
Font("century gothic", 22), Brushes.Black, 200, 650)
End Sub

Private Sub populate1()


con1.Open()
Dim sql = "select * from customer "
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, con1)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 61


CAFETERIA MANAGEMENT SYSTEM

Dim ds As DataSet = New DataSet


adapter.Fill(ds)
custdv.DataSource = ds.Tables(0)
con1.Close()
End Sub

Private Sub itemgv_CellMouseClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)
Handles itemgv.CellMouseClick
Dim row As DataGridViewRow = itemgv.Rows(e.RowIndex)
itemname = row.Cells(0).Value.ToString()
catg = row.Cells(1).Value.ToString()
price = Convert.ToInt32(row.Cells(3).Value.ToString())
flag = 1
End Sub

Private Sub custdv_CellMouseClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)
Handles custdv.CellMouseClick
Dim row As DataGridViewRow = custdv.Rows(e.RowIndex)
CustomerName.Text = row.Cells(1).Value.ToString()
End Sub
End Class

11.11 View Order CODE

Imports System.Data
Imports System.Data.SqlClient
Public Class vieworder
Dim conn As New SqlConnection("Data
Source=SUREKHAYADAV\SQLEXPRESS;Initial Catalog=order;Integrated
Security=True")
Private Sub populate()
conn.Open()
Dim sql = "select * from ordertable "
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(sql, conn)
Dim builder As SqlCommandBuilder = New
SqlCommandBuilder(adapter)
Dim ds As DataSet = New DataSet
adapter.Fill(ds)
ordersgv.DataSource = ds.Tables(0)
conn.Close()
End Sub

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 62


CAFETERIA MANAGEMENT SYSTEM

Private Sub vieworder_Load(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles MyBase.Load
populate()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Close()
mdi.Show()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button1.Click
If ordernum.Text = "" Then
MsgBox("select the order to delete")
Else

Try
conn.Open()
Dim query As String
query = "delete from ordertable where ordernum=" &
ordernum.Text & ""
Dim cmd As SqlCommand = New SqlCommand(query, conn)
cmd.ExecuteNonQuery()
MsgBox("order deleted successfully")
conn.Close()
populate()

Catch ex As Exception
MsgBox(ex.Message)

End Try
End If
End Sub

Private Sub clear()


datelbl.Text = ""
ordernum.Text = ""
CustomerName.Text = ""
orderamt.Text = ""

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Button3.Click
clear()
End Sub

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 63


CAFETERIA MANAGEMENT SYSTEM

Private Sub ordersgv_CellMouseClick(ByVal sender As


System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
ordersgv.CellMouseClick
Dim row As DataGridViewRow = ordersgv.Rows(e.RowIndex)
ordernum.Text = row.Cells(1).Value.ToString()
CustomerName.Text = row.Cells(2).Value.ToString()
orderamt.Text = row.Cells(3).Value.ToString()
datelbl.Text = row.Cells(0).Value.ToString()
End Sub
End Class

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 64


CONCLUSION
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 12

CONCLUSION

The Cafeteria Management System is developed using Visual Basic.NET fully


meets the objectives of the system which it has been developed. The system has
reached a steady state where all bugs have been eliminated. The system is
operated at a high level of efficiency and all the customers and buyers
associated with the system understands its advantage. The system solves the
problem. It was intended to solve as requirement specification.
Future scope of the system:
Different from the traditional system of ordering ,our cafeteria management
system aims to works as customer’s personal dietician.The proposed system
would be:
▪ learn each customer’s eating habits and routines
▪ suggest a food item to the customer based on his previous choices or his
nutrients requirement
▪ record the consumption pattern of food items from the menu. This would
allow the admin to prepare only demanded items.

With the customer’s ever increasing busy schedules, many times he may even
forget to place an order on time. Our system would allow the customer to place
order automatically with Cash on delivery, allowing him to not worry about it.
In a work environment with always a time crunch, people don’t even think
about eating food, let alone consider their nutrition requirements. Our system
tries to make the task from placing an order to receiving it comparatively easier,
and eating the same healthier.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 66


FUTURE ENHANCEMENTS
CAFETERIA MANAGEMENT SYSTEM

FUTURE ENHANCEMENTS

Future scope of the system:


Different from the traditional system of ordering ,our cafeteria management
system aims to works as customer’s personal dietician.The proposed system
would be:
▪ learn each customer’s eating habits and routines
▪ suggest a food item to the customer based on his previous choices or his
nutrients requirement
▪ record the consumption pattern of food items from the menu. This would
allow the admin to prepare only demanded items.

With the customer’s ever increasing busy schedules, many times he may even
forget to place an order on time. Our system would allow the customer to place
order automatically with Cash on delivery, allowing him to not worry about it.
In a work environment with always a time crunch, people don’t even think
about eating food, let alone consider their nutrition requirements. Our system
tries to make the task from placing an order to receiving it comparatively easier,
and eating the same healthier.

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 68


BIBLIOGRAHY
CAFETERIA MANAGEMENT SYSTEM

CHAPTER 13

BIBILOGRAPHY
1. The complete Reference Visual Basic.NET

2. Beginning VB.NET (Word Publication)

3. System Analysis and Design - Alias M. Award

4.Software Engineering - Roger Pressman

5.Software Engineering-Skyward Publications

6.Visual Basic.Net-Jesse Liber

7.SQL Programming-Code Academy

WEBSITES

1. www.microsoft.com

2. www.w3schools.com

3. www.dotnetspider.com

DEPT OF COMPUTER APPLICATIONS-RNSFGC PAGE 70

You might also like