Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Canteen Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 119

Practical Record

BCA
Submitted to:
Department
of Computer Applications

PROJECT REPORT ON
“CANTEEN MANAGEMENT SYSTEM”
(As per the Syllabus prescribed by the Bengaluru City University)

Karnataka College of Management and Science


Campus #33/2, Thirumenahalli, Hegde Nagar Main Road Yelahanka, Bangalore – 560064.
Website: kcmsbangalore.com,Email:karnatakaeducation@yahoo.co.in

1
Karnataka College of Management and Science

PROJECT REPORT
ON
“CANTEEN MANAGEMENT SYSTEM”
SUBMITTED BY THE REQUIREMENT FOR THE AWARD OF THE
DEGREE OF
BACHELOR OF COMPUTER APPLICATIONS-BCA
BENGALURU CITY UNIVERSITY

SUBMITTED BY: REG NO:

Moatasem Ballah Motea R2011052

Abdullah Mohammed Saleh R2011008

Yahya Motea R2011098

UNDER THE ESTIMATED GUIDANCE OF


“Prof .Sivakumar.T’’

2
Karnataka College of Management and Science

Practical Report on
“CANTEEN MANAGEMENT SYSTEM”

Submitted By: Moatasem Ballah Motea


Abdullah Mohammed Saleh
Yahya Motea

Submitted To: Prof .Sivakumar.T

Department of Computer Applications (KCMS)

3
Karnataka College of Management and Science

CERTIFICATE
This is to certify that Moatasem Ballah Motea , Abdullah Mohammed Saleh , Yahya Motea
Register Number (R2011052) , (R2011008) , (R2011098) of V SEM BCA (Bachelor of Computer
Applications), Karnataka College of Management and Science, has submitted the Project Report as per the
syllabus prescribed by Bengaluru City University for Academic Year 2022-2023 under the guidance and
supervision of “Prof .Sivakumar.T”.

Signature of Lecturer Signature of HOD

Signature of the Principal

Center of Examination: Karnataka College of Management & Science


Hegdenagar Main Road, Bangalore-560064.

Internal Examiner

External Examiner

4
KARNATAKA COLLEGE OF MANAGEMENT AND SCIENCE

Project Report Content


CHAPTER 1: INTRODUCTION
Background
Objectives
Purpose, Scope, and Applicability
Purpose
Scope
Applicability
Achievements
Organization of Report

CHAPTER 2: SURVEY OF TECHNOLOGIES

CHAPTER 3: REQUIREMENTS AND ANALYSIS


Problem Definition
Requirements Specification
Planning and Scheduling
Software and Hardware Requirements
Preliminary Product Description
Conceptual Models
CHAPTER 4: SYSTEM DESIGN
4.1 Basic Modules

5
CHAPTER 5: IMPLEMENTATION AND TESTING
Implementation Approaches
Coding Details and Code Efficiency
Testing Approach
Unit Testing
Integrated Testing
Modifications and Improvements

CHAPTER 6: RESULTS AND DISCUSSION


Test Reports
User Documentation

CHAPTER 7: CONCLUSIONS
Conclusion
Limitations of the System
Future Scope of the Project

6
ACKNOWLEDGE

It gives me immense pleasure to express my deepest sense of gratitude and sincere thanks to my
highly respected and esteemed Prof.Siva Kumar T Department of Computer Applications
(KCMS), for his/her valuable guidance, encouragement and help for completing this work.
His/her useful suggestions for this whole work and co-operative behavior are sincerely
acknowledged. I would like to express my sincere thanks to Dr. Mohammed Noor Ahmed,
KCMS for giving me this opportunity to undertake this project.. I am also grateful to my faculty
members for their constant support and guidance. I also wish to express my indebtedness to my
parents as well as my family member whose blessings and support always helped me to face the
challenges ahead. At the end I would like to express my sincere thanks to all my friends and
others who helped me directly or indirectly during this project work.

Place: Bangalore Student Name


Date: Moatasem Ballah Motea

Abdullah Mohammed Saleh

Yahya Motea

Reregister No
(R2011052)
(R2011008)
(R2011098)

7
ABSTRACT

Curriculum Evaluation System project is developed using VB.NET. The Project is


based on the concept of helping school staff to reduce their time in evaluating students.
Talking about the project, there’s a login system which is divided into two categories;
Admin and the faculty user. The faculty user can easilyview all the student’s information,
curriculum, grades, reports, search students and add grades. Except, the faculty user
cannot view/manage utility features.

8
Canteen

INTRODUCTION

The Domain "Canteen Management System" keeps the day by day tally record as a

complete management. It can keep the information of Canteen Details, Room Details, Table

Details, Food Details and Searching the transaction, Booking Transaction report. Lastly

this important part of this project is; it displays reports, Statistical Summary of

transactions type and Transaction Information.

SYNOPSIS

"Canteen Management System " is a software package that keeps the day by day tally

record as a complete management. It can keep the information of Canteen Details, Food

Details and Searching the transaction, Booking Transaction report, Individual guest

opening form, room and table Account. Lastly this important part of this project is; it

displays reports, Statistical Summary of transactions type and Transaction Information.

AIM

In the existing system the transactions are done only manually but in proposed system we

have to computerize all the Canteen Management transaction using the software Canteen

Management System. They are:

1
Canteen

ADMINISTRATIVE MODULE

This module is the main module which performs all the main operations in the system. The

major operations in the system are:

Canteen Details Form

Facility Details

Food Details

Room Information

Table Information

Room Booking

Table Booking

2
Canteen

SYSTEM STUDY AND ANALISYS

SYSTEM ANALYSIS

System analysis is a process of gathering and interpreting facts, diagnosing problems and the

information to recommend improvements on the system. It is a problem solving activity that

requires intensive communication between the system users and system developers. System

analysis or study is an important phase of any system development process. The system is

studied to the minutest detail and analyzed. The system analyst plays the role of the interrogator

and dwells deep into the working of the present system. The system is viewed as a whole and the

input to the system are identified. The outputs from the organizations are traced to the various

processes. System analysis is concerned with becoming aware of the problem, identifying the

relevant and decisional variables, analyzing and synthesizing the various factors and determining

an optimal or at least a satisfactory solution or program of action.

A detailed study of the process must be made by various techniques like interviews,

questionnaires etc. The data collected by these sources must be scrutinized to arrive to a

conclusion. The conclusion is an understanding of how the system functions. This system is

called the existing system. Now the existing system is subjected to close study and problem areas

are identified. The designer now functions as a problem solver and tries to sort out the

difficulties that the enterprise faces. The solutions are given as proposals. The proposal is then

weighed with the existing system analytically and the best one is selected. The proposal is

presented to the user for an endorsement by the user. The proposal is reviewed on user request

and suitable changes are made. This is loop that ends as soon as the user is satisfied with

proposal.

3
Canteen
Preliminary study is the process of gathering and interpreting facts, using the information for

further studies on the system. Preliminary study is problem solving activity that requires

intensive communication between the system users and system developers. It does various

feasibility studies. In these studies a rough figure of the system activities can be obtained, from

which the decision about the strategies to be followed for effective system study and analysis can

be taken.

4
Canteen

EXISTING SYSTEM

In the existing system the transactions are done only manually but in proposed system we have to

computerize all the Canteen Management transaction using the software Canteen Management

system.

PROBLEMS WITH EXISTING SYSTEM

Lack of security of data.

More man power.

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

becomputerized.

PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities. The proposed system

can overcome all the limitations of the existing system. The system provides proper security and

5
Canteen
reduces the manual work.

6
Canteen

ADVANTAGES OF THE PROPOSED SYSTEM

The system is very simple in design and to implement. The system requires very low system

resources and the system will work in almost all configurations. It has got following features

Security of data.

Ensure data accuracy's.

Proper control of the higher officials.

Reduce the damages of the machines.

Minimize manual data entry.

Minimum time needed for the various processing.

Greater efficiency.

Better service.

User friendliness and

interactive. Minimum time

required.

FEASIBILITY STUDY

Feasibility study is made to see if the project on completion will serve the purpose of the

organization for the amount of work, effort and the time that spend on it. Feasibility study lets

the developer foresee the future of the project and the usefulness. A feasibility study of a system

proposal is according to its workability, which is the impact on the organization, ability to meet

7
Canteen

their user needs and effective use of resources. Thus when a new application is proposed it

normally goes through a feasibility study before it is approved for development.

The document provide the feasibility of the project that is being designed and lists various areas

that were considered very carefully during the feasibility study of this project such as Technical,

Economic and Operational feasibilities. The following are its features:

TECHNICAL FEASIBILITY

The system must be evaluated from the technical point of view first. The assessment of this

feasibility must be based on an outline design of the system requirement in the terms of input,

output, programs and procedures. Having identified an outline system, the investigation must go

on to suggest the type of equipment, required method developing the system, of running the

system once it has been designed.

Technical issues raised during the investigation are:

Does the existing technology sufficient for the suggested one Can the system expand if

developed

The project should be developed such that the necessary functions and performance are achieved

within the constraints. The project is developed within latest technology. Through the technology

may become obsolete after some period of time, due to the fact that never version of same

software supports older versions, the system may still be used. So there are minimal constraints

8
Canteen
involved with this project. The system has been developed using Java the project is technically

feasible for development.

ECONOMIC FEASIBILITY

The developing system must be justified by cost and benefit. Criteria to ensure that effort is

concentrated on project, which will give best, return at the earliest. One of the factors, which

affect the development of a new system, is the cost it would require.

