• No results found

The Restaurant Management System Using .Net

N/A
N/A
Protected

Academic year: 2021

Share "The Restaurant Management System Using .Net"

Copied!
123
0
0

Loading.... (view fulltext now)

Full text

(1)

The Restaurant Management

Submitted for six weeks Industrial Training

(2)
(3)

10

OBJECTIVE

If we are trying to cope with QuickBooks or a series of Excel Spreadsheets, we are

undoubtedly spending countless hours making crucial decisions with questionable data.

If we are struggling with some other very expensive and complicated form of software,

Restaurant Management System will give us something that desperately needs “MORE

TIME TO GROW YOUR BUSINESS”!

It is designed to avoid paper work. It is designed to increase operational efficiency,

saving our money and time, maximizing profit and provide more security. This software

is developed to manage the restaurant more effectively and efficiently by computerizing

Meal Ordering, Billing, and Stock Maintenance & Accounting. This application is also

designed for inventory control, menu, recipe and liquor costing, sales management.

SCOPE

Our software can be used in any kind of restaurant like Bar, Sandwich Shop, Pizzeria,

Steak House, and Cafe Shop, Deli, Buffet, and Catering business, Doughnut or Pastry

Shop, Hotel restaurant/kitchen and more.

(4)

11

What is Restaurant Management?

Restaurant management

is the profession of managing a restaurant. It includes the

major function of planning, organizing, staffing, directing, developing an attitude in food

and beverage control systems and to efficiently and effectively plan menus at profitable

prices, taking into consideration constraints, preparation and other variables affecting

food and beverage outlets.

Restaurant Management System Software

If you are in food service management or restaurant management and looking for

restaurant software to control profitability of your business, you know that now, more

than ever, it is critical to understand all your costs and how they relate to your

restaurants management of sales. Management in restaurants is one of the most

daunting jobs in the restaurant industry. If you are trying to cope with QuickBooks or a

series of Excel Spreadsheets, you are undoubtedly spending countless hours making

crucial decisions with questionable data. If you are struggling with some other very

expensive and complicated form of software, Restaurant Management System will give

you something you desperately need MORE TIME TO GROW YOUR BUSINESS!

The Restaurant Professional Software program is a comprehensive restaurant

management tool designed for foodservice management of all types. It is simple to learn

and easy to use. This system processes transaction and stores the resulting data.

Reports will be generated from these data which help the manager to make appropriate

business decisions for the restaurant. For example, knowing the number of customers

for a particular time interval, the manager can decide whether more waiters and chefs

are required. Restaurant Software Systems are essential to the successful operation of

most foodservice establishments because they allow the business to track transactions

in real-time.

(5)

12

This software can be called in any of the following names:

Restaurant kitchen management system

Hotel management system

Restaurant management system

Restaurant inventory management system

Restaurant production management system

Restaurant inventory and production cost control management system

Restaurant chain management system

Hotel chain management system

Various Advantages

It increases operational efficiency.

It is designed to help you cost your recipes and track inventory saving your Money

and Time and maximizing profit.

It helps the restaurant manager to manage the restaurant more effectively and

efficiently by computerizing Meal Ordering, Billing, and Sales Management.

Accounting.

It is also designed for inventory control, menu, recipe and liquor costing,

nutrition.

It increases the security.

It avoids paper work.

It is Simple to learn and easy to use.

It is portable.

(6)

13

MODULES

The Restaurant Management Software is a Powerful Database Application which helps

the restaurant manager to manage the restaurant more effectively and efficiently by

computerizing Meal Ordering, Billing, and Stock Maintenance & Accounting. This

application is also designed for inventory control, menu, recipe and liquor costing, sales

management. It includes the following Modules as:

User Management

Menu Management

Customer Management

Reservation Management

Billing and Printing

Accountancy and Sales

Integration and Testing

(7)

14

USER’S ACCESS CONTROL

USER MANAGEMENT

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

Create User

Users Outlook

Edit User

Delete User

Change Password

Sign Out

Quit

MENU MANAGEMENT

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

Add Menu Items

View Full Menu

Search Item

Edit Item

Delete Item

CUSTOMER MANAGEMENT

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

Add Customer

View All Customers

Edit Customer

Search Customer

Delete Customer

RESERVATION MANAGEMENT

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

Add Reservation

(8)

15

BILLING MANAGEMENT

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

Billing

ACCOUNTANCY & SALES

FORMS

ADMINISTRATOR

MANAGER

SERVICE MANAGER

View Home Delivery

View Sales

View Sales Graph

(9)

16

HARDWARE & SOFTWARE

REQUIREMENTS

(10)

17

Software Requirements

Software Requirement during Development

C# 2010 on Visual Studio 2010 Express Edition.

SQL Server 2008 Express Edition.

Windows XP (Service Pack 3), Window 7, Window Vista (Service Pack 1).

.NET Framework 4.0

Software Requirement after Development

SQL Server 2008 Express Edition.

Windows XP (Service Pack 3), Window 7, Window Vista (Service Pack 1).

.NET Framework 4.0

(11)

18

Hardware Requirements

Hardware Requirement during Development

Colored Monitor.

Keyboard.

RAM (1GB).

Hard disk (20 GB).

CD ROM.

Intel Core 2 DUO 1.6 GHZ Processor.

Mouse.

Hardware Requirement after Development

Colored Monitor.

Keyboard.

RAM (1GB).

Hard disk (20 GB).

CD ROM.

Intel Core 2 DUO 1.6 GHZ Processor.

Mouse.

(12)

19

TOOLS USED

FOR DEVELOPMENT

(13)

20

Tools Used For Development

Visual Studio 2010

The Visual Studio 2010 IDE has been redesigned which, according to Microsoft, clears

the UI organization and "reduces clutter and complexity.

The new IDE better supports

multiple document windows and floating tool windows, while offering better

multi-monitor support. The IDE shell has been rewritten using the Windows Presentation

Foundation (WPF), whereas the internals have been redesigned using Managed

Extensibility Framework (MEF) that offers more extensibility points than previous

versions of the IDE that enabled add-ins to modify the behavior of the IDE. However, the

ability to customize the layout, content and position of toolbars and menus is limited in

Visual Studio 2010.

Languages

Title

Description

Visual Basic 2010

Describes new features in the Visual Basic language and Code

