N.DHARANI

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 85

CANTEEN ORDERING DASHBOARD

A Project Report
submitted to Tamil Nadu Open University, Chennai
in partial fulfillment for
the award of the degree

BACHELOR OF COMPUTER APPLICATIONS

Submitted By
N.DHARANI
Enrollment Number: 211117100014

Under the guidance of


Dr.R.Kalaiarasi, MCA, Ph.D.,
Assistant professor

School of Computer Science


TAMIL NADU OPEN UNIVERSITY
577, Anna Salai, Saidapet,
Chennai 600 015.
June 2024
CERTIFICATE

This is to certify that the Project titled CANTEEN ORDERING DASHBOARD is an

original work of N.DHARANI and is being submitted in partial fulfillment for the award of the

Degree in Computer Applications/ Computer Science of Tamil Nadu Open University, Chennai

600015. This report or part of this report has not been submitted earlier either to this University or to

any other University / Institution for the fulfillment of the requirement of a course of study or published

/ presented for any other purpose.

Signature of the Student Signature of Guide with Seal

Place:

Date:
DECLARATION

I N.DHARANI a bonafide student of BCA Tamil Nadu Open University, Chennai would

like to declare that the dissertation entitled CANTEEN ORDERING DASHBOARD

submitted by me in partial fulfillment of the requirements for the award of the Degree of

BACHELOR OF COMPUTER APPLICATIONS is my original work.

Place:

Date: Signature of the candidate.


ABSTRACT

The main objective to develop CANTEEN ORDERING DASHBOARD Project is to


overcome the manual errors and make a computerized system. The purpose of CANTEEN
ORDERING DASHBOARD is to automate the existing manual system by the help of
computerized equipment’s and full- fledged computer software, fulfilling their requirements,
so that their valuable data/information can be stored for a longer period with easy accessing
and manipulation of the same.
TABLE OF CONTENT

S.NO TITLE PAGE NO

V
ABSTRACT

LIST OF ABBREVIATIONS VII

1. INTRODUCTION
1
1.1 INTRODUCTION OF THE PROJECT

1.2 EXISTING SYSTEM 2

1.3 PROPOSED SYSTEM 3

2. LITERATURE SURVEY& PROBLEM DEFINITION

2.1 LITERATURE SURVEY 5

2.2 PROBLEM DEFINITION 6

3. SOFTWARE DESCRIPTION & REQUIREMENT ANALYSIS

3.1 SOFTWARE DESCRIPTION 7

• DATASET COLLECTION AND


PREPROCESSING
3.2 REQUIREMENT ANALYSIS 9

3.3 DESIGN