The following are some of the important financial questions asked during preliminary

investigation:

The costs conduct a full system

investigation. The cost of the hardware and

software.

The benefits in the form of reduced costs or fewer costly errors.

Since the system is developed as part of project work, there is no manual cost to spend for the

proposed system. Also all the resources are already available, it give an indication of the system

is economically possible for development.

BEHAVIORAL FEASIBILITY

This includes the following questions:

Is there sufficient support for the

9
Canteen

users Will the proposed system cause

harm

1
Canteen

The project would be beneficial because it satisfies the objectives when developed and installed.

All behavioral aspects are considered carefully and conclude that the project is

behaviorallyfeasible.

1
Canteen

Hardware and Software Components

Hardware Components:

Processor – Pentium i series/dual

core Hard Disk – 250 GB

Interface – basic keyboard/

Mouse Memory – 4GB RAM

Software Requirements:

IDE : Visual Studio

Frame Work : VB .Net Frame Work

Database : Sql Server

Operating system : Windows 8.1 or higher version.

1
Canteen

REQUIREMENT ANALYSIS

Introduction to DBMS

A data is raw information fed to the computer. Database is a collection of related

data. It is the raw structure of any particular system for which the data is to be collected.

PROPERTIES OF DATABASE:

1. Is represents some aspect of real world.

2. Database is the logical collection of data with inherent meaning.

3. Database is designed, built and populated with data for a specific purpose.

DATABASE SYSTEM:

Database technology is one of the fastest growing fields of computer science. Despite its

youth, the fields have become very important. Billion of bytes of data have been committed to

database, the financial investment involved is enormous and hundreds of organizations have

become critically dependent on the successful operation of a database system.

1
Canteen
A database system is a computer-based record keeping system, a system whose overall

purpose is to record and maintain information. The information may be anything that is necessary

for the organization’s management in decision-making process.

DATABASE MANAGEMENT SYSTEM:

Database management system is a collection of programs that enables the user to create and

maintain a database: hence, it is a software system that facilitates the process of defining,

constructing and manipulating the databases for various applications.

Defining a database involves specifying the data types, structure constraints for the data to be

stored in the databases.

Constructing a database is a process of storing a database itself on some storage media, which is

controlled by the rules of database management system

Manipulating a database involves querying the database to retrieve specific information,

updating the database to reflect the changes in the world and also to generate reports.

Software Tools

Visual Basic 2005

1
Canteen
Visual Basic (VB) is a third-generation event driven programming language and associated

development environment from Microsoft for its COM programming model.[1] Visual Basic

was derived from BASIC and enables the rapid application development (RAD) of graphical user

interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of

ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically

similar to Visual Basic, but perform differently.[2]

A programmer can put together an application using the components provided with Visual Basic

itself. Programs written in Visual Basic can also use the Windows API, but doing so requires

external function declarations.

In business programming, Visual Basic has one of the largest user bases. It currently competes

with C++, C# and Java for dominance in the business world. JavaScript is another competitor to

Visual Basic.[3]

The final release was version 6 in 1998. Microsoft extended support will end in 2008 and the

designated successor is Visual Basic .NET.

 SQL Server 2005

The Structured Query Language (SQL) comprises one of the fundamental building

blocks of modern database architecture. SQL defines the methods used to create and manipulate

relational databases on all major platforms. At first glance, the

1
Canteen
language may seem intimidating and complex but it's really not all that bad.

The Data Definition Language (DDL) contains the commands used to create and destroy

databases and database objects. After the database structure is defined with DDL, database

administrators and users can utilize the Data Manipulation Language to insert, retrieve and

modify the data contained within it. In the next two sections of this article, we'll explore DDL

and DML in further detail.

 SQL Server 2005

Microsoft® SQL Server™ is a database management and analysis system for e-commerce, line-

of-business, and data warehousing solutions. In this section, you will find information for several

1
Canteen

versions of SQL Server. You will also find articles on database and database application design,

as well as examples of the uses that SQL Server can be put to.

Microsoft SQL Server 2014 builds on the mission-critical capabilities delivered in our prior

release by providing breakthrough performance, availability and manageability for your mission

critical applications. SQL Server 2014 delivers new in-memory capabilities built into the core

database for online transaction processing (OLTP) and data warehousing, which complement our

existing in-memory data warehousing and BI capabilities for the most comprehensive in-memory

database solution on the market.

SQL Server 2014 also provides new disaster recovery, backup, and hybrid architecture solutions

with Windows Azure, enabling customers to use their existing skills with on-premise features

that leverage Microsoft’s global datacenters. In addition, SQL Server 2014 takes advantage of

new Windows Server 2012 and Windows Server 2012 R2 capabilities to give you unparalleled

scalability for your database application in a physical or virtual environment.

Database EngineThe Database Engine is the core service for storing, processing and securing data. The

Database Engine provides controlled access and rapid transaction processing to meet the requirements

of the most demanding data consuming applications within your enterprise. The Database Engine also

provides rich support for sustaining high availability.

The Database Engine is the core service for storing, processing, and securing data. The Database

Engine provides controlled access and rapid transaction processing to meet the requirements of

the most demanding data consuming applications within your enterprise.

1
Canteen

Use the Database Engine to create relational databases for online transaction processing or online

analytical processing data. This includes creating tables for storing data, and database objects

such as indexes, views, and stored procedures for viewing, managing, and securing data. You

can use SQL Server Management Studio to manage the database objects, and SQL Server

Profiler for capturing server events.

1
Canteen

Analysis Services - Multidimensional DataAnalysis Services supports OLAP by allowing you to

design, create, and manage multidimensional structures that contain data aggregated from other data

sources, such as relational databases.

Microsoft SQL Server Analysis Services—Multidimensional Data allows you to design, create,

and manage multidimensional structures that contain detail and aggregated data from multiple

data sources, such as relational databases, in a single unified logical model supported by built-in

calculations.

Analysis Services—Multidimensional Data provides fast, intuitive, top-down analysis of large

quantities of data built on this unified data model, which can be delivered to users in multiple

languages and currencies.

Analysis Services—Multidimensional Data works with data warehouses, data marts, production

databases and operational data stores, supporting analysis of both historical and real time data.

Analysis Services - Data MiningAnalysis Services enables you to design, create, and visualize data

mining models. These mining models can be constructed from other data sources by using a wide

variety of industry-standard data mining algorithms.


1
Canteen

Microsoft SQL Server Analysis Services contains the features and tools you need to create

complex data mining solutions.

 A set of industry-standard data mining algorithms.

 The Data Mining Designer, which you can use to create, manage, and explore data

mining models, and then create predictions by using those models.

 The Data Mining Extensions (DMX) language, which you can use to manage mining

models and to create complex prediction queries.

You can use a combination of these features and tools to discover trends and patterns that exist

in your data, and then use the trends and patterns to make intelligent decisions about difficult

business problems.

Integration ServicesIntegration Services is a platform for building high performance data

integration solutions, including packages that provide extract, transform, and load (ETL) processing for

data warehousing.

2
Canteen

Microsoft Integration Services is a platform for building enterprise-level data integration and

data transformations solutions. You use Integration Services to solve complex business problems

by copying or downloading files, sending e-mail messages in response to events, updating data

warehouses, cleaning and mining data, and managing SQL Server objects and data. The

packages can work alone or in concert with other packages to address complex business needs.

Integration Services can extract and transform data from a wide variety of sources such as XML

data files, flat files, and relational data sources, and then load the data into one or more

destinations.

Integration Services includes a rich set of built-in tasks and transformations; tools for

constructing packages; and the Integration Services service for running and managing packages.

You can use the graphical Integration Services tools to create solutions without writing a single

line of code; or you can program the extensive Integration Services object model to create

packages programmatically and code custom tasks and other package objects.

ReplicationReplication is a set of technologies for copying and distributing data and database

objects from one database to another, and then synchronizing between databases to maintain

consistency. By using replication, you can distribute data to different locations and to remote or mobile

users by means of local and wide area networks, dial-up connections, wireless connections, and the

Internet.

Replication is a set of technologies for copying and distributing data and database objects from

2
Canteen
one database to another and then synchronizing between databases to maintain consistency.

Using replication, you can distribute data to different locations and to remote or mobile users

over local and wide area networks, dial-up connections, wireless connections, and the Internet.

Transactional replication is typically used in server-to-server scenarios that require high

throughput, including: improving scalability and availability; data warehousing and reporting;

integrating data from multiple sites; integrating heterogeneous data; and offloading batch

processing. Merge replication is primarily designed for mobile applications or distributed server

applications that have possible data conflicts. Common scenarios include: exchanging data with

mobile users; consumer point of sale (POS) applications; and integration of data from multiple

sites. Snapshot replication is used to provide the initial data set for transactional and merge

replication; it can also be used when complete refreshes of data are appropriate. With these three

types of replication, SQL Server provides a powerful and flexible system for synchronizing data

across your enterprise.

In addition to replication, in SQL Server 2008, you can sychronize databases by using Microsoft

Sync Framework and Sync Services for ADO.NET. Sync Services for ADO.NET provides an

intuitive and flexible API that you can use to build applications that target offline and

collaboration scenarios.

2
Canteen

Reporting ServicesReporting Services delivers enterprise, Web-enabled reporting functionality so

you can create reports that draw content from a variety of data sources, publish reports in various

formats, and centrally manage security and subscriptions.

Microsoft SQL Server 2008 Reporting Services (SSRS) provides a full range of ready-to-use

tools and services to help you create, deploy, and manage reports for your organization, as well