Editor. The features include implicit line continuation,

auto-implemented properties, collection initializes, and more.

Visual C# 2010

Describes new features in the C# language and Code Editor. The

features include the dynamic type, named and optional

arguments, enhanced Office programmability, and variance.

Visual C++ 2010

Describes new and revised features in Visual C++. The features

include lambda expressions, the rvalue reference declarator, and

the auto, decltype, and static_assert keywords.

Visual F# 2010

Describes the F# language, which is a language that supports

functional programming for the .NET Framework.

(14)

21

.NET Framework

The Microsoft .NET Framework is a software framework that can be installed on

computers running Microsoft Windows operating systems. It includes a large library of

coded solutions to common programming problems and a virtual machine that manages

the execution of programs written specifically for the framework. The .NET framework

supports multiple programming languages in a manner that allows language

interoperability, whereby each language can utilize code written in other languages; in

particular, the .NET library is available to all the programming languages that .NET

encompasses. The .NET Framework is a Microsoft offering and is intended to be used by

most new applications created for the Windows platform.

The framework's Base Class

Library provides a large range of features including user interface, data access, database

connectivity, cryptography, web application development, numeric algorithms, and

network communications. The class library is used by programmers, who combine it

with their own code to produce applications.

.NET Framework version 4.0

The latest version of the .NET Framework which was released with Visual Studio 2010.

The .NET Framework is an integral Windows component that supports building and

running the next generation of applications and Web services. The key components of

the .NET Framework are the common language runtime (CLR) and the .NET Framework

class library, which includes ADO.NET, ASP.NET, Windows Forms, and Windows

Presentation Foundation (WPF). The .NET Framework provides a managed execution

environment, simplified development and deployment, and integration with a wide

variety of programming languages

.

(15)

22

(16)

23

Introduction to the C#.NET Language

C# is an elegant and type-safe object-oriented language that enables developers to build

a variety of secure and robust applications that run on the .NET Framework. You can use

C# to create traditional Windows client applications, XML Web services, distributed

components, client-server applications, database applications, and much, much more.

Visual C# 2010 provides an advanced code editor, convenient user interface designers,

integrated debugger, and many other tools to make it easier to develop applications

based on version 4.0 of the C# language and version 4.0 of the .NET Framework.

As an object-oriented language, C# supports the concepts of encapsulation, inheritance,

and polymorphism. All variables and methods, including the Main method, the

application's entry point, are encapsulated within class definitions.

In addition to these basic object-oriented principles, C# makes it easy to develop

software components through several innovative language constructs, including the

following:

Encapsulated method signatures called delegates, which enable type-safe event

notifications.

Properties, which serve as assessors for private member variables.

Attributes, which provide declarative metadata about types at run time.

Inline XML documentation comments.

Language-Integrated Query (LINQ) which provides built-in query capabilities

across a variety of data sources.

C# has a rich set of predefined data types which you can use in your programs. The

following figure illustrates the hierarchy of the predefined data types found in C#:

(17)

24

Type

Size

in

Bytes

Description

bool

1

Boolean value. The only valid literals are

true

and

false

.

sbyte

1

Signed byte integer.

byte

1

Unsigned byte integer.

short

2

Signed short integer.

ushort

2

Unsigned short integer.

int

4

Signed integer. Literals may be in decimal (default) or hexadecimal notation

(with a

0x

prefix). Examples:

26

,

0x1A

uint

4

Unsigned integer. Examples:

26U

,

0x1AU

(mandatory

U

suffix)

long

8

Signed long integer. Examples:

26L

,

0x1AL

(mandatory

L

suffix)

ulong

8

Unsigned long integer. Examples:

26UL

,

0x1AUL

(mandatory

UL

suffix)

char

2

Unicode character. Example: 'A' (contained within single quotes)

float

4

IEEE 754 single precision floating point number. Examples:

1.2F

,

1E10F

(mandatory

F

suffix)

double

8

IEEE 754 double precision floating point number. Examples:

1.2

,

1E10

,

1D

(optional

D

suffix)

decimal

16

Numeric data type suitable for financial and monetary calculations, exact to

the 28th decimal place. Example:

123.45M

(mandatory

M

suffix)

object

8+

Ultimate base type for both value and reference types. Has no literal

representation.

string

20+

Immutable sequence of Unicode characters. Example:

"hello world!\n"

(contained within double quotes)

(18)

25

SQL Server 2008

The current version of SQL Server, SQL Server 2008, was released (RTM) on August 6,

2008 and aims to make data management self-tuning, self organizing, and self

maintaining with the development of SQL Server Always On technologies, to provide

near-zero downtime. SQL Server 2008 also includes support for structured and

semi-structured data, including digital media formats for pictures, audio, video and other

multimedia data. In current versions, such multimedia data can be stored as BLOBs

(binary large objects), but they are generic bit streams. Intrinsic awareness of

multimedia data will allow specialized functions to be performed on them.

SQL Server 2008 can be a data storage backend for different varieties of data: XML,

email, time/calendar, file, document, spatial, etc as well as perform search, query,

analysis, sharing, and synchronization across all data types. Other new data types

include specialized date and time types and a spatial data type for location-dependent

data. The Full-Text Search functionality has been integrated with the database engine,

which simplifies management and improves performance. SQL Server includes better

compression features, which also helps in improving scalability.

(19)

26

SOFTWARE DEVELOPMENT

LIFE CYCLE

(20)

27

Software Development Life Cycle (SDLC)

The Systems Development Life Cycle (SDLC) is a conceptual model used in project

management that describes the stages involved in an information system development

project from an initial feasibility study through maintenance of the completed

application. Some methods work better for specific types of projects, but in the final

analysis, the most important factor for the success of a project may be how closely

particular plan was followed.

The image below is the classic Waterfall model methodology, which is the first SDLC

method and it describes the various phases involved in development.

The SDLC Waterfall Model

The relationship of each stage to the others can be roughly described as a waterfall,

where the outputs from a specific stage serve as the initial inputs for the following

stage. During each stage, additional information is gathered or developed, combined

with the inputs, and used to produce the stage deliverables.

(21)

28

Different Phases

System planning

The system planning is used to determine if the project should get the go-ahead. If the

project is to proceed, the system plan will produce a project plan and budget estimates

for the future stages of development.

Requirement Analysis and Design

