Professional Documents
Culture Documents
Restaurant System (مــــطـــعـــم ســــيـــاحـــــــي) 2
Restaurant System (مــــطـــعـــم ســــيـــاحـــــــي) 2
Jo
Ministry Of Higher Education
New Cairo Academy
Computer Science Department
Restaurant
o
System
Under The Leadership Of :
2017/2018
Jo
We extend our thanks , appreciation
and gratitude to
CONTENT
Chapter 1 ( Introduction ) 1
Chapter 2 ( Analysis ) 6
Requirement 7
Flow Chart 8
Jo
Use-Case 9
Sequence 10
Activity 15
Class Diagram 26
Chapter 4 ( Forms ) 65
Chapter 5 ( Implementation ) 86
Data Base Layer 87
Data Access Layer 89
Data Entity Layer 105
Jo
o
Department of Computer Science
Restaurant System 2
1. INTRODUCTION
The Restaurant System is an application which will help restaurant to
optimized and control over their restaurants. For the waiters, it is making life easier
because they don’t have to go kitchen and give the orders to chef easily. For the
management point of view, the manager will able able to control the restaurant by
having all the reports to hand and able to see the records of each employees and
orders.
The Restaurant Management System helps the restaurant manager to manage the
restaurant more effectively and efficiently by computerizing meal ordering, billing
and inventory control . The 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.
Jo
This application helps the restaurants to do all functionalities more accurately and
faster way. This application is helping to maintain the stock and cash flows and
there are many more functionalities, like.
To store records.
Control orders and services.
Billings.
Control staff and their shifting.
Control multiple branches.
Helps Manager to control each part of the restaurant.
o
The main goal is to maintain the restaurant’s functions in an effective and
accurate manner and also it is reducing the use of manual entries. This software helps
food orders to maintain day to day records in system. It is keeping a proper record of
the database.
responsibilities of each of their employees and how these people work together
to accomplish tasks in the restaurant, whether it’s a fast food place or a fine
dining establishment
Learning Objectives:
• Identify the different roles in the resturant mangment.
• Understand how the point-of-sale system works.
• Explore how the restaurant manager functions .
Learning Objectives:
• Make good hiring decisions.
• Recognize the importance of teamwork.
• Understand how to make a work schedule.
• Manage employee problems and challenges.
o
Professional Communications and Ethics in Restaurant Management :
What do you do when a customer complains? Restaurant managers have to
to handle the tough conversations, whether it’s with an unhappy customer or an
employee you need to let go. In this unit, you’ll learn strategies for effectively
communicating with your customers directly and through your marketing
materials. You’ll also learn how to communicate with your employees and use
active listening skills to support your employees. This unit will provide you with
information about ethics in the restaurant management industry and about ways
to help and support both your employees and yourself.
Learning Objectives:
• Use active listening skills to hear and communicate effectively.
• Discuss the importance of nonverbal communication.
• Understand the ethical guidelines appropriate for a restaurant
manager.
• Recognize the importance of employee-friendly policies.
Jo
o
Department of Computer Science
Restaurant System 7
1- REQUIREMENT
Hardware :
Jo
Software :
o
Department of Computer Science
Restaurant System 8
2-FLOW CHART
Jo
o
Department of Computer Science
Restaurant System 9
3-USE-CASE
Jo
o
Department of Computer Science
Restaurant System 10
4-SEQUENCE
Manager - Departement :
Jo
o
Department of Computer Science
Restaurant System 11
Manager - Employee :
Jo
o
Department of Computer Science
Restaurant System 12
Manager - Reports :
Jo
o
Department of Computer Science
Restaurant System 13
Casher - Order :
Jo
o
Department of Computer Science
Restaurant System 14
Casher - Bill :
Jo
o
Department of Computer Science
Restaurant System 15
5-ACTIVITY
Employee :-
1-Chef :
Jo
o
Department of Computer Science
Restaurant System 16
2-Casher :
Jo
o
Department of Computer Science
Restaurant System 17
3-Manager :
Jo
o
Department of Computer Science
Restaurant System 18
4-Waiter :
Jo
o
Department of Computer Science
Restaurant System 19
Jo
Customer :-
o
Department of Computer Science
Restaurant System 20
Department :-
Jo
o
Department of Computer Science
Restaurant System 21
Jo
Table :-
o
Department of Computer Science
Restaurant System 22
Item :-
Jo
o
Department of Computer Science
Restaurant System 23
Meal :-
Jo
o
Department of Computer Science
Restaurant System 24
Jo
Order :-
o
Department of Computer Science
Restaurant System 25
Bill :-
Jo
o
Department of Computer Science
Restaurant System 26
6-CLASS-DIAGRAM
Jo
o
Department of Computer Science
Restaurant System 27
DATA BASE
Jo
DESIGN
o
Department of Computer Science
Restaurant System 28
Jo
o
Department of Computer Science
Restaurant System 29
Jo
o
Department of Computer Science
Restaurant System 30
Jo
o
Department of Computer Science
Restaurant System 31
Jo
o
Department of Computer Science
Restaurant System 32
Jo
o
DATA
DICTIONARY
Data Dictionary
o
Department of Computer Science
Restaurant System 35
DATABASE
RELATION
Jo
o
Department of Computer Science
Restaurant System 47
DataBase Relation
Jo
o
Department of Computer Science
Restaurant System 48
Jo
Bill - Employee :
o
Department of Computer Science
Restaurant System 49
Jo
Customer - Bill :
o
Department of Computer Science
Restaurant System 50
Order - Bill :
Jo
o
Department of Computer Science
Restaurant System 51
Jo
Table - Bill :
o
Department of Computer Science
Restaurant System 52
Jo
Customer - Employee :
o
Department of Computer Science
Restaurant System 53
Customer - Order :
Jo
o
Department of Computer Science
Restaurant System 54
Jo
Customer_Phone - Customer :
o
Department of Computer Science
Restaurant System 55
Jo
Department - Employee :
o
Department of Computer Science
Restaurant System 56
Order - Employee :
Jo
o
Department of Computer Science
Restaurant System 57
Employee_Phone - Employee :
Jo
o
Department of Computer Science
Restaurant System 58
Jo
Item - Employee :
o
Department of Computer Science
Restaurant System 59
Order - Item :
Jo
o
Department of Computer Science
Restaurant System 60
Meal - Employee :
Jo
o
Department of Computer Science
Restaurant System 61
Order - Meal :
Jo
o
Department of Computer Science
Restaurant System 62
Jo
Meal - Meal_Item - Item :
o
Department of Computer Science
Restaurant System 63
Order - Table :
Jo
o
Department of Computer Science
Restaurant System 64
Table - Employee :
Jo
o
Department of Computer Science
Restaurant System 65
Jo
o
Department of Computer Science
Restaurant System 66
Login :
From this page you can Login by our user-name and the password to access
in Restaurant System .
Main Page :
This is Admin Side Home Page and display all Restaurant Forms .
Jo
o
Department of Computer Science
Restaurant System 68
Jo
o
Department of Computer Science
Restaurant System 69
Department :
1-Add Department
Jo
o
Department of Computer Science
Restaurant System 70
2-Delete Department
Jo
o
Department of Computer Science
Restaurant System 71
Item :
1-Add Item
Jo
o
Department of Computer Science
Restaurant System 72
2-Update Item
Jo
o
Department of Computer Science
Restaurant System 73
3-Delete Item
Jo
o
Department of Computer Science
Restaurant System 74
Meal :
1-Add Meal
Jo
o
Department of Computer Science
Restaurant System 75
2-Update Meal
Jo
o
Department of Computer Science
Restaurant System 76
3-Delete Meal
Jo
o
Department of Computer Science
Restaurant System 77
Employee :
1-Add Employee
Jo
o
Department of Computer Science
Restaurant System 78
2-Update Employee
Jo
o
Department of Computer Science
Restaurant System 79
3-Delete Employee
Jo
o
Department of Computer Science
Restaurant System 80
Order :
1-Add Order
Jo
o
Department of Computer Science
Restaurant System 81
2-Update Order
Jo
o
Department of Computer Science
Restaurant System 82
3-Delete Order
Jo
o
Department of Computer Science
Restaurant System 83
Bill :
1-Add Bill
Jo
o
Department of Computer Science
Restaurant System 84
2-Update Bill
Jo
o
Department of Computer Science
Restaurant System 85
3-Delete Bill
Jo
o
Department of Computer Science
Restaurant System 86
IMPLEMENTATION
Jo
o
Department of Computer Science
Restaurant System 87
DataBase Layer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DBLayer
{
static class DBL
{
// Conncted : Almost using with select Query . Retrive data
//, Disconnedted : Almost using to Modify the data .
static DBL()
Jo
{
// Disconnected Model
/// <summary>
/// Almost using to Retrive the data from DB.
/// </summary>
/// <param name="SelectCommand">Select Command</param>
/// <exception cref="throw Exeption for Null Table">.</exception>
/// <returns></returns>
o
public static DataTable ExecuteQuery(String SelectCommand) //
Method Name : ConnectExecuteQuery()
{
// Connected Model
/// <summary>
/// Almost using with insert , update , delete.
/// </summary>
/// <param name="Command">insert , update , delete Command </param>
/// <exception cref="throw Exeption no effected rows"> </exception>
/// <returns></returns>
public static int ExecuteNonQuery(String Command)
{
}
Jo
/// <summary>
/// Almost using to retriving one cell.
/// </summary>
/// <param name="selectCommand">select Command </param>
/// <exception cref="throw Exeption exepted one cell..."></exception>
/// <returns></returns>
public static object Executescaler(String selectCommand)
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Resturant_Prototype_2.DALayer
Jo
{
class EmployeeDAL
{
// GetAll , GetById , Insert , Update , Delete
public static List<Employee> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Employee");
public static Boolean Update(int id, String f_name, String l_name, String
birthofdate, String gender, float salary, String address, int manager_id, int Dep_id)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Employee set
F_Name = '{0}', L_Name = '{1}', BirthOfDate = '{2}', Gender = '{3}', Salary = {4},
Address = '{5}', Manager_ID = {6}, Dep_Id = {7} where Id = {8} ", f_name, l_name,
birthofdate, gender, salary, address, manager_id, Dep_id, id));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
Jo
result = false;
return result;
}
}
}
}
Department :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class DepartmentDAL
{
// GetAll , GetById , Insert , Update , Delete
public static List<Department> GetAll()
{
// Connect to DB
Jo
DataTable dt = DBL.ExecuteQuery("select * from Department");
List<Department> dep = new List<Department>();
return dep;
}
}
}
}
Table :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class TableDAL
{
public static List<Table> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Table ");
Jo
List<Table> Table = new List<Table>();
for (int i = 0; i < dt.Rows.Count; i++)
{
Table.Add(new Table(int.Parse(dt.Rows[i]["Table_No"].ToString()),
int.Parse(dt.Rows[i]["Water_Id"].ToString())));
}
return Table;
}
}
}
o
Department of Computer Science
Restaurant System 95
Item :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class ItemDAL
{
public static List<Meal> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Item ");
Jo
List<Meal> Meal = new List<Meal>();
for (int i = 0; i < dt.Rows.Count; i++)
{
Meal.Add(new Meal(int.Parse(dt.Rows[i]["Id"].ToString()),
dt.Rows[i]["Name"].ToString(), dt.Rows[i]["Description"].ToString(),
float.Parse(dt.Rows[i]["Price"].ToString()),
int.Parse(dt.Rows[i]["Cashire_Id"].ToString()),
int.Parse(dt.Rows[i]["Order_No"].ToString())));
}
return Meal;
}
o
public static Meal GetById(int id)
{
// connected with database
DataTable dt = DBL.ExecuteQuery(String.Format("select * from Item where
Id = {0}", id));
Meal Meal;
Meal = Meal = new Meal(int.Parse(dt.Rows[0]["Id"].ToString()),
dt.Rows[0]["Name"].ToString(), dt.Rows[0]["Description"].ToString(),
float.Parse(dt.Rows[0]["Price"].ToString()),
int.Parse(dt.Rows[0]["Cashire_Id"].ToString()),
int.Parse(dt.Rows[0]["Order_No"].ToString()));
return Meal;
}
public static Boolean Update(int id, String name, String description, int price, int
cashire, int order_No)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Item set
Name = '{0}', Description = '{1}', Price = {2}, Cashire_Id = {3}, Order_No= {4}
where Id = {5} ", name, description, price, cashire, order_No, id));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
result = false;
return result;
public static Boolean insert(int id, String name, String description, int price, int
cashire, int order_No)
{
int InsertedRow = DBL.ExecuteNonQuery(String.Format("insert into Item
o
values('{0}','{1}',{2},{3},{4})", name, description, price, cashire, order_No));
Boolean result = false;
if (InsertedRow > 0)
result = true;
else
result = false;
return result;
}
}
}
Meal :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class MealDAL
{
public static List<Meal> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Meal ");
Jo
List<Meal> Meal = new List<Meal>();
for (int i = 0; i < dt.Rows.Count; i++)
{
Meal.Add(new Meal(int.Parse(dt.Rows[i]["Id"].ToString()),
dt.Rows[i]["Name"].ToString(), dt.Rows[i]["Description"].ToString(),
float.Parse(dt.Rows[i]["Price"].ToString()),
int.Parse(dt.Rows[i]["Cashire_Id"].ToString()),
int.Parse(dt.Rows[i]["Order_No"].ToString())));
}
return Meal;
}
o
public static Meal GetById(int id)
{
// connected with database
DataTable dt = DBL.ExecuteQuery(String.Format("select * from Meal where
Id = {0}", id));
Meal Meal;
return Meal;
}
public static Boolean Update(int id, String name, String description, int price, int
cashire, int order_No)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Meal set
Name = '{0}', Description = '{1}', Price = {2}, Cashire_Id = {3}, Order_No= {4}
where Id = {5} ", name, description, price, cashire, order_No,id));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
result = false;
return result;
public static Boolean insert(int id, String name, String description, int price, int
cashire, int order_No)
{
int InsertedRow = DBL.ExecuteNonQuery(String.Format("insert into Meal
o
values(,'{0}','{1}',{2},{3},{4})", name, description, price, cashire, order_No));
Boolean result = false;
if (InsertedRow > 0)
result = true;
else
result = false;
return result;
}
}
Customer :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class CustomerDAL
{
public static List<Customer> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Customer ");
Jo
List<Customer> Cust = new List<Customer>();
public static Boolean Update(int id, String name, String Address, int Water_Id)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Customer set
Name = '{0}', Address = '{1}', Water_Id= {2} where Id = {2} ", name, Address,
Water_Id, id));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
result = false;
Jo
return result;
public static Boolean insert( String name, String Address, int Water_Id)
{
int InsertedRow = DBL.ExecuteNonQuery(String.Format("insert into Customer
values('{0}','{1}',{2})", name, Address, Water_Id));
Boolean result = false;
if (InsertedRow > 0)
result = true;
else
result = false;
return result;
}
}
}
Order :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class OrderDAL
{
// GetAll , GetById , Insert , Update , Delete
public static List<Order> GetAll()
{
// Connect to DB
Jo
DataTable dt = DBL.ExecuteQuery("select * from Order");
List<Order> order = new List<Order>();
for (int i = 0; i < dt.Rows.Count; i++)
{
//Error To do That .
//d = new Department((int)dt.Rows[i]["Id"],
dt.Rows[i]["Name"].ToString());
//emp = new Employee((int)dt.Rows[i]["Id"],
dt.Rows[i]["F_Name"].ToString(), dt.Rows[i]["L_Name"].ToString(),
(DateTime)dt.Rows[i]["BirthOfDate"], (Gender)dt.Rows[i]["Gender"],
(float)dt.Rows[i]["Salary"], dt.Rows[i]["Address"].ToString(),
(uint)dt.Rows[i]["Manager_Id"], d);
//cust = new Customer((int)dt.Rows[i]["Id"],
dt.Rows[i]["Name"].ToString(), dt.Rows[i]["Address"].ToString(), emp);
o
order.Add(new Order(int.Parse(dt.Rows[i]["Order_No"].ToString()),
float.Parse(dt.Rows[i]["Price"].ToString()),
int.Parse(dt.Rows[i]["Casher_Id"].ToString()),
int.Parse(dt.Rows[i]["Table_No"].ToString()),
int.Parse(dt.Rows[i]["Customer_Id"].ToString()),
dt.Rows[i]["Customer_Name"].ToString(),
dt.Rows[i]["Customer_Address"].ToString()));
}
return order;
}
public static Boolean Update(int order_no, float price, int cashre_Id, int
table_no, int customer_id, String customer_name, String customer_address)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Order set
Price = {0}, Casher_Id= {1}, Table_No= {2}, Customer_Id= {3} , Customer_Name
= '{4}', Customer_Address = '{5}' where Order_No = {6} ", price, cashre_Id,
table_no, customer_id, customer_name, customer_address, order_no));
Boolean result = false;
o
if (RowUpdate > 0)
result = true;
else
result = false;
return result;
}
public static Boolean insert( float price, Int32 cashre_Id, Int32 table_no, Int32
customer_id, String customer_name, String customer_address)
{
int InsertedRow = DBL.ExecuteNonQuery(String.Format("insert into Order
values( {0} , {1} , {2} , {3} ,'{4}','{5}' )", price, cashre_Id, table_no, customer_id,
customer_name, customer_address));
Boolean result = false;
if (InsertedRow > 0)
result = true;
else
result = false;
return result;
}
}
Jo
o
Department of Computer Science
Restaurant System 104
Bill :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Resturant_Prototype_2.DBLayer;
using Resturant_Prototype_2.DELayer;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DALayer
{
class BillDAL
{
// GetAll , GetById , Insert , Update , Delete
public static List<Bill> GetAll()
{
// Connect to DB
DataTable dt = DBL.ExecuteQuery("select * from Bill");
Jo
List<Bill> bill = new List<Bill>();
}
return bill;
}
int.Parse(dt.Rows[0]["Order_No"].ToString()),
float.Parse(dt.Rows[0]["Order_Price"].ToString()),
int.Parse(dt.Rows[0]["Customer_Id"].ToString()), dt.Rows[0]["Customer_Name"].ToString(),
dt.Rows[0]["Customer_Address"].ToString(), int.Parse(dt.Rows[0]["Table_No"].ToString()));
return bill;
}
public static Boolean Update(int bill_no, float total_price, String deatils, String date, String
time, int cashie_id, int order_no, float order_price, int customer_id, String customer_naem, String
customer_address, int table_no)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("update Bill set Total_Price =
{0}, Deatils= '{1}', Date = '{2}', Time = '{3}', Cashre_Id = {4}, Order_No = {5}, Order_Price =
{6}, Customer_Id = {7}, Customer_Name = '{8}' , Customer_Address '{9}' , Table_No = {10}
where Bill_No = {11} ", bill_no, total_price, deatils, date, time, cashie_id, order_no, order_price,
customer_id, customer_naem, customer_address, table_no, bill_no));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
result = false;
return result;
Jo
}
public static Boolean insert(int bill_no, float total_price, String deatils, String date, String
o
time, int cashie_id, int order_no, float order_price, int customer_id, String customer_naem, String
customer_address, int table_no)
{
int RowUpdate = DBL.ExecuteNonQuery(String.Format("insert into Bill
Values(Total_Price = {0}, Deatils= '{1}', Date = '{2}', Time = '{3}', Cashre_Id = {4}, Order_No
= {5}, Order_Price = {6}, Customer_Id = {7}, Customer_Name = '{8}' , Customer_Address '{9}' ,
Table_No = {10}) ", bill_no, total_price, deatils, date, time, cashie_id, order_no, order_price,
customer_id, customer_naem, customer_address, table_no));
Boolean result = false;
if (RowUpdate > 0)
result = true;
else
result = false;
return result;
}
}
}
namespace Resturant_Prototype_2.DELayer
{
class Employee
{
// Variable, properites .
public int? Id { get; set; } // having get beacuse it take value in DB So, can
using .
public String F_Name { get; set; }
public String L_Name { get; set; }
public String BirhOFDate { get; set; }
Jo
public String Gender { get; set; }
public float? Salary { get; set; }
public String Address { get; set; }
public int? ManagerId { get; set; }
private int? dep_id;
// constructors ...
//do not using id , it's identical {Auto incremental in DB } in DataBase .
o
public Employee(int? id, String fname, String lname, String birthofdate,
String gender, float? salary, String Address, int? dep_ID, int? managerid)
{
this.Id = id;
this.F_Name = fname;
this.L_Name = lname;
this.BirhOFDate = birthofdate;
this.Gender = gender;
this.Salary = salary;
this.Address = Address;
this.ManagerId = managerid;
this.dep_id = dep_ID;
}
//
public Employee(int id, String fname, String lname, String gender, float
salary, int dep_Id, int managerId)
: this(id, fname, lname, null, gender, salary, null, dep_Id, managerId)
{
}
// Manager_Id, Department_Id
public Employee(int id, String fname, String Lname, String gender, float
salary)
: this(id, fname, Lname, null, gender, salary, null, null, null)
{
}
// Dpeartment
//public Employee(int id, String fname, String Lname, String gender, float
salary, int managerid)
// : this(id, fname, Lname, null, gender, salary, null, null, managerid)
//{
//}
//Manager_Id
public Employee(int id, String fname, String lname, String gender, float salary,
int dep_id)
: this(id, fname, lname, null, gender, salary, null, dep_id, dep_id)
{
}
Jo
//Copy Constructor
//public Employee(Employee emp) {
// // Employee emp = new Employee();
// // Employee emp1 = new Employee(emp);
//methods
}
}
Department :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Department
{
// variables , properites
public int ID { get; set; }
public String Name { get; set; }
// Constructors
public Department(int id, String Name)
{
this.ID = id;
this.Name = Name;
}
//Methods
public override string ToString()
{
o
return String.Format("{0},{1}", ID, Name);
}
Table :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Table
{
public int Table_No { get; set; }
Item :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Item
{
public int? Id { get; set; }
public String Name { get; set; }
public String Description { get; set; }
public float? Price { get; set; }
// constructor
public Item(int? id, String name, String description, float? price, int? cashire,
int? order_No)
o
{
this.Id = id;
this.Name = name;
this.Description = description;
this.Price = price;
this.cashire = cashire;
this.order_no = order_No;
public Item(String name, String description, float? price, int? cashire, int?
order_No)
: this(null, name, description, price, cashire, order_No)
{}
// Methods
public override string ToString()
{
return String.Format("{0},{1},{2},{3},{4},{5}", Id, Name, Description,
Price, cashire, order_no);
}
}
}
Jo
o
Department of Computer Science
Restaurant System 112
Meal :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Meal
{
public int? Id { get; set; }
public String Name { get; set; }
public String Description { get; set; }
public float? Price { get; set; }
//Constructor
public Meal(int id, String name, String description, float price, int? cashire,
int? order_No)
{
this.Id = id;
this.Name = name;
this.Description = description;
this.Price = price;
this.cashire = cashire;
this.order_no = order_No;
// Methods
public override string ToString()
{
return String.Format("{0},{1},{2},{3},{4},{5}", Id, Name, Description,
Price, cashire, order_no);
}
Customer :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Customer
{
public int? ID { get; set; }
public String Name { get; set; }
public String Address { get; set; }
Order :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Order
{
// variable & properites
public int? Order_No { get; set; } // order_No : { identity } Auto Incremental
public float? Price { get; set; }
// Constructors
public Order(int order_no, float price, int? cashire, int? table_no, int?
customer_Id, String customer_name, String customer_Address)
{
this.Order_No = order_no;
this.Price = price;
this.cashire = cashire;
this.Table_No = table_no;
this.customer_Id = customer_Id;
this.customer_Name = customer_name;
this.customer_Address = customer_Address;
}
public Order(int order_no, float price, int table_No, int customer_Id, String
customer_name, String customer_Address)
: this(order_no, price, null, table_No, customer_Id, customer_name,
customer_Address)
{
}
// method
public override string ToString()
{
return String.Format("{0},{1},{2},{3},{4},{5},{6}"
, Order_No, Price, cashire, table_No, customer_Id, customer_Name,
o
customer_Address);
}
}
}
Bill :-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Resturant_Prototype_2.DELayer
{
class Bill
{
public int? Bill_No { get; set; }
public float? Total_Price { get; set; }
public String Deatils { get; set; }
public String Date { get; set; }
public String Time { get; set; }
//Constructor
public Bill(int? bill_no, float? total_price, String deatils, String date, String
time, int? cashie_id, int? order_no, float? order_price, int? customer_id, String
customer_naem, String customer_address, int? table_no)
{
this.Bill_No = bill_no;
Jo
this.Total_Price = total_price;
this.Deatils = deatils;
this.Date = date;
this.Time = time;
this.cashire_Id = cashie_id;
this.order_No = order_no;
this.order_price = order_price;
this.customer_Id = customer_id;
this.customer_Name = customer_naem;
this.customer_Address = customer_address;
this.table_no = table_no;
}
public Bill(int bill_no, int total_price, String deatils, String date, String time)
o
: this(bill_no, total_price, deatils, date, time, null, null, null, null, null,
null, null)
{
// Methods
public override string ToString()
{
return
String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}",
Bill_No, Total_Price, Deatils, Date, Time, cashire_Id, order_No,
order_price, customer_Id, Customer_Name, customer_Address, table_no);
}
INDEX
Jo
o
Department of Computer Science
Restaurant System
CONTENT
Chapter 1 ( Introduction ) 1
Chapter 2 ( Analysis ) 6
Requirement 7
Flow Chart 8
Jo
Use-Case 9
Sequence 10
Activity 15
Class Diagram 26
Chapter 4 ( Forms ) 65
Chapter 5 ( Implementation ) 86
Data Base Layer 87
Data Access Layer 89
Data Entity Layer 105
Jo
Ministry Of Higher Education
New Cairo Academy
Computer Science Department
Restaurant
o
System
Under The Leadership Of :