as programming features that enable you to extend and customize your reporting functionality.

SQL Server 2008 Reporting Services (SSRS) is a server-based reporting platform that provides

comprehensive reporting functionality for a variety of data sources. Reporting Services includes

a complete set of tools for you to create, manage, and deliver reports, and APIs that

enable developers to integrate or extend data and report processing in custom

applications. Reporting Services tools work within the Microsoft Visual Studio environment and

are fully integrated with SQL Server tools and components.

With Reporting Services, you can create interactive, tabular, graphical, or free-form reports from

relational, multidimensional, or XML-based data sources. You can publish reports, schedule

report processing, or access reports on-demand. Reporting Services also enables you to create ad

hoc reports based on predefined models, and to interactively explore data within the model. You

can select from a variety of viewing formats, export reports to other applications, and subscribe

to published reports. The reports that you create can be viewed over a Web-based connection or

as part of a Microsoft Windows application or SharePoint site. Reporting Services provides the

key to your business data.

2
Canteen

SQL Server Service BrokerService Broker helps developers build scalable, secure database

applications. This new Database Engine technology provides a message-based communication platform

that enables independent application components to perform as a functioning whole. Service Broker

includes infrastructure for asynchronous programming that can be used for applications within a single

database or a single instance, and also for distributed applications.

SQL Server Service Broker provides the SQL Server Database Engine native support for

messaging and queuing applications. This makes it easier for developers to create sophisticated

applications that use the Database Engine components to communicate between disparate

databases. Developers can use Service Broker to easily build distributed and reliable

applications.

Application developers who use Service Broker can distribute data workloads across several

databases without programming complex communication and messaging internals. This reduces

development and test work because Service Broker handles the communication paths in the

context of a conversation. It also improves performance. For example, front-end databases

supporting Web sites can record information and send process intensive tasks to queue in back-

2
Canteen

end databases. Service Broker ensures that all tasks are managed in the context of transactions to

assure reliability and technical consistency.

2
Canteen
SYSTEM DESIGN

INTRODUCTION

Design is the first step into the development phase for any engineered product or system. Design

is a creative process. A good design is the key to effective system. The term "design" is defined

as "the process of applying various techniques and principles for the purpose of defining a

process or a system in sufficient detail to permit its physical realization". It may be defined as a

process of applying various techniques and principles for the purpose of defining a device, a

process or a system in sufficient detail to permit its physical realization. Software design sits at

the technical kernel of the software engineering process and is applied regardless of the

development paradigm that is used. The system design develops the architectural detail required

to build a system or product. As in the case of any systematic approach, this software too has

undergone the best possible design phase fine tuning all efficiency, performance and accuracy

levels. The design phase is a transition from a user oriented document to a document to the

programmers or database personnel. System design goes through two phases of development:

Logical and Physical Design.

LOGICAL DESIGN:

The logical flow of a system and define the boundaries of a system. It includes the following

steps:

Reviews the current physical system - its data flows, file content, volumes , frequencies etc.

Prepares output specifications - that is, determines the format, content and frequency of reports.
2
Canteen
Prepares input specifications - format, content and most of the input functions.

Prepares edit, security and control specifications.

Specifies the implementation plan.

Prepares a logical design walk through of the information flow, output, input, controls and

implementation plan.

Reviews benefits, costs, target dates and system constraints.

PHYSICAL DESIGN:

Physical system produces the working systems by define the design specifications that tell the

programmers exactly what the candidate system must do. It includes the following steps.

Design the physical system.

Specify input and output

media.

Design the database and specify backup procedures.

Design physical information flow through the system and a physical design Walk through.

Plan system implementation.

Prepare a conversion schedule and target date.

Determine training procedures, courses and

timetable.

Devise a test and implementation plan and specify any new hardware/software.

Update benefits , costs , conversion date and system constraints


Canteen

25
Canteen

Design/Specification activities:

Concept formulation.

Problem understanding.

High level requirements proposals.

Feasibility study.

Requirements engineering.

Architectural design.

MODULE DESIGN Admin

The Administrator logs in using the admin login. In this module two operations are done. During

login the Login and Password is verified with that in the database

INPUT DESIGN

The design of input focuses on controlling the amount of input required, controlling the errors,

avoiding delay, avoiding extra steps and keeping the process simple. The input is designed in

such a way so that it provides security and ease of use with retaining the privacy. Input Design

considered the following things:

What data should be given as input o How the data should be arranged or coded o The dialog to

guide the operating personnel in providing input. o Methods for preparing input validations and

steps to follow when error occur.

2
Canteen

OBJECTIVES

Input Design is the process of converting a user-oriented description of the input into a

computer-based system. This design is important to avoid errors in the data input process and

show the correct direction to the management for getting correct information from the

computerized system.

It is achieved by creating user-friendly screens for the data entry to handle large volume of data.

The goal of designing input is to make data entry easier and to be free from errors. The data

entry screen is designed in such a way that all the data manipulates can be performed. It also

provides record viewing facilities.

When the data is entered it will check for its validity. Data can be entered with the help of

screens. Appropriate messages are provided as when needed so that the user will not be in a

maize of instant. Thus the objective of input design is to create an input layout that is easy to

follow.

OUTPUT DESIGN

A quality output is one, which meets the requirements of the end user and presents the

information clearly. In output design it is determined how the information is to be displaced for

immediate need and also the hard copy output. It is the most important and direct source

2
Canteen

information to the user. Efficient and intelligent output design improves the system's relationship

to help user decision-making.

Designing computer output should proceed in an organized, well thought out manner; the right

output must be developed while ensuring that each output element is designed so that people will

find the system can use easily and effectively. When analysis design computer output, they

should :

Identify the specific output that is needed to meet the requirements.

Select methods for presenting information.

Create document, report, or other formats that contain information produced by the system.

Level - 0 Room/Table
Request
Canteen
Booking Storage
Guest Management
Submit
Booked Room/Table

Storage

Level - 1
Canteen Details
Submi Storage
Canteen Tab Student Tab Food Tab

Manager Submi Student Details

Storage
Submi
Food
Details

2
Canteen

Storage
Canteen
Updates
Level - 2 Cashier
Canteen
Request T
Login Food Staff Tab
Employee
Food Tab
Student Tab
Staff

Check
Status
Staff Studen
Submits t Order Staff Order
Details
Student
Sales Request Booked Order
Admin
Stude Staff
Order
Check
Status

DATABASE DESIGN

A database is an organized mechanism that has the capability of storing information through

which a user can retrieve stored information in an effective and efficient manner. The data is the

purpose of any database and must be protected.

The database design is a two level process. In the first step, user requirements are gathered

together and a database is designed which will meet these requirements as clearly as possible.
2
Canteen
This step is called Information Level Design and it is taken independent of any individual

DBMS.

In the second step, this Information level design is transferred into a design for the specific

DBMS that will be used to implement the system in question. This step is called Physical Level

Design, concerned with the characteristics of the specific DBMS that will be used. A database

design runs parallel with the system design. The organization of the data in the database is aimed

to achieve the following two major objectives.

Data Integrity

Data independence

Normalization is the process of decomposing the attributes in an application, which results in a

set of tables with very simple structure. The purpose of normalization is to make tables as simple

as possible. Normalization is carried out in this system for the following reasons.

To structure the data so that there is no repetition of data , this helps in saving.

To permit simple retrieval of data in response to query and report request.

To simplify the maintenance of the data through updates, insertions, deletions.

To reduce the need to restructure or reorganize data which new application requirements arise.

RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS):

A relational model represents the database as a collection of relations. Each relation resembles a

3
Canteen
table of values or file of records. In formal relational model terminology, a row is called a tuple,

a column header is called an attribute and the table is called a relation. A relational database

consists of a collection of tables, each of which is assigned a unique name. A row in a tale

represents a set of related values.

RELATIONS, DOMAINS & ATTRIBUTES:

A table is a relation. The rows in a table are called tuples. A tuple is an ordered set of n elements.

Columns are referred to as attributes. Relationships have been set between every table in the

database. This ensures both Referential and Entity Relationship Integrity. A domain D is a set of

atomic values. A common method of specifying a domain is to specify a data type from which

3
Canteen

the data values forming the domain are drawn. It is also useful to specify a name for the domain

to help in interpreting its values. Every value in a relation is atomic, that is not decomposable.

RELATIONSHIPS:

Table relationships are established using Key. The two main keys of prime importance are

Primary Key & Foreign Key. Entity Integrity and Referential Integrity Relationships can be

established with thesekeys.Entity Integrity enforces that no Primary Key can have null

values.Referential Integrity enforces that no Primary Key can have null values. Referential

Integrity for each distinct Foreign Key value, there must exist a matching Primary Key value in

the same domain. Other key are Super Key and Candidate Keys. Relationships have been set

between every table in the database. This ensures both Referential and Entity Relationship

Integrity.

NORMALIZATION:

As the name implies, it denoted putting things in the normal form. The application developer via

normalization tries to achieve a sensible organization of data into proper tables and columns and

where names can be easily correlated to the data by the user. Normalization eliminates repeating

groups at data and thereby avoids data redundancy which proves to be a great burden on the

computer resources. These includes:

Normalize the data.

Choose proper names for the tables and columns.

3
Canteen
Choose the proper name for the data.

First Normal Form:

The First Normal Form states that the domain of an attribute must include only atomic values

and that the value of any attribute in a tuple must be a single value from the domain of that

attribute. In other words 1NF disallows "relations within relations" or "relations as attribute

values within tuples". The only attribute values permitted by 1NF are single atomic or indivisible