Analysis gathers the requirements for the system. Design focuses on high level design

like, what programs are needed and how are they going to interact. During these

phases, the software's overall structure is defined. Analysis and Design are very crucial

in the whole development cycle. The logical system of the product is developed in this

phase.

Development and Coding

In this phase the designs are translated into code. Computer programs are written using

a conventional programming language. Various Programming tools are used to generate

the code. Different high level programming languages like PHP, Java are used for coding.

Integration and Testing

In this phase the system is tested. Normally programs are written as a series of

individual modules, this subject to separate and detailed test. The system is then tested

as a whole. The separate modules are brought together and tested as a complete

system. The system is tested to ensure that interfaces between modules work together.

Maintenance

Inevitably the system will need maintenance. Software will definitely undergo change

once it is delivered to the customer. Change could happen because of some unexpected

input values into the system. In addition, the changes in the system could directly affect

the software operations. The software should be developed to accommodate changes

that could happen during the post implementation period.

(22)

29

(23)

30

Project Planning

“The planning stage establishes a bird's eye view of the intended software

product, and uses this to establish the basic project structure, evaluate feasibility and

risks associated with the project, and describe appropriate management and technical

approaches”

Project planning is part of Project Management. It is a well-established approach to

managing and controlling the introduction of new initiatives or organizational changes.

Projects are finite in length, usually one-time pieces of work involving a number of

activities that must be completed within a given time frame, and often on a fixed

budget.

While the very simplest projects can be managed easily by applying common sense and

just getting on with things, projects that are more complex need a great deal of

planning, and benefit from a formal, disciplined management approach. From making

sure that activities will actually meet the specified need, to devising a workable

schedule, developing systems for reporting progress, and managing requests for

changes – all of these issues require thoughtful consideration. Managing projects well

requires a great deal of time, skill, and finesse. There are many sides to project

management and this is what makes it so interesting and demanding

Application Goals

Profile Management of three categories of users(Administrator, Manager, Service

Manager)

Providing different access to different categories of user.

Creating accounts of Customer by using unique Customer ID.

Giving Facility of Home Delivery to Customers.

(24)

31

Software Configuration Management

“When you build computer software, change happens. And

because it happens, you need to control it effectively. Software Configuration

Management Software (SCM) is a set of activities that are designed to control change by

identifying the work products that are likely to change, establishing relationships among

them, defining mechanisms for managing different versions of work products,

controlling changes that are imposed, and auditing and reporting on the changes that

are made”.

SCM is a best tool to manage change to our software systems. However, even with the

best of intentions, software projects continue to fail because of problems that could

have been avoided through the use of an SCM tool and appropriate processes. These

failures are reflected in poor quality, late delivery, cost overruns, and the incapability to

meet customer demands. All these flaws are removed by Software Configuration

Management (SCM).

This Software was developed by four developers (Gagandeep, Navdeep, Manmeen, and

Navdeep).We make this project together by putting our full efforts and hard work. We

completed this project in two months. We have worked for at least 5 hours in a day. We

also have VB classes daily. While making project we follow the stages like Project

Planning, Design and Coding, Integration and Testing.

(25)
(26)

33

Requirements Analysis

Requirements Analysis in systems engineering and software engineering, encompasses

those tasks that go into determining the needs or conditions to meet for a new or

altered product, taking account of the possibly conflicting requirements of the various

stakeholders, such as beneficiaries or users.

Requirements analysis is critical to the success of a development project. Requirements

must be documented, actionable, measurable, testable, related to identified business

needs or opportunities, and defined to a level of detail sufficient for system design.

Requirements can be functional and non-functional.

Conceptually, requirements analysis includes three types of activity:

Eliciting requirements: the task of communicating with customers and users to

determine what their requirements are. This is sometimes also called

requirements gathering.

Analyzing requirements: determining whether the stated requirements are

unclear, incomplete, ambiguous, or contradictory, and then resolving these

issues.

Recording requirements: Requirements might be documented in various forms,

such as natural-language documents, use cases, user stories, or process

specifications.

(27)

34

MODULES IN RESTAURANT MANAGEMENT SYSTEM

USER MANAGEMENT

User management is a critical part of maintaining a secure system. Ineffective user and

privilege management often lead many systems into being compromised. Therefore, it is

important that you understand how you can protect your system through simple and

effective user account management techniques.

This User Management encloses three categories of users i.e. Administrator, Manager

and Service Manager. Each of them had given different User Access Control facility. This

Module will manage all the information about a user i.e. basically

Create User

In this we create a New User Account by assigning a unique User

Name and Password to the user along with the User Type. It also comprises user's

Bio-data which includes his Full Name, Address, Phone no, E-mail ID, etc. The access of

creating a new user is given to both Administrator and Manager.

User Outlook

Users Outlook includes the display of the full information of all the

users. It is a read-only operation, no editing can be performed.

Edit User

In this we can Edit an existing user account if any of the information

regarding the user is changed or incorrect. The task of editing the user can only be

performed by the Administrator.

Delete User

We can Delete the user account by using this option whose access is

only given to the Administrator.

Change Password

If any of the user wants to Change his Password then by using

this feature, User can change his password. This access is given to all type of users.

(28)

35

In a restaurant, a Menu is a printed brochure or public display on a poster or chalkboard

that shows the list of options for a diner to select. A good restaurant menu design is key

to any restaurant's marketing plan. It expresses your eatery’s personality, focuses your

overall operations, promotes profitability, establishes your budget and keeps your brand

fresh in your customer’s mind.

Menu management is done by using following features-

Add Menu Items

In this we Add Items in a Menu by assigning a unique Item Code

to each item. When we add any item; we give full description (ingredients), type, price,

category for each item. The access of adding the items is given to both Administrator

and Manager.

View Full Menu

As the name indicates, in this we display the full information of all

the items in a menu. Only outlook of all the items is displayed, no editing is performed.

Search Item

When we want to find a single item from a number of items this

feature is very useful. Here searching is performed through item name, when we enter

name of any item the full information of that item is displayed. This saves our lots of

time. Searching is performed for editing or deletion also.

Edit Item

If any information about the menu items is changed or incorrect then

editing can be performed. After editing we can save the item again, the new changes

are updated automatically. Editing is also performed by search also.

Delete Item

By using this feature, we can delete any item from the menu.