` 3.3.1ARCHITECTURE DIAGRAM 11

3.3.2 DATA FLOW DIAGRAM 12

3.3.3 DATABASE TABLE DESIGN 17

VI
4. IMPLEMENTATION AND TESTING

4.1 LOGIN MODULE 19

4.2 EMPLOYEE MODULE 20

4.3 STOCK MODULE 22

4.4 SALES MODULE 25

5. TESTING 26

6. RESULT & CONCLUSION

6.1 RESULT 27

6.2 CONCLUSION 28

6.3 FUTURE ENHANCEMENT 29

7. CODING 40
8. REFERENCE 78

LIST OF FIGURES PAGE NO

Architecture Diagram 17

Data Flow Diagram 18

Database Table Design 21

VII
LIST OF ABBREVIATIONS

SQL : Structured Query Language


DFD : Data Flow Diagram
VB : Visual Basic
DE : Database Engine
MDI :ManagementDevelopmentInstitute

VIII
CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION

“CANTEEN ORDERING DASHBOARD” is to provide fast services to their


college students, Staffs etc. Usually, People have to go to canteen and order the
foods and they have to wait in queue for a long time to get the orders, but with
the help of this you just have to follow a very simple process to order your stuffs.
Organizations with large numbers of employees cannot handle a canteen with
manual processes. It has been developed to override the problems prevailing in
the practicing manual system. This project is supported to eliminate and, in some
cases, reduce the hardships faced by this existing system. This project is
reduced as much as possible to avoid errors while entering the data. It also
provides error message while entering invalid data. No formal knowledge is
needed for the user to use this system. Thus, by this all it proves it is user-
friendly. It has described above, can lead to error free, secure, reliable and fast
management system. It can assist the user to concentrate on their other activities
rather to concentrate on the record keeping. It has different Canteen needs;
therefore, we design exclusive) employee management systems that are
adapted to your managerial requirements. This is designed to assist in strategic
planning, and will help you ensure that your organization is equipped with the
right level of information and details for your future goals. These systems will
ultimately allow you to better manage resources.

1
1.2 EXISTING SYSTEM:

Review existing CANTEEN ORDERING DASHBOARDs, both in academic


literature and industry applications. Analyze the strengths and weaknesses of
these systems. Highlight any innovative features or approaches used in these
systems. Mobile Application in Canteen Ordering. Investigate the role of mobile
applications in CANTEEN ORDERING Dashboards. Explore how mobile apps
contribute to user convenience and accessibility. Discuss any challenges or
issues associated with mobile-based ordering systems.

1.3 PROPOSED SYSTEM:

This project is a system to store data of employees, sales, and order. The admin
canadd the employee list and update the employee details. Similarly, the employee
can manage sales and order. Developed using the visual studio Easy to manage
and understandable.

2
CHAPTER 2

LITERATURE SURVEY & PROBLEM DEFINITION

In the previous chapter, the existing system and the proposed system of the
proposed system of the project are discussed. This chapter deals with the
literature survey, problem definition and methodology. The problem definition
discusses about the objectives of the project and methodology used to develop the
project

2.1 LITERATURE SURVEY:

1. Abhishek Singh, AmitTanwar, Aditya Sawant, Chaitanya Parulekar,Kunal Yadav,


IT Department, MUMBAI University, Journal on Recent and Innovation Trends in
Computing and Communication, ISSN:2321-8169.

2. S. B. Patil, Srikantha Rao, P. S. Patil 2001 ‘Canteen Management Design


Principles’ Proceedings of the International Conference & Workshop on Trades in
Technology, pp. 765-766, viewed 7 October2001.
3. Tan-Hsu Tan, Ching-Su Chang, Yung-Fu Chen, Yung-Fa Huang, Tsung-Yu Liu,
“Developing an Intelligent-Restaurant with a Menu Recommender for Customer-
Centric Service”, Systems, Man, and Cybernetics, Part C: Applications and
Reviews, IEEE Transactions.
4. Tomoko Kashima, Shimpei Matsumoto, and Hiroaki Ishii, “Recommendation
Method with Rough Sets in Restaurant Point of Sales System”, PIMECS 2010 Vol II

5. Abhishek Singh, AmitTanwar, Aditya Sawant, Chaitanya Parulekar,Kunal Yadav,


IT Department, MUMBAI University, Journal on Recent and InnovationTrends in
Computing and Communication, ISSN:2321-8169.

3
2.2 PROBLEM DEFINITION:

This Project used to Manage the details of Items, Sales, Orders,


Product stock and also staff details. The purpose of this project is to
reduce the manual work for managing the items, sales, food, and
orders.

4
CHAPTER 3

SOFTWARE DESCRIPTION & REQIREMENT ANALYSIS

3.1 Software Description:


Dataset Collection and preprocessing:

Asp: The .NET platform .NET is a developer platform made up of tools, programming
languages, and libraries for building many different types of applications. The base
platform provides components that apply to all different types of apps. Additional
frameworks, such as ASP.NET, extend .NET with components for building specific types
of apps. Here are some things included in the .NET platform: The C#, F#, and Visual
Basic programming languages Base libraries for working with strings, dates, files/IO,
and more Editors and tools for Windows, Linux, macOS, and Docker ASP.NET
extends .NET ASP.NET extends the .NET platform with tools and libraries specifically for
building web apps. These are some things that ASP.NET adds to the .NET platform:
Base framework for processing web requests in C# or F# Web-page templating syntax,
known as Razor, for building dynamic web pages using C# Libraries for common web
patterns, such as Model View Controller (MVC) Authentication system that includes
libraries, a database, and template pages for handling logins, including multi-factor.

MySQL: SQL SERVER includes a variety of highly precise, configurable security features.
These features can empower administrators to implement defense-in-depth that is
optimized for the specific security risks of their environment. To learn about security
features, see Security Considerations for SQL server

5
3.2 REQUIREMENT ANALYSIS:

The purpose of the System Requirement Specification is to produce the specification


of the analysis task and also to establish complete information about the requirement,
behavior and other constraints such as functional performance and so on. The
goal of Software Requirement Specification is to completely specify the technical
requirements for the software product in a concise and unambiguous manner.

Hardware Configuration:

RAM : 4.00 GB
Hard disk : 160GB
Keyboard : 84 keys

Software configuration:

Operating System : Windows 10


Technology : Visual Studio
DATABASE ACESS : MICROSOFT

7
3.3DESIGN:

Modules:

• Admin Login

• Dashboard

• Item Entry: Add/Update/Delete Items details

• Stock Entry: add/update/delete item stock details

• Sales: sale item

• Reports: generate all report

• Total 25 forms used in this project

3.3.1 ARCHITECTURAL DIAGRAM:

Figure 3.1 Architecture diagram

8
3.3.2 DATAFLOW DIAGRAM:

CONTEXT LEVEL:

Login Login-info

Canteen
Loading-info
Loading
management
system

MDIParent
MDIParent Form-info

form

Figure 3.2 DFD diagram

9
First Level DFD:

Login Login-info

Canteen Loading-info
Loading
management
system
MDIParent
MDIParent Form-info

form

Figure 3.3 DFD diagram

SECOND LEVEL DFD:

Figure 3.4 DFD diagram

10
Figure 3.5 DFD diagram

11
Figure3.6DFDdiagram

12
3.3.3 Database Table Design:

Login:

Column DataType Constraint

Username nvarchar(20) Primary Key

Password nvarchar(20) Not Null

Usertype nvarchar(20) Not Null

Add Employee:

Column DataType Constraint

EmpId init Primary Key

EmpName nvarchar(50) Not Null

Designation nvarchar(50) Not Null

Salary numeric(30, 0) Not Null

Mobile numeric(30, 0) Not Null

Email nvarchar(50) Not Null

DOB nvarchar(50) Not Null

Address nvarchar(500) Not Null

City nvarchar(50) Not Null

State nvarchar(50) Not Null

PINNo numeric(30, 0) Not Null

Country nvarchar(50) Not Null

13
Add Item:

Column Data Type Constraint

ItemID int Primary Key

ItemTitle nvarchar(50) Not Null

ItemType nvarchar(50) Not Null

Cost nvarchar(50) Not Null

ItemDesc nvarchar(200) Not Null

Stock Entry:

Column Data Type Constraint

StockID int Null

ItemTitle nvarchar(50) Not Null

Quantity nvarchar(50) Not Null

ItemDesc nvarchar(50) Not Null

Sale Master:

Column Data Type Constraint

ID int Null

Customer nvarchar(50) Not Null

Mobile nvarchar(50) Not Null

Date nvarchar(50) Not Null

Totalsale nvarchar(50) Not Null

14
Sale Temp:

Column Data Type Constraint

saleID int Not Null

ID nvarchar(50) Not Null

ItemName nvarchar(50) Not Null

Quantity nvarchar(50) Not Null

TotalCost nvarchar(50) Not Null

AddDesignation:

Column Data Type Constraint

Designation nvarchar(50) Not Null

Add ItemType:

Column Data Type Constraint

ID int Not Null

ItemType nvarchar(50) Not Null

15
CHAPTER-4
IMPLEMENTATION AND TESTING

4.1 IMPLEMENTATION:

Implementation explains the working of this project and also explainseach and
every part of the modules in the project.

4.1.1 LOGIN MODULE:

Login module is a interface designed for the user and user type mentioned by the user.

Figure4.1 LOGIN MODULE

16
4.1.2 MDI PARENT FORM:

FIGURE4.2 MDI PARENT FORM

4.1.3 FORM ADD EMPLOYEE:

FIGURE 4.3 FORM ADD EMPLOYEE

17
4.1.4 Form Item:

In this module you can put the details of the Item, Item type and its cost. You can
Save, update, delete, clear the details of the product.

FIGURE 4.4 Form Item

4.1.5 FORM STOCKENTRY:


In this Module you can know about the items available in the canteen. Here we cansave,
update, delete and clear and quantity values.

FIGURE 4.5 FORM STOCKENTRY

18
4.1.6 FORMSALESENTRY:

FIGURE 4.6 FORMSALESENTRY

19
FIGURE 4.7 FORMSALESENTRY

4.1.8 FORM CHANGE PASSWORD:

FIGURE 4.8 FORM CHANGE PASSWORD

20
4.1.9 FORM ADD DESIGNATION:

FIGURE 4.9 FORM ADD DESIGNATION

4.1.10 FORM ADD ITEMTYPE:

FIGURE 4.10 FORM ADD ITEMTYPE

21
CHAPTER-5
TESTING

Reports of the CANTEEN ORDERING DASHBOARD

Admin can generate report on Products, Sales on various search criteria. Admin can
export the report of Orders, Food, Employee in excel format. Admin will be able to export
the report of Products, Sales, Employee, Orders in PDF format. Print functionality has been
implemented with all reports

FIGURE 5.1 REPORT

22
CHAPTER 6
RESULTS AND CONCLUSION
6.1 RESULT:

In this Canteen Automation System, we can store data of order which is given by
user or admin, food details and the users data into database. In Food we can add
data likefood name, category and amount of the food into database. In Order we can
store data likes user id, date, time, category of food, name, quantity and total of
food.

6.2 CONCLUSION:

In conclusion Our project is only a humble venture to satisfy the needs to manage their
project work. Several user-friendly coding has also adopted. This package shall prove
to be a powerful package in satisfying all the requirements of the college. The objective
of project planning is to provide a frame work that enables the manger to make
reasonable estimates made within a limited time frame at the beginning of the software
project and should be updated regularly as the project progresses. At the end it is
concluded that we have made effort on following points...

A description of the background and context of the project and its relation to
work already done in the area. Made statement of the aim sand objectives of the project.
The description of Purpose, Scope, and applicability. We describe the requirement
Specifications of the system and the actions that can be done on these things.
We understand the problem domain and produce a model of the system, which
describes operations that can be performed on the system. We included features and
operations in detail, including screen layouts. The project could very well be enhanced
to further asper the requirements.

23
6.3 FUTURE ENHANCEMENT:

In a nutshell, I can be summarized that the future scope of the project circles
around maintaining information regarding:

• We can add printer in future.


• We can give more advance software for CANTEEN ORDERING
DASHBOARD including more facilities.

• We will host the platform on online servers to make it accessible worldwide


• Integrate multiple load balancers to distribute the loads of the system
• Create the master and slave database structure to reduce the overload
ofthe database queries

• Implement the backup mechanism for taking backup of codebase


anddatabase on regular basis on different servers

The above-mentioned points are the enhancements which can be done to


increase the applicability and usage of this project. Here we can maintain the
records of Canteen. Enhancements can be done to maintain all the Canteen,
College, Sells, Product, Meal. We have left all the options open so that if there is
any other future requirement in the system by the user for the enhancement of the
system then it is possible to implement them. In the last we would like to thanks all
the persons involved in the development of the system directly or indirectly.
We hope that the project will serve its purpose for which it is develop there by
underlining success of process.

24
7. CODING

VB CODING:

LOGIN FORM:

Imports System.Data.SqlClientPublic
Class Frmlogin
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal eAs
System.EventArgs) Handles btnlogin.Click
con.Open()

If Len(Trim(txtusername.Text)) = 0 Then MessageBox.Show("please


enter username", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
txtusername.Clear()
txtusername.Focus()Exit
Sub
ElseIf Len(Trim(txtpass.Text)) = 0 Then MessageBox.Show("please
enter valid password", "Input
Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
txtpass.Clear()
txtpass.Focus()
End If 'database
codeTry
If con.State = 1 Then con.Close()

cmd = New SqlCommand("select Username,Password,Usertype from tbLogin


with(nolock) where Username=@U and Password=@Pand Usertype=@UT",
con)
cmd.Parameters.AddWithValue("@U", txtusername.Text)
cmd.Parameters.AddWithValue("@P", txtpass.Text)
cmd.Parameters.AddWithValue("@UT", Cmbusertype.Text)
cmd.Connection = con
cmd.Connection.Open()
25
dr =cmd.ExecuteReader
If dr.HasRows Then

Username1 = txtusername.TextUtype

= Cmbusertype.Text Pass =
txtpass.Text
con.Close()

If (Utype = "Admin" Or Utype = "Manager") Then'show


admin from
txtpass.Clear()
txtusername.Clear()
Me.Hide()
'MDIParent1.Show()
Loading1.Show()

ElseIf Utype = "User" Then


txtpass.Clear()
txtusername.Clear() Me.Hide()
'MDIParent1.Show()
Loading1.Show()

End If
Else
MessageBox.Show("please enter valid password", "InputError",
MessageBoxButtons.OK, MessageBoxIcon.Warning)

End If

If con.State = 1 Then con.Close()Catch


ex As Exception
26
MsgBox(ex.Message)End
Try

27
End Sub

Private Sub btnexit_Click(ByVal sender As System.Object, ByVal eAs


System.EventArgs) Handles btnexit.Click
Dim result As Integer

result = MsgBox("Do you want to exit?", MsgBoxStyle.YesNo)If result =


DialogResult.Yes Then
Me.txtpass.Clear()
Me.txtusername.Clear()
Me.cmbusertype.Items.Clear()
Me.Dispose()
Exit Sub
Application.Exit()
Me.Close()
End If
End Sub
End Class

FORM
LOADING:

Public Class Loading1

Private Sub Loading1_Load(ByVal sender As System.Object, ByVale As


System.EventArgs) Handles MyBase.Load
Timer1.Start() ProgressBar1.Visible =
False
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal eAs


System.EventArgs) Handles Timer1.Tick
28
ProgressBar1.Increment(5)

If ProgressBar1.Value = ProgressBar1.Maximum Then


Me.Hide()
MDIParent1.Show()

29
Timer1.Stop()
End If

End Sub
End Class

FORM ADD EMPLOYEE:

Imports System.Data.SqlClientPublic
Class frmAddEmployee
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal eAs
System.EventArgs) Handles btnsave.Click
If txtName.Text = "" Then txtName.Focus() : Exit Sub

If txtAddress.Text = "" Then txtAddress.Focus() : Exit SubIf


txtCity.Text = "" Then txtCity.Focus() : Exit Sub
If txtcountry.Text = "" Then txtcountry.Focus() : Exit SubIf
txtDOB.Text = "" Then txtDOB.Focus() : Exit Sub
If txtEmail.Text = "" Then txtEmail.Focus() : Exit Sub

If txtmobile.Text = "" Then txtmobile.Focus() : Exit SubIf


txtPin.Text = "" Then txtPin.Focus() : Exit Sub
If txtSalary.Text = "" Then txtSalary.Focus() : Exit SubIf
txtState.Text = "" Then txtState.Focus() : Exit Sub 'database
code
Try

qry = "Insert into


tblEmployeeMgt(EmpName,Designation,Salary,Mobile,Email,DOB,Ad
dress,City,State,PINNo,Country)values('" & txtName.Text & "','" &
cmbDesignation.Text & "','" & txtSalary.Text & "','" & txtmobile.Text & "','" &
txtEmail.Text & "','" & txtDOB.Text & "','" & txtAddress.Text & "','" & txtCity.Text &
"','" & txtState.Text & "','" & txtPin.Text & "','"& txtcountry.Text & "')"
cmd = New SqlCommand(qry, con)
cmd.Connection.Open()
30
i = cmd.ExecuteNonQuery()

31
con.Close()

If (i > 0) Then

MsgBox("success", MsgBoxStyle.Information)
LoadDatainGrid()
clr()
Else
MsgBox("failed", MsgBoxStyle.Critical)End If
Catch ex As Exception
MsgBox(ex.Message)

End Try
cmd.Connection.Close()
End Sub

Public Sub LoadDatainGrid()

If con.State = 1 Then con.Close()

qry = "select * from tblEmployeeMgt with (nolock)"ds =


FetchData(qry)
If ds.Tables(0).Rows.Count > 0 Then
DataGridView1.DataSource = ds.Tables(0)
Else

MsgBox("No Record Found", MsgBoxStyle.Exclamation)End If


End Sub
Private Sub frmAddEmployee_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load

lblEID.Visible = False
BindCombo()
LoadDatainGrid()
End Sub

32
FORM ITEMENTRY:

Imports System.Data.SqlClientPublic
Class FrmItemEntry

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


As System.EventArgs) Handles MyBase.Load
BindCombo()
LoadDatainGrid()
End Sub

Private Sub BindCombo()


cmditemtype.Items.Clear()
ds.Clear()
qry = "select * from tblItemType with(nolock)"ds =
FetchData(qry)
If ds.Tables(0).Rows.Count > 0 Then

Dim a As Integer = ds.Tables(0).Rows.Count - 1Dim i


As Integer = 0

For i = 0 To a cmditemtype.Items.Add(ds.Tables(0).Rows(i)(1).ToString())
Next

Else

MsgBox("Record not found...try again",


MsgBoxStyle.Exclamation)
End If
End Sub

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


System.EventArgs) Handles btnsave.Click
If con.State = 1 Then con.Close()

33
If txttitle.Text = "" Then txttitle.Focus() : Exit Sub If
txtcost.Text = "" Then txtcost.Focus() : Exit Sub If
txtDesc.Text = "" Then txtDesc.Focus() : Exit Sub

34
If cmditemtype.Text = "" Then cmditemtype.Focus() : Exit Sub

Try

qry = "insert into tblItem(ItemTitle,ItemType,Cost,ItemDesc)values('" &


txttitle.Text & "','" & cmditemtype.Text & " ','" & txtcost.Text & "', '" &
txtDesc.Text & " ')"
i = InsertData(qry)If
(i >= 1) Then
MsgBox(" Data Inserted Successfully")
LoadDatainGrid()

Else

MsgBox(" Failed")
End Ifclr()
Catch ex As Exception
MsgBox(ex.Message)
End Try

End sub

FORM STOCKENTRY:

Imports System.Data.SqlClientPublic
Class frmstockentry

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


As System.EventArgs) Handles MyBase.Load
BindCombo()
LoadDatainGrid()
End Sub

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal eAs


System.EventArgs) Handles btnsave.Click
If con.State = 1 Then con.Close()
35
If txtdesc.Text = "" Then txtdesc.Focus() : Exit SubIf
txtqty.Text = "" Then txtqty.Focus() : Exit Sub

36
If cmbitems.Text = "" Then cmbitems.Focus() : Exit Sub

Try

qry = "insert into tablestock(ItemTitle,Quantity,ItemDesc) values('" &


cmbitems.Text & "','" & txtqty.Text & "', '" & txtdesc.Text& " ')"
i = InsertData(qry)If
(i >= 1) Then
MsgBox(" Data Inserted Successfully")
LoadDatainGrid()

Else

MsgBox(" Failed")clr()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

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


System.EventArgs) Handles btndelete.Click

Dim result As Integer = MsgBox("Do you want to delete stock?",


MsgBoxStyle.YesNo)
If result = DialogResult.Yes ThenIf _Id

= "" Then

MsgBox("select any row in gridview")Else


Try
qry = "delete from tablestock where StockID='" & _Id & "'"i =
InsertData(qry)

37
If (i > 0) Then

MessageBox.Show(" Record deleted Successfully")Else


MessageBox.Show("Record not found", "error",

38
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
LoadDatainGrid()clr()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End If
End Sub

FORM SALES ENTRY:

Imports System.Data.SqlClientPublic
Class frmsalesentry
Dim cost As String = "" Dim
MaxID As String = ""Dim qty
As String = "" Dim qty2 As
String = "" Dim tot As String =
""

Private Sub frmsalesentry_Load(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles MyBase.Load


txtdate.Text = Date.Today
End Sub

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


System.EventArgs) Handles btnadd.Click
If txtname.Text.Trim = "" Then txtname.Focus() : Exit Sub

If txtmobile.Text.Trim = "" Then txtmobile.Focus() : Exit SubMaxID = ""


qry = "Insert into tblsaleMaster(Customer,Mobile,Date) values('"&
txtname.Text & "','" & txtmobile.Text & " ','" & txtdate.Text & "')"
i = InsertData(qry)If
39
i >= 1 Then

MsgBox(" Add items into cart", MsgBoxStyle.Information)

40
Panel1.Visible = True
bindcmb() getMaxID()

Else

MsgBox(" Failed", MsgBoxStyle.Critical)End If


End Sub
'show items in combobox
Private Sub bindcmb()
qry = "select * from tblItem with (nolock)"Try
If con.State = 1 Then con.Close()
con.Open()
cmd = New SqlCommand(qry, con)

Dim sda As SqlDataAdapter = New SqlDataAdapter(cmd)'Fill the


Database with records from table.
Dim ds1 As DataSet = New DataSet()
sda.Fill(ds1, "tblItem")
'Dim a As Integer = Dim
i As Integer = 0
CmbItems.Items.Clear()
For i = 0 To ds1.Tables("tblItem").Rows.Count - 1
CmbItems.Items.Add(ds1.Tables("tblItem").Rows(i)(1).ToString())
Next

Catch ex As Exception

MessageBox.Show("cannot open connection ! ")End Try


End Sub

FORM CHANGE PASSWORD:

Imports System.Data.SqlClient Public


Class frmchangepassword
Private Sub txtclose_Click(ByVal sender As System.Object, ByVal eAs
System.EventArgs) Handles txtclose.Click
Me.Dispose()End
41
Sub

42
Private Sub btnchangepass_Click(ByVal sender As System.Object,ByVal e
As System.EventArgs) Handles btnchangepass.Click
If con.State = 1 Then con.Close()

If txtoldpass.Text = "" Then txtoldpass.Focus() : Exit Sub

If txtnewpass.Text = "" Then txtnewpass.Focus() : Exit Sub

If txtconfirmpass.Text = "" Then txtconfirmpass.Focus() : Exit SubIf


txtoldpass.Text = Module1.Pass
Then

If txtnewpass.Text = txtconfirmpass.Text ThenTry

qry = "update tbLogin set Password='" & txtnewpass.Text& "' where


Username='" & Module1.Username1 & "'"
i = InsertData(qry)If
i >= 1 Then
MsgBox(" Data Inserted Successfully")
txtconfirmpass.Clear() txtnewpass.Clear()
txtoldpass.Clear()
Module1.Username1 = ""
Me.Close() MDIParent1.Hide()
Frmlogin.Show()
Else

MsgBox("failed")End

If

Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
Else

43
MsgBox("Old Password Not Matched", MsgBoxStyle.Critical)
Me.Dispose()
End If
End Sub

44
End Class

FORM ADD DESIGNATION:

Imports System.Data.SqlClient Public


Class frmAddDesignation

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal eAs


System.EventArgs) Handles btnsave.Click
If con.State = 1 Then con.Close()

If txtdesign.Text = "" Then txtdesign.Focus() : Exit Sub

Try

qry = "insert into tblDesignation(Designation) values('" &


txtdesign.Text & "')"
i = InsertData(qry)If
(i >= 1) Then
MsgBox(" Data Inserted Successfully")
LoadDatainGrid()

Else

MsgBox(" Failed")End

If

Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub btnupdate_Click(ByVal sender As System.Object, ByVale As
System.EventArgs) Handles btnupdate.Click
45
If con.State = 1 Then con.Close()

If txtdesign.Text = "" Then txtdesign.Focus() : Exit SubTry

qry = "update tblDesignation set Designation='" &txtdesign.Text & "'


where ID='" & _Id & "' "

46
i = InsertData(qry)
If (i>= 1) Then

MsgBox(" Data Updated Successfully",


MsgBoxStyle.Information)
LoadDatainGrid()Else
MsgBox(" Failed")End
If

Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

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


System.EventArgs) Handles btndelete.Click
If con.State = 1 Then con.Close()

If txtdesign.Text = "" Then txtdesign.Focus() : Exit Sub

If _Id = "" Then MsgBox("select any row for delete") : Exit SubTry

qry = "Delete from tblDesignation where ID='" & _Id & "'" i =
InsertData(qry)
If i >= 1 Then

MsgBox("Data Deleted Successfully",


MsgBoxStyle.Information)
LoadDatainGrid()
txtdesign.Clear()
txtdesign.Focus()
Else

MsgBox("failed")End

If

Catch ex As Exception

47
MsgBox(ex.Message)
End Try
End Sub

48
FORM ADDITEMTYPE:

Imports System.Data.SqlClientPublic
Class FrmAddItemType
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal eAs
System.EventArgs) Handles btnsave.Click
If con.State = 1 Then con.Close()

If txtItemtype.Text = "" Then txtItemtype.Focus() : Exit Sub

Try

qry = "insert into tblItemType(ItemType) values('" &


txtItemtype.Text & "')"
i = InsertData(qry)If
(i >= 1) Then
MsgBox(" Data Inserted Successfully")
LoadDatainGrid()
txtItemtype.Clear()
txtItemtype.Focus()

Else

MsgBox(" Failed")End

If

Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub btnupdate_Click(ByVal sender As System.Object, ByVale As
System.EventArgs) Handles btnupdate.Click
If con.State = 1 Then con.Close()

If txtItemtype.Text = "" Then txtItemtype.Focus() : Exit Sub

49
If _Id = "" Then MsgBox("select any row for delete") : Exit SubTry
qry = "update tblItemType set ItemType ='" &
txtItemtype.Text & "' where ID='" & _Id & "' "

50
i = InsertData(qry)If
(i >= 1) Then
MsgBox(" Data Updated Successfully",
MsgBoxStyle.Information)
LoadDatainGrid()
txtItemtype.Clear()
txtItemtype.Focus()
Else

MsgBox(" Failed")End

If

Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

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


System.EventArgs) Handles btndelete.Click
If con.State = 1 Then con.Close()

If txtItemtype.Text = "" Then txtItemtype.Focus() : Exit Sub

If _Id = "" Then MsgBox("select any row for delete") : Exit SubTry
qry = "Delete from tblItemType where ID='" & _Id & "'"i =
InsertData(qry)
If i >= 1 Then

MsgBox("Data Deleted Successfully",


MsgBoxStyle.Information)
LoadDatainGrid()
txtItemtype.Clear()
txtItemtype.Focus()
Else

51
MsgBox("failed")End

If

Catch ex As Exception

52
MsgBox(ex.Message)
End Try
End Sub

Private Sub btnclose_Click(ByVal sender As System.Object, ByVal eAs


System.EventArgs) Handles btnclose.Click
Me.Dispose()End
Sub
Public Sub LoadDatainGrid()

If con.State = 1 Then con.Close()


ds.Clear() DataGridView1.DataSource
= ds

DataGridView1.DataSource = Nothing

qry = "select * from tblItemType with (nolock)"ds =


FetchData(qry)
If ds.Tables(0).Rows.Count > 0 Then
DataGridView1.DataSource = ds.Tables(0)
Else

MessageBox.Show("Data not Found............. ")

End If
End Sub
Private Sub FrmAddItemType_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
LoadDatainGrid()End
Sub

Private Sub DataGridView1_CellMouseClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)
HandlesDataGridView1.CellMouseClick

_Id = ""

If e.RowIndex >= 0 ThenTry


53
i = DataGridView1.CurrentRow.Index

_Id = DataGridView1.Item(0, i).Value Me.txtItemtype.Text =

54
DataGridView1.Item(1, i).Value
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
End Class

MODULE:

Imports System.Data

Imports System.Data.SqlClient

Module Module1

Public connectionstring As String = "Data Source=.;Initial


Catalog=DBcanteenVB; Integrated Security=true;"
Public con As New SqlConnection(connectionstring)Public
cmd As New SqlCommand
Public dr As SqlDataReader Public
Username1 As String = ""Public Utype
As String = "" Public Pass As String =
""
Public qry As String = "" Public
i As Integer = 0 Public ds As
New DataSet
Public da As New SqlDataAdapterPublic

_Id As String = ""

'search gridview
55
Public Function FetchData(ByVal qry As String) As DataSet

If con.State = 1 Then con.Close()


con.Open()
da = New SqlDataAdapter(qry, con)ds =

56
New DataSet()
da.Fill(ds)
Return ds
con.Close()
End Function

'Insert update delete

Public Function InsertData(ByVal qry As String) As IntegerIf


con.State = 1 Then con.Close()
cmd = New SqlCommand(qry, con)
cmd.Connection.Open()
i = cmd.ExecuteNonQuery()

If con.State = 1 Then con.Close()


Return i

End FunctionEnd
Module

FORM SALES REPORT:

Public Class frmsalesreport

Private Sub frmsalesreport_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load'TODO:
This line of code loads data into the
'salesreportDataSet.tablSaleTemp' table. You can move, or removeit, as
needed.

Me.tablSaleTempTableAdapter.Fill(Me.salesreportDataSet.tableSaleTemp)

57
Me.ReportViewer1.RefreshReport()End
Sub

End Class

58
MDI PARENT FORM:

Imports System.Windows.FormsPublic
Class MDIParent1
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As
EventArgs)
' Create a new instance of the child form.

Dim ChildForm As New System.Windows.Forms.Form' Make it


a child of this MDI form before showing it.
ChildForm.MdiParent = Me

m_ChildFormNumber += 1

ChildForm.Text = "Window " & m_ChildFormNumber

ChildForm.Show()End
Sub

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


EventArgs)
Dim OpenFileDialog As New OpenFileDialog
OpenFileDialog.InitialDirectory =
My.Computer.FileSystem.SpecialDirectories.MyDocuments OpenFileDialog.Filter

= "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"If (OpenFileDialog.ShowDialog(Me)

System.Windows.Forms.DialogResult.OK) Then

Dim FileName As String = OpenFileDialog.FileName' TODO:


Add code here to open the file.

59
End If
End Sub

Private Sub SaveAsToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
Dim SaveFileDialog As New SaveFileDialog

60
SaveFileDialog.InitialDirectory =
My.Computer.FileSystem.SpecialDirectories.MyDocuments SaveFileDialog.Filter
= "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"

If (SaveFileDialog.ShowDialog(Me) =
System.Windows.Forms.DialogResult.OK) Then
Dim FileName As String = SaveFileDialog.FileName

' TODO: Add code here to save the current contents of theform to a

file.

End If
End Sub

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


EventArgs)
Me.Close()
End Sub

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


EventArgs)
' Use My.Computer.Clipboard to insert the selected text orimages into
the clipboard
End Sub

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


EventArgs)
' Use My.Computer.Clipboard to insert the selected text orimages into
the clipboard
End Sub

61
Private Sub PasteToolStripMenuItem_Click(ByVal sender AsObject,
ByVal e As EventArgs)

'Use My.Computer.Clipboard.GetText() or

62
My.Computer.Clipboard.GetData to retrieve information from theclipboard.

End Sub

Private Sub ToolBarToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
'Me.ToolStrip.Visible = Me.ToolBarToolStripMenuItem.CheckedEnd Sub

Private Sub StatusBarToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
' Me.StatusStrip.Visible =
Me.StatusBarToolStripMenuItem.Checked
End Sub

Private Sub CascadeToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.Cascade)End
Sub

Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.TileVertical)End Sub

Private Sub TileHorizontalToolStripMenuItem_Click(ByVal senderAs Object,


ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.TileHorizontal)End Sub

Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender AsObject,


ByVal e As EventArgs)
Me.LayoutMdi(MdiLayout.ArrangeIcons)End Sub
63
Private Sub CloseAllToolStripMenuItem_Click(ByVal sender AsObject,
ByVal e As EventArgs)
' Close all child forms of the parent.

For Each ChildForm As Form In Me.MdiChildren

64
ChildForm.Close()
Next
End Sub

Private m_ChildFormNumber As Integer

Private Sub EXITToolStripMenuItem1_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
EXITToolStripMenuItem1.Click
Dim result As Integer

result = MsgBox("Do you want to exit?", MsgBoxStyle.YesNo)If result =


DialogResult.Yes Then

Me.Dispose() Exit
Sub Application.Exit()
Me.Close()
End If
End Sub

Private Sub AddEmployeeToolStripMenuItem_Click(ByVal senderAs


System.Object, ByVal e As System.EventArgs) Handles
AddEmployeeToolStripMenuItem.Click
frmAddEmployee.Show()End
Sub

Private Sub AddItemToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
AddItemToolStripMenuItem.Click
65
FrmItemEntry.Show()End
Sub

66
Private Sub AddStockToolStripMenuItem_Click(ByVal sender AsSystem.Object, ByVal
e As System.EventArgs) Handles AddStockToolStripMenuItem.Click
frmstockentry.Show()End
Sub

Private Sub SalesFormToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
SalesFormToolStripMenuItem.Click
frmsalesentry.Show()End
Sub

Private Sub ChangePasswordToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ChangePasswordToolStripMenuItem.Click
frmchangepassword.Show()End
Sub

Private Sub SalesReportToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
SalesReportToolStripMenuItem.Click
frmsalesreport.Show()End
Sub

Private Sub AAToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
AAToolStripMenuItem.Click
frmAddDesignation.Show()

67
Private Sub BBToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles

68
BBToolStripMenuItem.Click
FrmAddItemType.Show()End
Sub
End Class

SQL CODING:

tbLogin:

create table tbLogin(

Username nvarchar(20) Primary Key,


Password nvarchar(20),
Usertype nvarchar(20)

insert into tbLogin(Username,Password,Usertype)values('Ram','ram@123','Adm


in')
insert into tbLogin(Username,Password,Usertype)values('Rani','rani@123','Empl
oyee')
insert into tbLogin(Username,Password,Usertype)values('Sita','sita@123','Mana
ger')
insert into tbLogin(Username,Password,Usertype)values('Shakthi','shakthi@123
','Manager')

insert into tbLogin(Username,Password,Usertype)values('Sita','sita@123','Admin')


select * from tbLogin

tblEmployeeMgt:

create table
tblEmployeeMgt( EmpId int
69
identity(1,1) Primary Key,
EmpName nvarchar(50), Designation
nvarchar(50),
Salary numeric(30), Mobile
numeric(30), Email

70
nvarchar(50), DOB
nvarchar(30), Address
nvarchar(500),City
nvarchar(50), State
nvarchar(50), PINNo
numeric(30), Country
nvarchar(50),

set IDENTITY_INSERT tblEmployeeMgt ON;

Insert into tblEmployeeMgt


(EmpName,Designation,Salary,Mobile,Email,DOB,Address,City,State,
PINNo,Country)values
('Gp','Admin',60000,9895437103,'gp07@gmail.com','01/03/2000','T
N India','Chennai','TN','600044','India')select *
from tblEmployeeMgt

tblDesignation:

create table tblDesignation(

ID int identity(1,1) Primary Key,


Designation nvarchar(50)
)

select * from tblDesignation

insert into tblDesignation(Designation)values('Admin') insert into


tblDesignation(Designation)values('Staff') insert into
tblDesignation(Designation)values('Clerk') insert into
tblDesignation(Designation)values('Manager')insert into
tblDesignation(Designation)values('User') insert into
tblDesignation(Designation)values('SalesGirl')insert into

71
tblDesignation(Designation)values('SalesBoy')

72
tblItemType:

create table tblItemType(

ID int identity(1,1) Primary Key,


ItemType nvarchar(50),
)

select * from tblItemType with(nolock)order by ItemType select* from


tblDesignation with(nolock)order by Designation

insert into tblItemType(ItemType) values('Tea') insert into


tblItemType(ItemType) values('Coffee') insert into
tblItemType(ItemType) values('CoolDrink')insert into
tblItemType(ItemType) values('Samosa') insert into
tblItemType(ItemType) values('Veg') insert into
tblItemType(ItemType) values('Nonveg') insert into
tblItemType(ItemType) values('Sweet') insert into
tblItemType(ItemType) values('Pastries') insert into
tblItemType(ItemType) values('Sandwich')
insert into tblItemType(ItemType) values('Breads & cakes')insert into
tblItemType(ItemType) values('Snacks')

tblItem:

create table tblItem(

ItemID int identity(1,1) Primary Key,


ItemTitle nvarchar(50),
ItemType nvarchar(50), Cost
nvarchar(50), ItemDesc
nvarchar(200)
)

select * from tblItem

73
insert into tblItem Values('BreadRoll','Veg','30','VegBreadRoll')insert into
tblItem values('Tea','Drink','20','Tea')
insert into tblItem

74
values('BreadSandwitch','Veg','30','Breadsandwitch')

insert into tblItem values('BreadOmlet','NonVeg','20','BreadOmlet')insert into


tblItem values('BreadEgg','NonVeg','10','BreadEgg') insert into tblItem
values('ChickenSandwitch','NonVeg','50','ChickenSandwitch')
insert into tblItem values('CheeseSandwitch','Veg','60','CheeseSandwitch')

tablestock:

create table tablestock(

StockID int identity(1,1) Primary Key,


ItemTitle nvarchar(50),
Quantity nvarchar(50), ItemDesc
nvarchar(50),
)

select * from tablestock

tblsaleMaster:

create table tblsaleMaster(

ID int identity(1,1) Primary Key,


Customer nvarchar(50),
Mobile nvarchar(50), Date
nvarchar(50), Totalsale
nvarchar(50),
)

select top 1 MAX(ID) as maxID from tblsaleMasterselect *


from tblsaleMaster

75
tableSaleTemp:

create table
tableSaleTemp( saleID int
identity Primary Key,ID

76
nvarchar(50),
Itemname nvarchar(50),
Quantity nvarchar(50),
Totalcost nvarchar(50),
)

select * from tableSaleTemp

77
8.REFERENCES

Mhalgi, S., Marne, P., Kulkarni, M., Kapure, S., & Shekapure,S. (2019). Cloud based
android app for college CANTEEN ORDERING DASHBOARD.

IJRAR- International Journal of Research and Analytical Reviews (IJRAR), 6(1), 969-
972.Shuvo, M., & Foysal, M. (2019). CANTEEN ORDERING DASHBOARD.

Katkar, A., & Jangale, S. (2018). CANTEEN ORDERING DASHBOARD using E-wallet.
International journal of advance research, idea and innovation.

Fegade, R., Nandge, G., Patil, P., Gaikwad, T., & Bastawade,P. P. (2019). Canteen
Management Android Application Using E-Wallet. International Research Journal of
Engineering and Technology (IRJET), 6(3), 6624-6628.

Rarh, F., Pojee, D., Zulphekari, S., & Shah, V. (2017,October). Restaurant table
reservation using time-series prediction. In 2017 2nd International Conference on
Communication and Electronics Systems (ICCES) (pp. 153-155). IEEE.

Cheng, T. L., Yusof, U. K., & Khalid, M. N. A. (2014,September). Content-based


filtering algorithm for mobile recipe application. In 2014 8th. Malaysian Softwar
Engineering Conference (MySEC) (pp. 183-188). IEEE.

Shimmura, T., Takenaka, T., & Akamatsu, M. (2009,December).

Real-time process management system in a restaurant by sharing food order


information. In 2009 International Conference of Soft Computing and
PatternRecognition (pp. 703-706). IEEE.

78
79

You might also like