values.

The first step is to put the data into First Normal Form. This can be donor by moving data into

separate tables where the data is of similar type in each table. Each table is given a Primary Key

or Foreign Key as per requirement of the project. In this we form new relations for each

nonatomic attribute or nested relation. This eliminated repeating groups of data.

A relation is said to be in first normal form if only if it satisfies the constraints that contain the

primary key only.

Second Normal Form:

According to Second Normal Form, For relations where primary key contains multiple

attributes, no nonkey attribute should be functionally dependent on a part of the primary key.

3
Canteen

In this we decompose and setup a new relation for each partial key with its dependent attributes.

Make sure to keep a relation with the original primary key and any attributes that are fully

functionally dependent on it. This step helps in taking out data that is only dependant on apart of

the key.

A relation is said to be in second normal form if and only if it satisfies all the first normal form

conditions for the primary key and every non-primary key attributes of the relation is fully

dependent on its primary key alone. Third Normal Form:

According to Third Normal Form, Relation should not have a non key attribute functionally

determined by another nonkey attribute or by a set of nonkey attributes. That is, there should be

no transitive dependency on the primary key.

In this we decompose and set up relation that includes the nonkey attributes that functionally

determines other nonkey attributes. This step is taken to get rid of anything that does not depend

entirely on the Primary Key.

A relation is said to be in third normal form if only if it is in second normal form and more over

the non key attributes of the relation should not be depend on other non key attribute.

SYSTEM IMPLEMENTATION AND TESTING

Implementation is the stage of the project where the theoretical design is turned into a working

3
Canteen
system. It can be considered to be the most crucial stage in achieving a successful new system

gaining the users confidence that the new system will work and will be effective and accurate. It

is primarily concerned with user training and documentation. Conversion usually takes place

about the same time the user is being trained or later. Implementation simply means convening a

new system design into operation, which is the process of converting a new revised system .

3
Canteen

Data Dictionary

Canteen Details:

Product Details

Column name Type size remark

iCode Text 6 Primary key

iName Text 20

iType Text 15

iPrice Number 6

iDescription Text 100

iContinued Text 3 (Yes/No)

Cashier

Column name Type size remark

cashierId Text 6 Primary key

cashierName Text 20

cashierContact Text 10

cashierAddress Text 100

3
Canteen
Billing

Column name Type size remark

billNo Number 6 Primary key

billDate Date

cashierId Text 6

BillingDetails

Column name Type size remark

billNo Number 6 Primary key

iCode Text 6

qty Number 3

3
Canteen

SYSTEM TESTING

Software Testing is the process of executing software in a controlled manner, in order to answer

the question - Does the software behave as specified. Software testing is often used in association

with the terms verification and validation. Validation is the checking or testing of items, includes

software, for conformance and consistency with an associated specification. Software testing is

just one kind of verification, which also uses techniques such as reviews, analysis, inspections,

and walkthroughs. Validation is the process of checking that what has been specified is what the

user actually wanted.

Validation: Are we doing the right job

Verification: Are we doing the job

right

Software testing should not be confused with debugging. Debugging is the process of analyzing

and localizing bugs when software does not behave as expected. Although the identification of

some bugs will be obvious from playing with the software, a methodical approach to software

testing is a much more thorough means for identifying bugs. Debugging is therefore an activity

which supports testing, but cannot replace testing. Other activities which are often associated

with software testing are static analysis and dynamic analysis. Static analysis investigates the

source code of software, looking for problems and gathering metrics without actually executing

the code. Dynamic analysis

3
Canteen

looks at the behavior of software while it is executing, to provide information such as execution

4
Canteen
traces, timing profiles, and test coverage information.

Testing is a set of activity that can be planned in advanced and conducted systematically. Testing

begins at the module level and work towards the integration of entire computers based system.

Nothing is complete without testing, as it vital success of the system testing objectives, there are

several rules that can serve as testing objectives. They are

Testing is a process of executing a program with the intend of finding an error. A good test case

is one that has high possibility of finding an undiscovered error. A successful test is one that

uncovers an undiscovered error.

If a testing is conducted successfully according to the objectives as stated above, it would

uncovered errors in the software also testing demonstrate that the software function appear to be

working according to the specification, that performance requirement appear to have been met.

There are three ways to test

program. For correctness

For implementation efficiency

For computational complexity

Test for correctness are supposed to verify that a program does exactly what it was designed to

do. This is much more difficult than it may at first appear, especially for large programs.

4
Canteen

TEST PLAN

A test plan implies a series of desired course of action to be followed in accomplishing various

testing methods. The Test Plan acts as a blue print for the action that is to be followed. The

software engineers create a computer program, its documentation and related data structures. The

software developers is always responsible for testing the individual units of the programs,

ensuring that each performs the function for which it was designed. There is an independent test

group (ITG) which is to remove the inherent problems associated with letting the builder to test

the thing that has been built. The specific objectives of testing should be stated in measurable

terms. So that the mean time to failure, the cost to find and fix the defects, remaining defect

density or frequency of occurrence and test work-hours per regression test all should be stated

within the test plan.

The levels of testing

include: Unit testing

Integration Testing

Data validation

Testing Output Testing

UNIT TESTING

4
Canteen
Unit testing focuses verification effort on the smallest unit of software design - the software

component or module. Using the component level design description as a guide, important

control paths are tested to uncover errors within the boundary of the module. The relative

complexity of tests and uncovered scope established for unit testing. The unit testing is white-

box oriented, and step can be conducted in parallel for multiple components. The modular

interface is tested to ensure that information properly flows into and out of the program unit

under test. The local data structure is examined to ensure that data stored temporarily maintains

its integrity during all steps in an algorithm's execution. Boundary conditions are tested to ensure

that all statements in a module have been executed at least once. Finally, all error handling paths

are tested.

Tests of data flow across a module interface are required before any other test is initiated. If data

do not enter and exit properly, all other tests are moot. Selective testing of execution paths is an

essential task during the unit test. Good design dictates that error conditions be anticipated and

error handling paths set up to reroute or cleanly terminate processing when an error does occur.

Boundary testing is the last task of unit testing step. Software often fails at its boundaries.

Unit testing was done in Sell-Soft System by treating each module as separate entity and testing

each one of them with a wide spectrum of test inputs. Some flaws in the internal logic of the

modules were found and were rectified.

INTEGRATION TESTING

4
Canteen

Integration testing is systematic technique for constructing the program structure while at the

same time conducting tests to uncover errors associated with interfacing. The objective is to take

unit tested components and build a program structure that has been dictated by design. The entire

program is tested as whole. Correction is difficult because isolation of causes is complicated by

vast expanse of entire program. Once these errors are corrected, new ones appear and the process

continues in a seemingly endless loop.

After unit testing in Sell-Soft System all the modules were integrated to test for any

inconsistencies in the interfaces. Moreover differences in program structures were removed and a

unique program structure was evolved.

VALIDATION TESTING OR SYSTEM TESTING

This is the final step in testing. In this the entire system was tested as a whole with all forms,

code, modules and class modules. This form of testing is popularly known as Black Box testing

or System testing.

Black Box testing method focuses on the functional requirements of the software. That is, Black

Box testing enables the software engineer to derive sets of input conditions that will fully

exercise all functional requirements for a program.

Black Box testing attempts to find errors in the following categories; incorrect or missing

functions, interface errors, errors in data structures or external data access, performance errors

4
Canteen
and initialization errors and termination errors.

OUTPUT TESTING OR USER ACCEPTANCE TESTING

The system considered is tested for user acceptance; here it should satisfy the firm's need. The

software should keep in touch with perspective system; user at the time of developing and

making changes whenever required. This done with respect to the following points

Input Screen Designs,

Output Screen Designs,

Online message to guide the user and the like.

The above testing is done taking various kinds of test data. Preparation of test data plays a vital

role in the system testing. After preparing the test data, the system under study is tested using

that test data. While testing the system by which test data errors are again uncovered and

corrected by using above testing steps and corrections are also noted for future use.

TRAINING

Once the system is successfully developed the next important step is to ensure that the

administrators are well trained to handle the system. This is because the success of a system

invariably depends on how they are operated and used. The implementation depends upon the

right people being at the right place at the right time. Education involves creating the right

4
Canteen

atmosphere and motivating the user. The administrators are familiarized with the run procedures

of the system, working through the sequence of activities on an ongoing basis.

Implementation is the state in the project where the theoretical design is turned into a working

system. By this, the users get the confidence that the system will work effectively. The system

can be implemented only after through testing.

The systems personnel check the feasibility of the system. The actual data were inputted to the

system and the working of the system was closely monitored. The master option was selected

from the main menu and the actual data were input through the corresponding input screens. The

data movement was studied and found to be correct queries option was then selected and this

contains various reports. Utilities provide various data needed for inventory was input and the

module was test run. Satisfactory results were obtained. Reports related to these processes were

also successfully generated. Various input screen formats are listed in the appendix.

Implementation walkthroughs ensure that the completed system actually solves the original

problem. This walkthrough occurs just before the system goes into use, and it should include

careful review of all manuals, training materials and system documentation. Again, users, the

analyst and the members of the computer services staff may attend this meeting.

4
Canteen

Coding

Canteen Details:

Imports System.Data.SqlClient

Public Class CanteenDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

Dim maxcode As String

Dim newrec As Boolean

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

System.EventArgs) Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select * from Canteendet order by Canteencode"

dr = cmd.ExecuteReader

ComboBoxCanteenCode.Items.Clear()