Deletion is performed by searching also. If we have large number of items and want to

delete some item firstly we search that item from menu, item is displayed then we

delete that item.

CUSTOMER MANAGEMENT

(29)

36

manage, and exchange customer information for efficient and effective management.

It is a broadly recognized, widely-implemented strategy for managing and nurturing a

company’s interactions with customers, clients and sales prospects.

Customer Management is done by using following features-

Add Customer

In this we can make a New Customer Account which provides full

information about the customer like Customer Name, Address, Customer Type, Phone

no, etc. We also allot a unique Customer ID to each customer for future use. This

customer ID is useful in the case of home delivery.

View all Customers

It includes the display of the full information of all the

Customers. It is a read-only operation, no editing can be performed. Only outlook of all

the customers is displayed, no changes are performed.

Edit Customer

If any information about the customer has been changed or

incorrect then editing can be performed. If we have large number of customers then we

can find the customer by using search operation. Then editing will be performed. This

saves our lots of time.

Search Customer

Here searching is performed either by customer name or phone

number. When we enter customer name or phone number full information of the

customer is displayed. Only customer’s outlook is there, no changes can be performed

in the displayed information.

Delete Customer

We can delete the customer account by using this option. Deletion

is also performed by searching, In case we have large number of customer.

(30)

37

A reservation Management is an arrangement made in advance to have a table available

at a restaurant. The software automates the process of taking restaurant reservations

and manages guest seating. It manages the coordination of servers, tables, walk-ins, and

arriving parties, while providing information to support customer service initiatives. This

leads to-

dramatically improve table management

improve your customer care

improve planning, flexibility, efficiency

Reservation management includes following features-

Add Reservation

By using this feature we can Add New Reservation by providing

unique Reservation ID to each customer. This reservation account includes the

information like Occasion, Gathering, Date of Reservation, Occasion Spot etc.

Search Reservation

Here Searching is performed through Date of Reservation.

When we enter the date of reservation, the full information is displayed about that

reservation.

Edit Reservation

If we want to perform any changes in the existing information of

any reservation than editing can be done. The Edit Reservation Form is the Child Form of

the Search Reservation.

(31)

38

The process of sending a bill to customers for goods or services is called billing.

Restaurant Billing System is a new generation of restaurant management software for

Windows. It is a complete solution starting from taking orders from clients in producing

bills, bookings and closing bills with different payment options. User interface is

carefully optimized for high speed entering of client orders. The system represents rich

set of reports that shows whole picture about restaurant operations and life cycles.

In this module we can create a bill by assigning a unique bill number to each and every

bill. In this we prepare bill for two type of customers they are-

Walk in

Home delivery

We also provide a facility of discount to our customer. Our bill includes Total Price, Total

VAT and Payable Amount. At last bill is raised and we can print out a bill.

ACCOUNTANCY & SALES

Accounting is called "the language of business". Accountancy is a branch of

mathematical science that is useful in discovering the causes of success and failure in

business.

Sales is defined as a amount a company receives from the sale of its products, after

deducting discounts, returns of products by customers, and damaged, missing, or stolen

products.

Value added tax (VAT) is similar to a sales tax. It is a tax on the estimated market value

added to a product or material at each stage of its manufacture or distribution,

ultimately passed on to the consumer. VAT was invented because very high sales taxes

and tariffs encourage cheating and smuggling.

(32)

39

View Home Delivery

This feature provides us full information about all the Home

Deliveries. The information includes Address of Customer, Phone Number, Customer

Name, Home Delivery ID, Total Amount etc. It only provides outlook of home delivery,

no editing can be performed. We can also find information by using searching operation.

When we enter date of home delivery then the full information is displayed.

View Sales

We can view Total Sales of restaurant by using this feature. Sales can be

viewed in three ways-per day, per month, per year. It only provides outlook of sales

according to day. When we enter date of sales then full information of sales of that

particular day is displayed.

View Sales Graph

In this we have the Graphical View of Sales. When we enter the

starting and the last date to View Sales then the Total Sales of per day is displayed,

according to that a Graph is prepared. This graph tells us on which day sales were

maximum and minimum.

View Tax Collection

By using this feature we can View the Tax Collection. We can

view tax collection in two ways- according to Month and Year. When we enter a

particular month or year, then Total Tax of that particular month or year is displayed.

(33)

40

(34)

41

DESIGN PHASE

In systems, design functions and operations are described in detail, including screen

layouts, business rules, process diagrams and other documentation. The output of this

stage will describe the new system as a collection of modules or subsystems.

The design stage takes as its initial input the requirements identified in the approved

requirements document. For each requirement, a set of one or more design elements

will be produced as a result of interviews, workshops, and/or prototype efforts. Design

elements describe the desired software features in detail, and generally include

functional hierarchy diagrams, screen layout diagrams, tables of business rules, business

process diagrams, pseudo code, and a complete entity-relationship diagram with a full

data dictionary. These design elements are intended to describe the software in

sufficient detail that skilled programmers may develop the software with minimal

additional input.

Requirements

Document

DESIGN

STAGE

Design

Document

Updated

Project Plan &

Schedule

Updated

Requirements

Traceability

Matrix

(35)

42

ER Diagram

(36)

43

(37)

44

Data Flow Diagrams (DFD)

DFD Level-0

Administrator

Manager

Service

Manager

RESTDATABASE

Printer

Users Outlook, View Full Menu and Customers, View Accountancy and Sales.

Create, Edit & Delete User, Change Password, Add, Search, Edit & Delete Items and Customers, Add & Search Reservation, Bill.

View Full Menu and Customers, View Accountancy & Sales.

Create User, Change Password, Add, Search & Edit Items, Add, Search, Edit and Delete Customers, Add & Search Reservation, Bill.

Billing

Change Password, Search Item, Bill.

View Full Menu and Customers, View Home Delivery. Retrieve Store

Restaurant

Management

(38)

45

DFD Level-1

LOGIN

Administrator/

Manager/

Service Manager

All

Fields

Matched

Login Not Successful

UserName Password UserType

User

Access

Control

Close

Window

SECURITY

Login Successful

(39)

46

DFD Level-1

CREATE USER

Administrator/

Manager

Check All

Fields Are

Mandatory

UserName, Password, Confirm Password, LastName, FirstName,

DateofBirth, Location, Contact No, Email ID, UserType.