If dr.HasRows Then

While (dr.Read)

ComboBoxCanteenCode.Items.Add(dr("Canteencode"))

End While

End If

cn.Close()

End Sub

4
Canteen

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

System.EventArgs) Handles ButtonAdd.Click

ClearData()

enaControls(False)

newrec = True

End Sub

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

System.EventArgs) Handles ButtonSave.Click

If newrec = True Then 'New Record

If TextBoxName.Text = "" Then

MessageBox.Show("Enter Canteen Name", "New Record")

Exit Sub

End If

If TextBoxType.Text = "" Then

MessageBox.Show("Enter Canteen Type", "New Record")

Exit Sub

End If

If TextBoxCity.Text = "" Then

MessageBox.Show("Enter City Name", "New Record")

Exit Sub

End If

If TextBoxAddress.Text = "" Then

MessageBox.Show("Enter Address Name", "New Record")

Exit Sub

End If

4
Canteen
If TextBoxManager.Text = "" Then

MessageBox.Show("Enter Manager Name", "New Record")

Exit Sub

End If

If TextBoxMob.Text = "" Then

TextBoxMob.Text = "-"

End If

If TextBoxOPh.Text = "" Then

TextBoxOPh.Text = "-"

End If

TextBoxFCode.Text = fcode

If TextBoxFCode.Text = "" Then

MessageBox.Show("Select Food Code", "New Record")

Exit Sub

End If

If TextBoxRem.Text = "" Then

TextBoxRem.Text = "-"

End If

'Generate Canteen code

cn.Open()

cmd.CommandText = "select max(Canteencode) from Canteendet"

dr = cmd.ExecuteReader

dr.Read()

maxcode = dr(0)

cn.Close()

maxcode = Val(maxcode) + 1

'Generate insert query

qry = "insert into Canteendet values ('" & maxcode & "','"

4
Canteen
qry = qry & TextBoxName.Text & "','"

qry = qry & TextBoxType.Text & "','"

qry = qry & TextBoxAddress.Text & "','"

qry = qry & TextBoxCity.Text & "','"

qry = qry & TextBoxManager.Text & "','"

qry = qry & TextBoxMob.Text & "','"

qry = qry & TextBoxOPh.Text & "','"

qry = qry & TextBoxRem.Text & "','"

qry = qry & TextBoxFCode.Text & "')"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

'Make an entry in facility table

cn.Open()

qry = "insert into facility (Canteencode) values ('" & maxcode &

"')" cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

'Make an entry in roomdet table

cn.Open()

qry = "insert into roomdet (Canteencode) values ('" & maxcode & "')"

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

'prompt user

Dim s As

String

5
Canteen

5
Canteen
s = "Record Inserted Successfully-Canteen Code: " & maxcode

MessageBox.Show(s, "New Account")

ComboBoxCanteenCode.Items.Add(maxcode)

enaControls(True)

Else 'Record Update

If TextBoxName.Text = "" Then

MessageBox.Show("Enter Canteen Name", "Update Record")

Exit Sub

End If

If TextBoxType.Text = "" Then

MessageBox.Show("Enter Canteen Type", "Update Record")

Exit Sub

End If

If TextBoxCity.Text = "" Then

MessageBox.Show("Enter City Name", "Update Record")

Exit Sub

End If

If TextBoxAddress.Text = "" Then

MessageBox.Show("Enter Address Name", "Update Record")

Exit Sub

End If

If TextBoxManager.Text = "" Then

MessageBox.Show("Enter Manager Name", "Update Record")

Exit Sub

End If

If TextBoxMob.Text = "" Then

TextBoxMob.Text = "-"

End If

If TextBoxOPh.Text = "" Then

5
Canteen
TextBoxOPh.Text = "-"

End If

If TextBoxFCode.Text = "" Then

TextBoxFCode.Text = fcode

End If

TextBoxFCode.Text = fcode

If TextBoxFCode.Text = "" Then

MessageBox.Show("Select Food Code", "Update Record")

Exit Sub

End If

If TextBoxRem.Text = "" Then

TextBoxRem.Text = "-"

End If

'Generate update query

qry = "update Canteendet set "

qry = qry & "name='" & TextBoxName.Text & "',"

qry = qry & "type='" & TextBoxType.Text & "',"

qry = qry & "address='" & TextBoxAddress.Text & "',"

qry = qry & "city='" & TextBoxCity.Text & "',"

qry = qry & "manager='" & TextBoxManager.Text & "',"

qry = qry & "mob='" & TextBoxMob.Text & "',"

qry = qry & "offph='" & TextBoxOPh.Text & " ',"

qry = qry & "remarks='" & TextBoxRem.Text & "',"

qry = qry & "foodcode='" & TextBoxFCode.Text & "'

"

qry = qry & "where Canteencode='" & ComboBoxCanteenCode.Text & "'"

cn.Open()

cmd.CommandText = qry

5
Canteen
cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record updated Successfully-Canteen Code: " & ComboBoxCanteenCode.Text

MessageBox.Show(s, "Update Record")

enaControls(True)

End If

End Sub

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

System.EventArgs) Handles ButtonSelectFCode.Click

Dim fd As New FoodDet

'fd.MdiParent = Me

fd.ButtonSel.Enabled = True

fd.Show()

End Sub

Private Sub ComboBoxCanteenCode_Click(ByVal sender As Object, ByVal e As

System.EventArgs) Handles ComboBoxCanteenCode.Click

End Sub

Public Sub bindData()

TextBoxName.Text = dr(1)

TextBoxType.Text = dr(2)

TextBoxAddress.Text = dr(3)

TextBoxCity.Text = dr(4)

TextBoxManager.Text = dr(5)

TextBoxMob.Text = dr(6)
5
Canteen
TextBoxOPh.Text = dr(7)

TextBoxRem.Text = dr(8)

TextBoxFCode.Text = dr(9)

End Sub

Public Sub enaControls(ByVal en As Boolean)

ButtonAdd.Enabled = en

ButtonDel.Enabled = en

ButtonMod.Enabled = en

If en = True Then

ButtonSave.Enabled =

False

Else

ButtonSave.Enabled = True

End If

ButtonSearch.Enabled = en

ComboBoxCanteenCode.Enabled = en

End Sub

Public Sub ClearData()

TextBoxName.Text = ""

TextBoxType.Text = ""

TextBoxAddress.Text =

"" TextBoxCity.Text =

"" TextBoxManager.Text

= "" TextBoxMob.Text =

"" TextBoxOPh.Text = ""

5
Canteen
TextBoxRem.Text = ""

TextBoxFCode.Text =

""

End Sub

Private Sub ComboBoxCanteenCode_SelectedIndexChanged(ByVal sender As Object, ByVal e

As System.EventArgs) Handles ComboBoxCanteenCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select * from Canteendet where Canteencode = '" &

ComboBoxCanteenCode.Text & "'"

dr = cmd.ExecuteReader

dr.Read()

bindData()

cn.Close()

End Sub

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

System.EventArgs) Handles ButtonMod.Click

If ComboBoxCanteenCode.Text = "" Then

MessageBox.Show("Select Canteen Code", "Update Record")

Exit Sub

End If

enaControls(False)

newrec = False

fcode = TextBoxFCode.Text

End Sub

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

System.EventArgs) Handles ButtonDel.Click


5
Canteen
Dim Code As String

5
Canteen
Code = ComboBoxCanteenCode.Text

If (Code = "") Then

MessageBox.Show("Select Canteen code to delete", "delete check")

Exit Sub

End If

If (MessageBox.Show("Record will be deleted permanently", "Record Deletion",

MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =

DialogResult.OK) Then

cn.Open()

cmd.CommandText = "delete from Canteendet where Canteencode = '" & Code &

"'" cmd.ExecuteNonQuery()

cn.Close()

MessageBox.Show("Record Deleted sucessfully", "Deleted Record")

ComboBoxCanteenCode.Items.Remove(Code)

ClearData()

End If

End

Sub End

Class

5
Canteen

Facility Details:

Imports System.Data.SqlClient

Public Class FacilityDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

Dim sbr, dbr, fr As Integer

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

System.EventArgs) Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select * from facility order by Canteencode"

dr = cmd.ExecuteReader

ComboBoxCanteenCode.Items.Clear()

If dr.HasRows Then

While (dr.Read)

ComboBoxCanteenCode.Items.Add(dr("Canteencode"))

End While

End If

cn.Close()

End Sub