Check

Password

Check

Email ID

Check

UserName

Fields Marked * Are Mandatory Invalid Password

Invalid Email ID

UserName Cannot Contain Space & Must Starts With An Alphabet

Create

User

SECURITY

Add Code Follows

New User Created Successfully

(40)

47

DFD Level-1

ADD MENU ITEMS

Administrator/

Manager

Check All

Fields Are

Mandatory

Check

Item Name

Check

Price

Add Menu

Items

LISTOFITEMS

ItemCode, ItemName, Category, Description,

Price, Tax, Type Fields Marked * Are Mandatory

Item Name Must Contain Alphabets Price Must Be In Numerics

Item Added

(41)

48

DFD Level-1

BILLING

Administrator/

Manager/

Service Manager

ADD/

CHECKOUT/

REMOVE

Add

Item

Choose

Type of

Customer

Check

Out

Check

Item Code

& Quantity

Mandatory

Check

Item Code

& Quantity

Numeric

Bill

Raised

Add to/

Remove

from Cart

Print

Bill

Printer

BILL TABLE

BILL DETAIL

HOME DELIVERY

Invalid Item Code OR Quantity

Item Code & Quantity Should Be Numeric

Fetch

Add Items To Cart

Remove

Item

Check

Item Is

Selected

Remove Items From Cart Select The Item First Select Type of Customer

(42)

49

CODING,

DEVELOPMENT AND

TESTING

(43)

50

(44)

51

Coding

public partial class Main_Screen : Form

{

public Main_Screen() {

InitializeComponent(); }

private void Main_Screen_Load(object sender, EventArgs e) {

Form1 f1 = new Form1(); f1.ShowDialog();

Login log=new Login(); log.receive(this); log.ShowDialog(); }

private void createUserToolStripMenuItem_Click(object sender, EventArgs e) {

Create_User cu = new Create_User(); cu.MdiParent = this;

cu.Show(); }

private void alterUserToolStripMenuItem_Click(object sender, EventArgs e) {

Edit_User ed = new Edit_User(); ed.MdiParent = this;

ed.Show(); }

private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e) {

Change cp = new Change(); cp.MdiParent = this; cp.Show();

}

private void quitToolStripMenuItem_Click(object sender, EventArgs e) {

Environment.Exit(0); }

private void addToolStripMenuItem_Click(object sender, EventArgs e) {

Add_menu_items ami = new Add_menu_items(); ami.MdiParent = this;

ami.Show(); }

private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e) {

Edit_User ed = new Edit_User(); ed.MdiParent = this;

(45)

52

}

private void searchItemToolStripMenuItem_Click(object sender, EventArgs e) {

search_item si = new search_item(); si.MdiParent = this;

si.Show(); }

private void deleteItemToolStripMenuItem_Click(object sender, EventArgs e) {

Edit ei = new Edit(); ei.MdiParent = this; ei.Show();

}

private void addCustomerToolStripMenuItem_Click(object sender, EventArgs e) {

Add_Customer ac = new Add_Customer(); ac.MdiParent = this;

ac.Show(); }

private void editCustomerToolStripMenuItem_Click(object sender, EventArgs e) {

Edit_Customer ec = new Edit_Customer(); ec.MdiParent = this;

ec.Show(); }

private void searchCustumerToolStripMenuItem_Click(object sender, EventArgs e) {

Search_Customer sc = new Search_Customer(); sc.MdiParent = this;

sc.Show(); }

private void deleteCustomerToolStripMenuItem_Click(object sender, EventArgs e) {

Edit_Customer ec = new Edit_Customer(); ec.MdiParent = this;

ec.Show(); }

private void viewToolStripMenuItem_Click(object sender, EventArgs e) {

User_Outlook uo = new User_Outlook(); uo.MdiParent = this;

uo.Show(); }

private void viewAllCustomerToolStripMenuItem_Click(object sender, EventArgs e) {

View_Customer vc = new View_Customer(); vc.MdiParent = this;

vc.Show(); }

(46)

53

private void addReservationToolStripMenuItem_Click(object sender, EventArgs e) {

Table_Reservation tr = new Table_Reservation(); tr.MdiParent = this;

tr.Show(); }

private void viewReservationToolStripMenuItem_Click(object sender, EventArgs e) {

search_reservations sr = new search_reservations(); sr.MdiParent = this;

sr.Show(); }

private void billingToolStripMenuItem_Click(object sender, EventArgs e) {

Billing b = new Billing(); b.MdiParent = this;

b.Show(); }

private void timer1_Tick(object sender, EventArgs e) {

toolStripStatusLabel1.Text = DateTime.Now.ToString(); }

private void viewFullMenuToolStripMenuItem_Click(object sender, EventArgs e) {

View_Menu vm = new View_Menu(); vm.MdiParent = this;

vm.Show(); }

private void editToolStripMenuItem_Click(object sender, EventArgs e) {

Edit ei = new Edit(); ei.MdiParent = this; ei.Show();

}

private void viewHomeDeliveryToolStripMenuItem1_Click(object sender, EventArgs e) {

Form3 f3 = new Form3(); f3.MdiParent = this; f3.Show();

}

private void viewSalesToolStripMenuItem1_Click(object sender, EventArgs e) {

Sales s = new Sales(); s.MdiParent = this; s.Show();

}

private void viewSalesGraphToolStripMenuItem_Click(object sender, EventArgs e) {

sales_graph sg= new sales_graph(); sg.MdiParent = this;

(47)

54

sg.Show(); }

private void viewTaxCollectionToolStripMenuItem_Click(object sender, EventArgs e) {

tax tx = new tax(); tx.MdiParent = this; tx.Show();

}

private void signOutToolStripMenuItem_Click(object sender, EventArgs e) {

Login log = new Login(); log.receive(this); log.ShowDialog(); }

(48)

55

(49)

56

Coding

public partial class Login : Form