5
Canteen
Private Sub ComboBoxCanteenCode_SelectedIndexChanged(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles ComboBoxCanteenCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select * from facility where Canteencode = '" &

ComboBoxCanteenCode.Text & "'"

dr = cmd.ExecuteReader

dr.Read()

binddata()

sbr = dr("sbedrms")

dbr = dr("dbedrms")

fr =

dr("fambedrms")

cn.Close()

End Sub

Public Sub binddata()

If IsDBNull(dr("sbedrms")) Then

TextBoxSBR.Text = 0

Else

TextBoxSBR.Text = dr("sbedrms")

End If

If IsDBNull(dr("sbedrmsav")) Then

TextBoxSBRA.Text = 0

Else

TextBoxSBRA.Text = dr("sbedrmsav")

End If

If IsDBNull(dr("dbedrms")) Then

TextBoxDBR.Text = 0

6
Canteen
Else

TextBoxDBR.Text = dr("dbedrms")

End If

If IsDBNull(dr("dbedrmsav")) Then

TextBoxDBRA.Text = 0

Else

TextBoxDBRA.Text = dr("dbedrmsav")

End If

If IsDBNull(dr("fambedrms")) Then

TextBoxFR.Text = 0

Else

TextBoxFR.Text = dr("fambedrms")

End If

If IsDBNull(dr("fambedrmsav")) Then

TextBoxFRA.Text = 0

Else

TextBoxFRA.Text = dr("fambedrmsav")

End If

If IsDBNull(dr("numoftables")) Then

TextBoxNOT.Text = 0

Else

TextBoxNOT.Text = dr("numoftables")

End If

If IsDBNull(dr("convhallcap")) Then

TextBoxCHC.Text = 0

Else

6
Canteen
TextBoxCHC.Text = dr("convhallcap")

End If

If IsDBNull(dr("sbedrmschg")) Then

TextBoxSBRChg.Text = 0

Else

TextBoxSBRChg.Text = dr("sbedrmschg")

End If

If IsDBNull(dr("dbedrmschg")) Then

TextBoxDBRChg.Text = 0

Else

TextBoxDBRChg.Text = dr("dbedrmschg")

End If

If IsDBNull(dr("fambedrmschg")) Then

TextBoxFRChg.Text = 0

Else

TextBoxFRChg.Text = dr("fambedrmschg")

End If

If IsDBNull(dr("tabchg")) Then

TextBoxTabChg.Text = 0

Else

TextBoxTabChg.Text = dr("tabchg")

End If

Dim s As String

6
Canteen

If IsDBNull(dr("parking")) Then

RadioButtonParkNotAva.Checked =

True

Else

s = dr("parking")

If (s.Substring(0, 1) = "N") Then

RadioButtonParkNotAva.Checked = True

Else

RadioButtonParkAva.Checked = True

End If

End If

If IsDBNull(dr("swimpool")) Then

RadioButtonSwimNotAva.Checked =

True

Else

s = dr("swimpool")

If (s.Substring(0, 1) = "N") Then

RadioButtonSwimNotAva.Checked = True

Else

RadioButtonSwimAva.Checked = True

End If

End If

If IsDBNull(dr("lodging")) Then

RadioButtonLodgNotAva.Checked =

True

Else

6
Canteen
s = dr("lodging")

If (s.Substring(0, 1) = "N") Then

RadioButtonLodgNotAva.Checked = True

6
Canteen
Else

RadioButtonLodgAva.Checked = True

End If

End If

If IsDBNull(dr("theatre")) Then

RadioButtonTheatNotAva.Checked =

True

Else

s = dr("theatre")

If (s.Substring(0, 1) = "N") Then

RadioButtonTheatNotAva.Checked =

True

Else

RadioButtonTheatAva.Checked = True

End If

End If

End Sub

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

System.EventArgs) Handles ButtonEdit.Click

If ComboBoxCanteenCode.Text = "" Then

MessageBox.Show("Select Canteen Code", "Edit Record")

Exit Sub

End If

ButtonSave.Enabled = True

ButtonEdit.Enabled = False

End Sub

6
Canteen
Private Sub ButtonSave_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles ButtonSave.Click

If TextBoxSBR.Text = "" Then

TextBoxSBR.Text = 0

TextBoxSBRA.Text =

0 Else

If Val(TextBoxSBR.Text) < sbr Then

TextBoxSBRA.Text = Val(TextBoxSBRA.Text) - (sbr - Val(TextBoxSBR.Text))

Else

If Val(TextBoxSBR.Text) > sbr Then

TextBoxSBRA.Text = Val(TextBoxSBRA.Text) + (Val(TextBoxSBR.Text) -

sbr)

End If

End If

End If

If TextBoxDBR.Text = "" Then

TextBoxDBR.Text = 0

TextBoxDBRA.Text = 0

Else

If Val(TextBoxDBR.Text) < dbr Then

TextBoxDBRA.Text = Val(TextBoxDBRA.Text) - (dbr - Val(TextBoxDBR.Text))

Else

If Val(TextBoxDBR.Text) > dbr Then

TextBoxDBRA.Text = Val(TextBoxDBRA.Text) + (Val(TextBoxDBR.Text) -


dbr)

End If

End If

End If

6
Canteen
I xtBoxFR.Text = 0

f TextBoxFRA.Text = 0

Else

T If Val(TextBoxFR.Text) < fr Then

e TextBoxFRA.Text = Val(TextBoxFRA.Text) - (fr - Val(TextBoxFR.Text))

x Else

t If Val(TextBoxFR.Text) > fr Then

B TextBoxFRA.Text = Val(TextBoxFRA.Text) + (Val(TextBoxFR.Text) - fr)

o End If

x End If

F End If

R If TextBoxCHC.Text = "" Then

. TextBoxCHC.Text = 0

T End If

e If TextBoxNOT.Text = "" Then

x TextBoxNOT.Text = 0

t End If

= If TextBoxSBRChg.Text = "" Then

TextBoxSBRChg.Text = 0

" End If

"

If TextBoxDBRChg.Text = "" Then

T TextBoxDBRChg.Text = 0

h End If

n If TextBoxFRChg.Text = "" Then

63
Canteen
TextBoxFRChg.Text = 0

End If

'Generate update query

qry = "update facility set "

qry = qry & "sbedrms=" & TextBoxSBR.Text & ","

qry = qry & "sbedrmsav=" & TextBoxSBRA.Text & ","

qry = qry & "dbedrms=" & TextBoxDBR.Text & ","

qry = qry & "dbedrmsav=" & TextBoxDBRA.Text & ","

qry = qry & "fambedrms=" & TextBoxFR.Text & ","

qry = qry & "fambedrmsav=" & TextBoxFRA.Text & ","

qry = qry & "numoftables=" & TextBoxNOT.Text & ","

qry = qry & "convhallcap=" & TextBoxCHC.Text & ","

qry = qry & "sbedrmschg=" & TextBoxSBRChg.Text & ","

qry = qry & "dbedrmschg=" & TextBoxDBRChg.Text & ","

qry = qry & "fambedrmschg=" & TextBoxFRChg.Text & ","

qry = qry & "tabchg=" & TextBoxTabChg.Text & ","

If (RadioButtonParkNotAva.Checked = True) Then

qry = qry & "parking='Not Available', "

Else

qry = qry & "parking='Available', "

End If

If (RadioButtonSwimNotAva.Checked = True) Then

qry = qry & "swimpool='Not Available', "

Else

qry = qry & "swimpool='Available', "

End If

64
Canteen
If (RadioButtonLodgNotAva.Checked = True) Then

qry = qry & "logding='Not Available', "

Else

qry = qry & "lodging='Available', "

End If

If (RadioButtonTheatNotAva.Checked = True) Then

qry = qry & "theatre='Not Available' "

Else

qry = qry & "theatre='Available' "

End If

qry = qry & "where Canteencode='" & ComboBoxCanteenCode.Text & "'"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record updated Successfully-Canteen Code: " & ComboBoxCanteenCode.Text

MessageBox.Show(s, "Update Record")

sbr = TextBoxSBR.Text

dbr = TextBoxDBR.Text

fr = TextBoxFR.Text

ButtonSave.Enabled = False

ButtonEdit.Enabled = True

End Sub

65
Canteen
Private Sub RadioButtonTheatNotAva_CheckedChanged(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles RadioButtonTheatNotAva.CheckedChanged

End Sub

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

System.EventArgs) Handles GroupBox4.Enter

End Sub

Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles Label5.Click

End Sub

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

e As System.EventArgs) Handles RadioButtonLodgNotAva.CheckedChanged

End Sub

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

System.EventArgs) Handles GroupBox1.Enter

End

Sub End

Class

66
Canteen

Food Details:

Imports System.Data.SqlClient

Public Class FoodDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

Dim newrec As Boolean

Dim maxcode As String

Private Sub FoodDet_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select * from fooddet"

dr = cmd.ExecuteReader

ComboBoxFCode.Items.Clear()

If dr.HasRows Then

While

(dr.Read)

ComboBoxFCode.Items.Add(dr("foodcode"))

End While

End If

cn.Close()

End Sub

67
Canteen
Private Sub ComboBoxFCode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e

68
Canteen
As System.EventArgs) Handles ComboBoxFCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select * from fooddet where foodcode = '" & ComboBoxFCode.Text

& "'"

dr = cmd.ExecuteReader

dr.Read()

TextBoxFCat.Text = dr("foodcat")

TextBoxSpeType.Text = dr("spltype")

cn.Close()

End Sub

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

System.EventArgs) Handles ButtonSel.Click

'CanteenDet.TextBoxFCode.Text =

ComboBoxFCode.Text fcode = ComboBoxFCode.Text

ButtonSel.Enabled = False

Me.Close()

End Sub

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

As System.EventArgs) Handles ButtonClose.Click

Me.Close()

End Sub

69
Canteen
Private Sub ButtonAdd_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles ButtonAdd.Click

ClearData()

EnaControls(False)

newrec = True

End Sub

Public Sub bindData()

TextBoxFCat.Text = dr(1)

TextBoxSpeType.Text =

dr(2)

End Sub

Public Sub enaControls(ByVal en As Boolean)

ButtonAdd.Enabled = en

ButtonDel.Enabled = en

ButtonUpdate.Enabled = en

If en = True Then

ButtonSave.Enabled =

False

Else

ButtonSave.Enabled = True

End If

ComboBoxFCode.Enabled = en

End Sub

Public Sub ClearData()

TextBoxFCat.Text = ""

70
Canteen
TextBoxSpeType.Text =

""

End Sub

71
Canteen

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

System.EventArgs) Handles ButtonUpdate.Click

If ComboBoxFCode.Text = "" Then

MessageBox.Show("Select Food Code", "Update Record")

Exit Sub

End If

enaControls(False)

newrec = False

End Sub

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

System.EventArgs) Handles ButtonSave.Click

If newrec = True Then 'New Record

If TextBoxFCat.Text = "" Then

MessageBox.Show("Enter Food Category", "New Record")

Exit Sub

End If

If TextBoxSpeType.Text = "" Then

MessageBox.Show("Enter Speciality Type", "New Record")

Exit Sub

End If

'Generate FOOD code

cn.Open()

cmd.CommandText = "select max(foodcode) from fooddet"

dr = cmd.ExecuteReader

dr.Read()

maxcode =

dr(0)

72
Canteen
cn.Close()

maxcode = Val(maxcode) + 1

'Generate insert query

qry = "insert into fooddet values ('" & maxcode & "','"

qry = qry & TextBoxFCat.Text & "','"

qry = qry & TextBoxSpeType.Text & "')"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record Inserted Successfully-Food Code: " & maxcode

MessageBox.Show(s, "New Account")

ComboBoxFCode.Items.Add(maxcode)

enaControls(True)

Else 'Record Update

If TextBoxFCat.Text = "" Then

MessageBox.Show("Enter Food Category", "Update Record")

Exit Sub

End If

If TextBoxSpeType.Text = "" Then

MessageBox.Show("Enter Food Speciality", "Update Record")

Exit Sub

End If

'Generate update query

qry = "update fooddet set "

qry = qry & "foodcat='" & TextBoxFCat.Text & "',"

qry = qry & "spltype='" & TextBoxSpeType.Text & "'"

73
Canteen
qry = qry & "where foodcode='" & ComboBoxFCode.Text & "'"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record updated Successfully-Food Code: " & ComboBoxFCode.Text

MessageBox.Show(s, "Update Record")

enaControls(True)

End If

End Sub

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

System.EventArgs) Handles ButtonDel.Click

Dim Code As String

Code = ComboBoxFCode.Text

If (Code = "") Then

MessageBox.Show("Select food code to delete", "delete check")

Exit Sub

End If

If (MessageBox.Show("Record will be deleted permanently", "Record Deletion",

MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =

DialogResult.OK) Then

cn.Open()

cmd.CommandText = "delete from fooddet where foodcode = '" & Code & "'"

cmd.ExecuteNonQuery()

cn.Close()

74
Canteen
MessageBox.Show("Record Deleted sucessfully", "Deleted Record")

ComboBoxFCode.Items.Remove(Code)

ClearData()

End If

End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles Label1.Click

End

Sub End

Class

75
Canteen

Room Details:

Imports System.Data.SqlClient

Public Class RoomDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

Dim maxsbr, maxdbr, maxfr As Integer

Dim sbr, dbr, fr As Integer

Private Sub RoomDet_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select * from roomdet order by Canteencode"

dr = cmd.ExecuteReader

ComboBoxCanteenCode.Items.Clear()

If dr.HasRows Then

While (dr.Read)

ComboBoxCanteenCode.Items.Add(dr("Canteencode"))

End While

End If

cn.Close()

End Sub

Private Sub ComboBoxCanteenCode_SelectedIndexChanged(ByVal sender As System.Object,

76
Canteen
ByVal e As System.EventArgs) Handles ComboBoxCanteenCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select

sbedrms,dbedrms,fambedrms,sbedrmstype,sbedrmscat,dbedrmstype,dbedrmscat,fambedrmstype,fam

bedrmscat " & _

" from Facility, RoomDet where Facility.CanteenCode = RoomDet.CanteenCode and

facility.CanteenCode='" _

& ComboBoxCanteenCode.Text & "'"

dr = cmd.ExecuteReader

dr.Read()

maxsbr = dr("sbedrms")

maxdbr = dr("dbedrms")

maxfr = dr("fambedrms")

TextBoxSBR.Text =

maxsbr TextBoxDBR.Text

= maxdbr TextBoxFR.Text

= maxfr

ComboBoxSBRType.Text = dr("sbedrmstype")

ComboBoxSBRCat.Text = dr("sbedrmscat")

ComboBoxDBRType.Text = dr("dbedrmstype")

ComboBoxDBRCat.Text = dr("dbedrmscat")

ComboBoxFRType.Text = dr("fambedrmstype")

ComboBoxFRCat.Text = dr("fambedrmscat")

cn.Close()

End Sub

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

System.EventArgs) Handles ButtonEdit.Click

If ComboBoxCanteenCode.Text = "" Then

77
Canteen
MessageBox.Show("Select Canteen Code", "Edit Record")

Exit Sub

End If

ButtonSave.Enabled = True

ButtonEdit.Enabled = False

enable(True)

End Sub

Public Sub enable(ByVal e As Boolean)

ComboBoxSBRType.Enabled = e

ComboBoxSBRCat.Enabled = e

ComboBoxDBRType.Enabled = e

ComboBoxDBRCat.Enabled = e

ComboBoxFRType.Enabled = e

ComboBoxFRCat.Enabled = e

End Sub

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

System.EventArgs) Handles ButtonSave.Click

'Generate update query

qry = "update roomdet set "

qry = qry & "sbedrmstype='" & ComboBoxSBRType.Text & "',"

qry = qry & "sbedrmscat='" & ComboBoxSBRCat.Text & "',"

qry = qry & "dbedrmstype='" & ComboBoxDBRType.Text & "',"

qry = qry & "dbedrmscat='" & ComboBoxDBRCat.Text & "',"

qry = qry & "fambedrmstype='" & ComboBoxFRType.Text & "',"

qry = qry & "fambedrmscat='" & ComboBoxFRCat.Text & "' "

qry = qry & "where Canteencode='" & ComboBoxCanteenCode.Text & "'"

cn.Open()

cmd.CommandText = qry

78
Canteen
cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record updated Successfully-Canteen Code: " & ComboBoxCanteenCode.Text

MessageBox.Show(s, "Update Record")

enable(False)

ButtonSave.Enabled = False

ButtonEdit.Enabled = True

End

Sub End

Class

79
Canteen

Guest Details:

Imports System.Data.SqlClient

Public Class GuestDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

Dim newrec As Boolean

Dim maxcode As String

Private Sub GuestDet_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select * from guestdet"

dr = cmd.ExecuteReader

ComboBoxGuestCode.Items.Clear()

If dr.HasRows Then

While

(dr.Read)

ComboBoxGuestCode.Items.Add(dr("guestcode"))

End While

End If

cn.Close()

End Sub

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

System.EventArgs) Handles ButtonAdd.Click

80
Canteen
ClearData()

81
Canteen
EnaControls(False)

newrec = True

End Sub

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

System.EventArgs) Handles ButtonUpdate.Click

If ComboBoxGuestCode.Text = "" Then

MessageBox.Show("Select guest Code", "Update Record")

Exit Sub

End If

enaControls(False)

newrec = False

End Sub

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

System.EventArgs) Handles ButtonSave.Click

If newrec = True Then 'New Record

If TextBoxName.Text = "" Then

MessageBox.Show("Enter Name", "New Record")

Exit Sub

End If

If TextBoxMobile.Text = "" Then

MessageBox.Show("Enter Mobile Number", "New Record")

Exit Sub

End If

82
Canteen
If TextBoxAddress.Text = "" Then

MessageBox.Show("Enter Address", "New Record")

Exit Sub

End If

'Generate FOOD code

cn.Open()

cmd.CommandText = "select max(guestcode) from guestdet"

dr = cmd.ExecuteReader

dr.Read()

maxcode = dr(0)

cn.Close()

maxcode = Val(maxcode) + 1

'Generate insert query

qry = "insert into guestdet values ('" & maxcode & "','"

qry = qry & TextBoxName.Text & "','"

qry = qry & TextBoxMobile.Text & "','"

qry = qry & TextBoxAddress.Text & "')"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record Inserted Successfully-guest Code: " & maxcode

MessageBox.Show(s, "New Account")

ComboBoxGuestCode.Items.Add(maxcode)

enaControls(True)

Else 'Record Update

If TextBoxName.Text = "" Then

83
Canteen
MessageBox.Show("Enter Name", "Update Record")

Exit Sub

End If

If TextBoxMobile.Text = "" Then

MessageBox.Show("Enter Mobile Number", "Update Record")

Exit Sub

End If

If TextBoxAddress.Text = "" Then

MessageBox.Show("Enter Address", "Update Record")

Exit Sub

End If

'Generate update query

qry = "update guestdet set "

qry = qry & "name='" & TextBoxName.Text & "',"

qry = qry & "mob='" & TextBoxMobile.Text & "',"

qry = qry & "address='" & TextBoxAddress.Text & "' "

qry = qry & "where guestcode='" & ComboBoxGuestCode.Text & "'"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Record updated Successfully-Guest Code: " & ComboBoxGuestCode.Text

MessageBox.Show(s, "Update Record")

enaControls(True)

End If

End Sub

84
Canteen
Private Sub ButtonDel_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles ButtonDel.Click

Dim Code As String

Code = ComboBoxGuestCode.Text

If (Code = "") Then

MessageBox.Show("Select guest code to delete", "delete check")

Exit Sub

End If

If (MessageBox.Show("Record will be deleted permanently", "Record Deletion",

MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =

DialogResult.OK) Then

cn.Open()

cmd.CommandText = "delete from guestdet where guestcode = '" & Code &

"'" cmd.ExecuteNonQuery()

cn.Close()

MessageBox.Show("Record Deleted sucessfully", "Deleted Record")

ComboBoxGuestCode.Items.Remove(Code)

ClearData()

End If

End Sub

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

As System.EventArgs) Handles ButtonClose.Click