{

Main_Screen obj;

public void receive(Main_Screen o1) { obj = o1; } public Login() { InitializeComponent(); }

private void button1_Click(object sender, EventArgs e) {

try

{

restdatabaseDataSetTableAdapters.SecurityTableAdapter ta = new

restdatabaseDataSetTableAdapters.SecurityTableAdapter();

restdatabaseDataSet ds = new restdatabaseDataSet(); ta.Fill(ds.Security);

int flag = 0; int i = 0; string p, q;

for (i = 0; i <= ds.Security.Rows.Count - 1; i++) {

p = Convert.ToString(ds.Security.Rows[i]["UserName"]); q = Convert.ToString(ds.Security.Rows[i]["Password"]); if ((textBox1.Text == p) && (textBox2.Text == q) &&

(comboBox1.SelectedItem.ToString() == ds.Security.Rows[i]["UserType"].ToString())) { flag = 1; break; } } if (flag == 1) {

MessageBox.Show("Login Successful");

if (comboBox1.SelectedItem.ToString() == "Manager") { obj.createUserToolStripMenuItem.Visible = true; obj.viewToolStripMenuItem.Visible = false; obj.alterUserToolStripMenuItem.Visible = false; obj.deleteUserToolStripMenuItem.Visible = false; obj.changePasswordToolStripMenuItem.Visible = true; obj.signOutToolStripMenuItem.Visible = true; obj.quitToolStripMenuItem.Visible = true; obj.addToolStripMenuItem.Visible = true; obj.viewFullMenuToolStripMenuItem.Visible = true; obj.searchItemToolStripMenuItem.Visible = true; obj.editToolStripMenuItem.Visible = true;

(50)

57

obj.deleteItemToolStripMenuItem.Visible = false; obj.addCustomerToolStripMenuItem.Visible = true; obj.viewAllCustomerToolStripMenuItem.Visible = true; obj.editCustomerToolStripMenuItem.Visible = true; obj.searchCustumerToolStripMenuItem.Visible = true; obj.deleteCustomerToolStripMenuItem.Visible = true; obj.addReservationToolStripMenuItem.Visible = true; obj.viewReservationToolStripMenuItem.Visible = true; obj.billingToolStripMenuItem.Visible = true; obj.viewHomeDeliveryToolStripMenuItem1.Visible = true; obj.viewSalesToolStripMenuItem1.Visible = true; obj.viewSalesGraphToolStripMenuItem.Visible = true; obj.viewTaxCollectionToolStripMenuItem.Visible = true; }

else if (comboBox1.SelectedItem.ToString() == "Service Manager") { obj.createUserToolStripMenuItem.Visible = false; obj.viewToolStripMenuItem.Visible = false; obj.alterUserToolStripMenuItem.Visible = false; obj.deleteUserToolStripMenuItem.Visible = false; obj.changePasswordToolStripMenuItem.Visible = true; obj.signOutToolStripMenuItem.Visible = true; obj.quitToolStripMenuItem.Visible = true; obj.addToolStripMenuItem.Visible = false; obj.viewFullMenuToolStripMenuItem.Visible = true; obj.searchItemToolStripMenuItem.Visible = true; obj.editToolStripMenuItem.Visible = false; obj.deleteItemToolStripMenuItem.Visible = false; obj.addCustomerToolStripMenuItem.Visible = false; obj.viewAllCustomerToolStripMenuItem.Visible = true; obj.editCustomerToolStripMenuItem.Visible = false; obj.searchCustumerToolStripMenuItem.Visible = false; obj.deleteCustomerToolStripMenuItem.Visible = false; obj.addReservationToolStripMenuItem.Visible = false; obj.viewReservationToolStripMenuItem.Visible = false; obj.billingToolStripMenuItem.Visible = true; obj.viewHomeDeliveryToolStripMenuItem1.Visible = true; obj.viewSalesToolStripMenuItem1.Visible = false; obj.viewSalesGraphToolStripMenuItem.Visible = false; obj.viewTaxCollectionToolStripMenuItem.Visible = false; }

else if (comboBox1.SelectedItem.ToString() == "Administrator") { obj.createUserToolStripMenuItem.Visible = true; obj.viewToolStripMenuItem.Visible = true; obj.alterUserToolStripMenuItem.Visible = true; obj.deleteUserToolStripMenuItem.Visible = true; obj.changePasswordToolStripMenuItem.Visible = true; obj.signOutToolStripMenuItem.Visible = true;

(51)

58

obj.quitToolStripMenuItem.Visible = true; obj.addToolStripMenuItem.Visible = true; obj.viewFullMenuToolStripMenuItem.Visible = true; obj.searchItemToolStripMenuItem.Visible = true; obj.editToolStripMenuItem.Visible = true; obj.deleteItemToolStripMenuItem.Visible = true; obj.addCustomerToolStripMenuItem.Visible = true; obj.viewAllCustomerToolStripMenuItem.Visible = true; obj.editCustomerToolStripMenuItem.Visible = true; obj.searchCustumerToolStripMenuItem.Visible = true; obj.deleteCustomerToolStripMenuItem.Visible = true; obj.addReservationToolStripMenuItem.Visible = true; obj.viewReservationToolStripMenuItem.Visible = true; obj.billingToolStripMenuItem.Visible = true; obj.viewHomeDeliveryToolStripMenuItem1.Visible = true; obj.viewSalesToolStripMenuItem1.Visible = true; obj.viewSalesGraphToolStripMenuItem.Visible = true; obj.viewTaxCollectionToolStripMenuItem.Visible = true; } this.Dispose(); } else {

MessageBox.Show("Login Not Successful"); textBox1.Text = ""; textBox2.Text = ""; comboBox1.SelectedIndex = -1; textBox1.Focus(); } }

catch (Exception ex) {

MessageBox.Show(ex.Message ); }

}

private void on_close(object sender, FormClosingEventArgs e) {

e.Cancel = true; }

private void button2_Click(object sender, EventArgs e) {

Environment.Exit(0); }

(52)

59

(53)

60

(54)

61

Coding

public partial class Create_User : Form

{

public Create_User() {

InitializeComponent(); }

private void button1_Click_1(object sender, EventArgs e) { try { char ch = ' '; if (textBoxusername.Text != "") { ch = textBoxusername.Text[0]; } if ((textBoxusername.Text == "") || (textBoxpassword.Text == "") ||

(textBoxconfirmpassword.Text == "") || (textBoxfirstname.Text == "") || (textBoxlocation.Text ==

"") || (comboBoxusertype.SelectedIndex == -1)||(textBoxemailid.Text=="")) {

MessageBox.Show("Fields Marked * are Mandatory"); }

else if ((textBoxconfirmpassword.Text != textBoxpassword.Text)) {

MessageBox.Show("Invalid Password"); }

else if (!((textBoxemailid.Text.Contains("@")) && (textBoxemailid.Text.Contains("."))))

{

MessageBox.Show("Invalid E-mail ID"); }

else if ((textBoxemailid.Text.IndexOf("@")) > (textBoxemailid.Text.LastIndexOf(".")))

{

MessageBox.Show("Invalid E-mail ID"); }

else if (textBoxusername.Text.Contains(" ")) {

MessageBox.Show("Username Cannot Contain Space"); }

else if (!(((Convert.ToInt16(ch) >= 65) && (Convert.ToInt16(ch) <= 90)) || ((Convert.ToInt16(ch) >= 97) && (Convert.ToInt16(ch) <= 122))))

{

MessageBox.Show("Username Must starts with an Alphabet"); }

else

{

restdatabaseDataSetTableAdapters.SecurityTableAdapter ta = new

restdatabaseDataSetTableAdapters.SecurityTableAdapter();

restdatabaseDataSet ds = new restdatabaseDataSet(); ta.Fill(ds.Security); DataTable dt; DataRow dr; dt = ds.Security; dr = dt.NewRow(); dr["UserName"] = textBoxusername.Text; dr["Password"] = textBoxpassword.Text; dr["Last_Name"] = textBoxlastname.Text;

(55)

62

dr["First_Name"] = textBoxfirstname.Text; dr["DateofBirth"] = dateTimePickerdateofbirth.Value.ToShortDateString(); dr["Location"] = textBoxlocation.Text; dr["Contact_No"] = textBoxcontactno.Text; dr["Email_ID"] = textBoxemailid.Text; dr["UserType"] = comboBoxusertype.SelectedItem; dt.Rows.Add(dr); ta.Update(ds.Security);

MessageBox.Show("New User Created Successfully"); ta.Fill(ds.Security); textBoxusername.Text = ""; textBoxpassword.Text = ""; textBoxconfirmpassword.Text = ""; textBoxlastname.Text = ""; textBoxfirstname.Text = "";

dateTimePickerdateofbirth.Value = DateTime.Now; textBoxlocation.Text = ""; textBoxcontactno.Text = ""; textBoxemailid.Text = ""; comboBoxusertype.SelectedIndex = -1; textBoxusername.Focus(); } }

catch(Exception ex) {

MessageBox.Show(ex.Message); }

} }

(56)

63

(57)

64

Coding

public partial class User_Outlook : Form

{

public User_Outlook() {

InitializeComponent(); }

private void User_Outlook_Load(object sender, EventArgs e) {

// TODO: This line of code loads data into the 'restdatabaseDataSet.Security' table. You can move, or remove it, as needed.

this.securityTableAdapter.Fill(this.restdatabaseDataSet.Security); }

(58)

65

(59)

66

Coding

public partial class Edit_User : Form

{

DataRow dr;

restdatabaseDataSetTableAdapters.SecurityTableAdapter ta = new

restdatabaseDataSetTableAdapters.SecurityTableAdapter(); restdatabaseDataSet ds = new restdatabaseDataSet();

public Edit_User() {

InitializeComponent(); }

private void Edit_User_Load(object sender, EventArgs e) {

// TODO: This line of code loads data into the 'restdatabaseDataSet.Security' table. You can move, or remove it, as needed.

this.securityTableAdapter.Fill(this.restdatabaseDataSet.Security); ta.Fill(ds.Security);

}

private void buttonfirst_Click_1(object sender, EventArgs e) {

securityBindingSource.MoveFirst(); }

private void buttonprevious_Click_1(object sender, EventArgs e) {

securityBindingSource.MovePrevious(); }

private void buttonnext_Click_1(object sender, EventArgs e) {

securityBindingSource.MoveNext(); }

private void buttonlast_Click_1(object sender, EventArgs e) {

securityBindingSource.MoveLast(); }

private void buttonedit_Click_1(object sender, EventArgs e) { textBoxusername.ReadOnly = true; textBoxpassword.ReadOnly = true; textboxlastname.ReadOnly = false; textBoxfirstname.ReadOnly = false; dateTimePickerdateofbirth.Enabled = true; textBoxlocation.ReadOnly = false; textBoxcontactno.ReadOnly = false; textBoxemailid.ReadOnly = false; comboBoxusertype.Enabled = true; buttonfirst.Enabled = false; buttonprevious.Enabled = false; buttonnext.Enabled = false;

(60)

67

buttonlast.Enabled = false; }

private void buttonsave_Click(object sender, EventArgs e) {

try

{

if ((textBoxusername.Text == "") || (textBoxpassword.Text == "") ||

(textBoxfirstname.Text == "") || (textBoxlocation.Text == "") || (comboBoxusertype.SelectedIndex == -1)||(textBoxemailid.Text==""))

{

MessageBox.Show("Fields Marked * are Mandatory"); }

else if (!((textBoxemailid.Text.Contains("@")) && (textBoxemailid.Text.Contains("."))))

{

MessageBox.Show("Invalid E-mail ID"); }

else if ((textBoxemailid.Text.IndexOf("@")) > (textBoxemailid.Text.LastIndexOf(".")))

{

MessageBox.Show("Invalid E-mail ID"); } else { dr = restdatabaseDataSet.Security.Rows[securityBindingSource.Position]; dr.BeginEdit(); dr["UserName"] = textBoxusername.Text; dr["Password"] = textBoxpassword.Text; dr["Last_Name"] = textboxlastname.Text; dr["First_Name"] = textBoxfirstname.Text; dr["DateofBirth"] = dateTimePickerdateofbirth.Value.ToShortDateString(); dr["Location"] = textBoxlocation.Text; dr["Contact_No"] = textBoxcontactno.Text; dr["Email_ID"] = textBoxemailid.Text; dr["UserType"] = comboBoxusertype.SelectedItem; dr.EndEdit(); securityTableAdapter.Update(restdatabaseDataSet.Security); MessageBox.Show("Record Updated");

securityTableAdapter.Fill(restdatabaseDataSet.Security); textBoxusername.ReadOnly = true; textBoxpassword.ReadOnly = true; textboxlastname.ReadOnly = true; textBoxfirstname.ReadOnly = true; dateTimePickerdateofbirth.Enabled = false; textBoxlocation.ReadOnly = true; textBoxcontactno.ReadOnly = true; textBoxemailid.ReadOnly = true; comboBoxusertype.Enabled = false; buttonfirst.Enabled = true; buttonprevious.Enabled = true; buttonnext.Enabled = true; buttonlast.Enabled = true; } }

catch (Exception ex) {

(61)

68

MessageBox.Show(ex.Message); }

}

private void buttondelete_Click(object sender, EventArgs e) {

try

{

DialogResult ans;

ans = MessageBox.Show("Are you sure you want to delete the User's account?",

"Delete Confirmation", MessageBoxButtons.YesNo); if (ans == DialogResult.Yes) {

dr = this.restdatabaseDataSet.Security.Rows[securityBindingSource.Position]; dr.Delete();

this.securityTableAdapter.Update(this.restdatabaseDataSet.Security); MessageBox.Show("User Deleted");

this.securityTableAdapter.Fill(this.restdatabaseDataSet.Security); }

}

catch (Exception ex) {

MessageBox.Show(ex.Message); }

} }

(62)

69

(63)

70

Coding

public partial class Change : Form

{

public Change() {

InitializeComponent(); }

private void changepassword_Click(object sender, EventArgs e) {

try

{

restdatabaseDataSetTableAdapters.SecurityTableAdapter ta = new

restdatabaseDataSetTableAdapters.SecurityTableAdapter();

restdatabaseDataSet ds = new restdatabaseDataSet(); ta.Fill(ds.Security);

int flag = 0, pos = 0, i; string p, q;

for (i = 0; i <= (ds.Security.Rows.Count - 1); i++) {

p = Convert.ToString(ds.Security.Rows[i]["UserName"]); q = Convert.ToString(ds.Security.Rows[i]["Password"]);

if ((textBoxusername.Text == p) && (textBoxoldpassword.Text == q)) { flag = 1; pos = i; break; } } if ((textBoxusername.Text == "") || (textBoxoldpassword.Text == "") || (textBoxnewpassword.Text == "") || (textBoxconfirmpassword.Text == "")) {

MessageBox.Show("All fields are Mandatory"); }

else if (textBoxnewpassword.Text != textBoxconfirmpassword.Text) {

MessageBox.Show("New Password and Confirm new Password does not match"); }

else if (flag == 0) {

MessageBox.Show("Username and Old Password does not match"); } else { DataRow dr; dr = ds.Security.Rows[pos]; dr.BeginEdit(); dr["Password"] = textBoxnewpassword.Text; dr.EndEdit(); ta.Update(ds.Security); ta.Fill(ds.Security);

MessageBox.Show("Password changed successfully"); textBoxusername.Text = "";

(64)

71

textBoxnewpassword.Text = ""; textBoxconfirmpassword.Text = ""; textBoxusername.Focus(); } }

catch (Exception ex) {

MessageBox.Show(ex.Message); }

} }

(65)

72

(66)

73

Coding

public partial class Add_menu_items : Form

{

int temp = 0;

restdatabaseDataSetTableAdapters.listofitemsTableAdapter ta = new

restdatabaseDataSetTableAdapters.listofitemsTableAdapter(); restdatabaseDataSet ds = new restdatabaseDataSet(); public Add_menu_items()

{

InitializeComponent(); }

private void buttonadditem_Click(object sender, EventArgs e) { try { char ch = ' '; if (textBoxitemname.Text != "") { ch = textBoxitemname.Text[0]; } if ((textBoxitemname.Text == "") || (comboBoxcategory.SelectedIndex == -1) || (textBoxdescription.Text == "") || (textBoxprice.Text == "") || (comboBoxtax.SelectedIndex == -1) || (comboBoxtype.SelectedIndex == --1))

{

MessageBox.Show("Fields Marked * Are Mandatory"); }

else if (!(((Convert.ToInt16(ch) >= 65) && (Convert.ToInt16(ch) <= 90)) || ((Convert.ToInt16(ch) >= 97) && (Convert.ToInt16(ch) <= 122))))

{

MessageBox.Show("Item Name Must Contain Alphabets"); }

else if (!int.TryParse(textBoxprice.Text, out temp) == true) {

MessageBox.Show("Price Must Be In Numerics"); } else { DataRow dr; dr = ds.listofitems.NewRow(); //ta.Fill(ds.listofitems);

dr["item_code"] = Convert.ToInt32(textBoxitemcode.Text); dr["item_name"] = textBoxitemname.Text; dr["category"] = comboBoxcategory.SelectedItem; dr["description"] = textBoxdescription.Text; dr["price"] = textBoxprice.Text; dr["tax"] = comboBoxtax.SelectedItem; dr["type"] = comboBoxtype.SelectedItem; ds.listofitems.Rows.Add(dr); ta.Update(ds.listofitems); MessageBox.Show("Item Added"); ta.Fill(ds.listofitems);

if (ds.listofitems.Rows.Count == 0) {

References

Related documents

add / edit / delete machine user groups remote machine administration /control create / perform LiveRequests..

 Search, add, edit, delete and archive job profiles (Note: once a job profile is deleted, it cannot be restored. When opting to delete, it may be beneficial to discuss with

So if you add a new user in default Members group, with Edit Permission level, In addition to the Typical Contribute Permissions, users now have ability to “add, edit and delete

Access: Allows user to Access the Module Add: Allows user to Add Data in this module Edit: Allows user to Edit Data in this Module Delete: Allows users to Remove

Table of Contents Add or delete contacts Find your contacts Create Contacts Automatic contacts Edit or change contacts Search for contacts

Or click on a tab to proceed to any &#34;finalize&#34; option (Virtual Tours, Real Estate News, Print View); Or click Finish to complete the listing, then click OK at the

PHONE BOOK SEARCH CONTACT ADD CONTACT EDIT CONTACT ERASE CONTACT ERASE ALL STATUS SEARCH GROUP ADD GROUP EDIT GROUP ERASE GROUP ERASE ALL STATUS PLAYBACK FILE RENAME FILE ERASE

PHONE BOOK SEARCH CONTACT ADD CONTACT EDIT CONTACT ERASE CONTACT ERASE ALL STATUS SEARCH GROUP ADD GROUP EDIT GROUP ERASE GROUP ERASE ALL STATUS PLAYBACK FILE RENAME FILE ERASE