Me.Close()

End Sub

Public Sub bindData()

TextBoxName.Text = dr(1)
85
Canteen
TextBoxMobile.Text = dr(2)

TextBoxAddress.Text =

dr(3)

End Sub

Public Sub enaControls(ByVal en As Boolean)

ButtonAdd.Enabled = en

ButtonDel.Enabled = en

ButtonUpdate.Enabled = en

If en = True Then

ButtonSave.Enabled =

False

Else

ButtonSave.Enabled = True

End If

ComboBoxGuestCode.Enabled =

en

End Sub

Public Sub ClearData()

TextBoxName.Text = ""

TextBoxMobile.Text = ""

TextBoxAddress.Text =

""

End Sub

Private Sub ComboBoxGuestCode_SelectedIndexChanged(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles ComboBoxGuestCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select * from guestdet where guestcode = '"

86
Canteen
& ComboBoxGuestCode.Text & "'"

dr = cmd.ExecuteReader

87
Canteen
dr.Read()

TextBoxName.Text = dr("name")

TextBoxMobile.Text = dr("mob")

TextBoxAddress.Text = dr("address")

cn.Close()

End Sub

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

System.EventArgs) Handles TextBoxAddress.TextChanged

End

Sub End

Class

88
Canteen

Room Booking Details:

Imports System.Data.SqlClient

Public Class RoomBkDet

Dim cn As New SqlConnection("Data Source=image2\sqlexpress;Initial

Catalog=Canteen;Integrated Security=True")

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim qry As String

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

System.EventArgs) Handles MyBase.Load

cmd.Connection = cn

cn.Open()

cmd.CommandText = "select Canteencode from Canteendet order by Canteencode"

dr = cmd.ExecuteReader

ComboBoxCanteenCode.Items.Clear()

If dr.HasRows Then

While (dr.Read)

ComboBoxCanteenCode.Items.Add(dr("Canteencode"))

End While

End If

dr.Close()

cmd.CommandText = "select guestcode from guestdet order by guestcode"

dr = cmd.ExecuteReader

ComboBoxGuestCode.Items.Clear()

If dr.HasRows Then

While (dr.Read)

89
Canteen
ComboBoxGuestCode.Items.Add(dr("guestcode"))

End While

End If

cn.Close()

init()

End Sub

Private Sub ComboBoxCanteenCode_SelectedIndexChanged(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles ComboBoxCanteenCode.SelectedIndexChanged

cn.Open()

cmd.CommandText = "select * from facility where Canteencode = '" &

ComboBoxCanteenCode.Text & "'"

dr = cmd.ExecuteReader

dr.Read()

TextBoxSBRAV.Text = dr("sbedrmsav")

TextBoxDBRAV.Text = dr("dbedrmsav")

TextBoxFRAV.Text = dr("fambedrmsav")

TextBoxSBRChg.Text = dr("sbedrmschg")

TextBoxDBRChg.Text = dr("dbedrmschg")

TextBoxFRChg.Text =

dr("fambedrmschg")

cn.Close()

End Sub

Private Sub TextBoxSBRBkd_KeyPress(ByVal sender As Object, ByVal e As

System.Windows.Forms.KeyPressEventArgs) Handles TextBoxSBRBkd.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

90
Canteen
e.Handled = True

End If

If Asc(e.KeyChar) = 13 Then

TextBoxSBRTotChg.Text = Val(TextBoxSBRChg.Text) * Val(TextBoxSBRBkd.Text)

End If

End Sub

Public Sub init()

If TextBoxSBRBkd.Text = "" Then

TextBoxSBRBkd.Text = 0

End If

If TextBoxDBRBkd.Text = "" Then

TextBoxDBRBkd.Text = 0

End If

If TextBoxFRBkd.Text = "" Then

TextBoxFRBkd.Text = 0

End If

If TextBoxExChg.Text = "" Then

TextBoxExChg.Text = 0

End If

If TextBoxNumOfDays.Text = "" Then

TextBoxNumOfDays.Text = 0

End If

End Sub

Private Sub TextBoxExChg_KeyPress(ByVal sender As Object, ByVal e As

System.Windows.Forms.KeyPressEventArgs) Handles TextBoxExChg.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

e.Handled = True

End If
91
Canteen
If Asc(e.KeyChar) = 13 Then

TextBoxNetChg.Text = Val(TextBoxSBRTotChg.Text) + Val(TextBoxDBRTotChg.Text)

+ Val(TextBoxFRTotChg.Text) + Val(TextBoxExChg.Text)

End If

End Sub

Private Sub TextBoxDBRBkd_KeyPress(ByVal sender As Object, ByVal e As

System.Windows.Forms.KeyPressEventArgs) Handles TextBoxDBRBkd.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

e.Handled = True

End If

If Asc(e.KeyChar) = 13 Then

TextBoxDBRTotChg.Text = Val(TextBoxDBRChg.Text) * Val(TextBoxDBRBkd.Text)

End If

End Sub

Private Sub TextBoxFRBkd_KeyPress(ByVal sender As Object, ByVal e As

System.Windows.Forms.KeyPressEventArgs) Handles TextBoxFRBkd.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

e.Handled = True

End If

If Asc(e.KeyChar) = 13 Then

TextBoxFRTotChg.Text = Val(TextBoxFRChg.Text) * Val(TextBoxFRBkd.Text)

End If

End Sub

92
Canteen
Private Sub TextBoxAdv_KeyPress(ByVal sender As Object, ByVal e

As System.Windows.Forms.KeyPressEventArgs) Handles TextBoxAdv.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

e.Handled = True

End If

If Asc(e.KeyChar) = 13 Then

TextBoxBal.Text = Val(TextBoxGrnTot.Text) - Val(TextBoxAdv.Text)

End If

End Sub

Private Sub TextBoxNumOfDays_KeyPress(ByVal sender As Object, ByVal e As

System.Windows.Forms.KeyPressEventArgs) Handles TextBoxNumOfDays.KeyPress

If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then

e.Handled = True

End If

If Asc(e.KeyChar) = 13 Then

TextBoxGrnTot.Text = Val(TextBoxNumOfDays.Text) * Val(TextBoxNetChg.Text)

End If

End Sub

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

System.EventArgs) Handles ButtonBook.Click

If ComboBoxGuestCode.Text = "" Then

MessageBox.Show("Select Guest Code", "Room Booking")

Exit Sub

End If

If ComboBoxCanteenCode.Text = "" Then

MessageBox.Show("Select Canteen Code", "Room Booking")


93
Canteen
Exit Sub

End If

If (Val(TextBoxBal.Text) = 0) And (Val(TextBoxAdv.Text) = 0) Then

MessageBox.Show("Advance and balance cannot be zero or blank", "Room

Booking")
Exit Sub

End If

'Generate insert query

qry = "insert into rmbkdet values ('" & ComboBoxCanteenCode.Text & "','"

qry = qry & ComboBoxGuestCode.Text & "',"

qry = qry & TextBoxSBRBkd.Text & ","

qry = qry & TextBoxDBRBkd.Text & ","

qry = qry & TextBoxFRBkd.Text & ","

qry = qry & TextBoxGrnTot.Text & ","

qry = qry & TextBoxExChg.Text & ",'"

qry = qry & DateTimePickerBkDtFr.Text & "',"

qry = qry & TextBoxNumOfDays.Text & ","

qry = qry & TextBoxBal.Text & ")"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

94
Canteen
'decrease room available in facility table

Dim sbav, dbav, fbav As Integer

sbav = Val(TextBoxSBRAV.Text) - Val(TextBoxSBRBkd.Text)

dbav = Val(TextBoxDBRAV.Text) - Val(TextBoxDBRBkd.Text)

fbav = Val(TextBoxFRAV.Text) - Val(TextBoxFRBkd.Text)

qry = "update facility set "

qry = qry & "sbedrmsav=" & sbav & ","

qry = qry & "dbedrmsav=" & dbav & ","

qry = qry & "fambedrmsav=" & fbav

qry = qry & " where Canteencode='" & ComboBoxCanteenCode.Text & "'"

cn.Open()

cmd.CommandText = qry

cmd.ExecuteNonQuery()

cn.Close()

Dim s As String

s = "Room(s) Booked Successfully: "

MessageBox.Show(s, "New Booking")

End Sub

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

As System.EventArgs) Handles TextBoxSBRBkd.TextChanged

End

Sub End

Class

95
Canteen

Screen Shots

96
Canteen

LOGIN

97
Canteen

FOOD ITEM LIST

98
Canteen

Item Details

99
Canteen

Cashier Details

10
Canteen

Order For Staff

10
Canteen

Order For Student

10
Canteen

Billing Details

10
Canteen

CONCLUSION

"Canteen Management System " is a software package that keeps the day by day

tally record as a complete management. It can keep the information of Canteen

Details, Food Details, Staff Orders, Student Orders and Searching the transaction,

Sales Transaction report. Lastly this important part of this project is; it displays

reports, Statistical Summary of transactions type and Transaction Information.

10
Canteen

Bibliography

Books:

Beginning VS 2010.NET 4, by Imar

Spaanjaars.Professional VS.NET, by Bill

Evjen

VS .NET, by Toi B.

References:

http://www.slideshare.net

http://www.securesserver.net

http://www.edureka.co/blog/visual-studio-tutorial

101

You might also like