Professional Documents
Culture Documents
ACKNOWLEDGMENT
First I would like to thank BCS for giving a chance to design this
kind of higher educational qualification which is very valuable
to build up as our future careers.
2|Page
Bakery & Restaurant Management System 2015
CHAPTER 02 - REQUIRMENTSPECIFICATION
2.1 INTRODUCTION
2.2 FACT GATHERING TECHNIQUES
2.3 FUNCTIONAL REQUIRMENT OF THE SYSEM
2.4 NON-FUNCTIONAL REQUIRMENT OF THE SYSTEM
2.5 DESCRIPTION OF THE SYSTEM USERS
2.6 HARDWARE & SOFTWARE SPECIFICATION
2.6.1 Development Environment
2.6.2 Operational Environment
2.7 WORKING SHEDULE
3|Page
Bakery & Restaurant Management System 2015
ll. Price Change
3.4.4 Point Of Sale (POS)
l. POS
ll. POS Finalized.
3.4.5 Purchasing
l. Purchase Order
ll . Purchase Order Details
lll. Purchase Order Finalize Details
CHAPTER 04 IMPLEMENTATION
4.1 INTRODUCTION
4.2 IMPLEMENTATION ENVIRONMENT
I. SERVER ENVIRONMENT
II. CLIENT ENVIRONMENT
III. DEVELOPING ENVIRONMENT
4.3 NETWORK ARCHITECHER
4.4 APPLICATION ARCHITECHER
CHAPTER 05 TESTING
5.1 INTRODUCTION
5.2 TESTING STRATAGIES
5.3 TEST PLAN AND TEST CASE
5.4 NON FUNCTIONAL TESTING
5.5 DEPLOYMENT
4|Page
Bakery & Restaurant Management System 2015
6.5 PROBLEMS AND SOLUTIONS FACED DURING THE PROJECT
6.6 FUTURE IMPROVEMENT OF THE SYSTEM
6.7 CONCLUSION
APPENDICES
APPENDIX 1 SYSTEM DOCUMENTATION
APPENDIX 2 USER DOCUMENTATION
3.6.7 Category & Location Interfaces
i. Category
ii. Location Form
iii. Edit Location Form
iv. Delete Location Form
3.6.8 Item Master Interfaces
i. Item Master Update
ii. Item Delete Confirmation Form
iii. Bakery Current Stock
iv. Price Change Form
v. Price Change View Form
vi. Open Stock
vii. Open Stock View
5|Page
Bakery & Restaurant Management System 2015
6|Page
Bakery & Restaurant Management System 2015
TABLE OF FIGURES
Figure 1.2.1 current system flow
Figure 1.3.1 system Architecture
Figure 2.7.1 Working Schedule
Figure 3.2.1.i open stock & price change module
Figure 3.2.1.ii supplier purchase module
Figure 3.2.1.iii location module
Figure 3.2.1.iv Category Module
Figure 3.2.1.v Manufacture Module
Figure 3.2.1.vi Point Of Sale Module
Figure 3.2.1.vii Transport & Supplier Module
Figure 3.2.1.viii Employee Module
Figure 3.2.1.ix User Controller Module
Figure 3.2.2.i Activity Diagram for User Login
Figure 3.2.2.ii Activity Diagram Adding Item To Bakery Stock
Figure 3.2.2.iii Activity Diagram for Adding Manufacture Products
Figure 3.2.2.iv Activity Diagram for Add Purchase Supplier
Figure 3.2.2.v Activity Diagram for Place Order
Figure 3.2.2.vi Activity Diagram for Day End Process
Figure 3.2.2.vii Activity Diagram for Daily Transfer Manufacture
Figure 3.2.2.viii Activity Diagram for Add Users
Figure 3.2.3 System ER Diagram
Figure 3.2.4.1 Bakery Item Master Flow Chart
Figure 3.2.4.2 Price Change Form Flow Chart
Figure 3.3 Database Design & Structure
Figure 3.4.1 Customer main form
Figure 3.4.2 Customer Login Page
Figure 3.4.3.I Item Master
Figure 3.4.3.II Price Change Form
Figure 3.4.4. I Point Of Sale
Figure 3.4.4.II Point Of Sale Finalize
Figure 3.4.5.I Purchase Order
Figure 3.4.5.II Purchase Order Details
Figure 3.4.5.III Purchase Order Finalize
Figure 4.3 Network Architecture
Figure 4.4 Application Architecture
7|Page
Bakery & Restaurant Management System 2015
CHAPTER 01 ABSTACT
1.1 INTRODUCTION
8|Page
Bakery & Restaurant Management System 2015
1.2.1 introduction
The Kings Bakers is located in Kalutara and its restaurant located in the western
province. Currently it is operated as a fully manual system and it has many drawbacks
when using the manual process. The bakery manufacture the items (Bread, Short eats,
Beverages and etc.) and deliver to the own restaurant, this process happens every day
and the employees of them manage the products.
In each restaurant, 2 or 3 employees are working and they will handle a Point of Sales
(POS) and other systems. When the customer requests for a purchase order from the
restaurant, they check if the particular order quantity is available. If the quantity exists,
the purchase order can be proceed. If not the manager of the restaurant must inform
the bakery who provides the manufactured items to the restaurant to get them
manufactured.
The bakery provides a vehicle to transport the manufactured items to the restaurant
and it distributes them island wide. This is a huge process that happens in every day.
The existing manual system is not easy to handle the manufacture process daily because
they should know about the ingredients and raw materials that use to manufacture the
items and have to note down the process flow.
9|Page
Bakery & Restaurant Management System 2015
Time wasted in gathering the data in stock report for each manufacture items at
the end of the day.
No record about suppliers and item purchases to bakeries.
No re-order level to the produced items when they are selling at restaurant (No
way to identify this item quantity is going to reduce).
Error occurrences in billing calculation.
No history records in orders from customers, purchases items from suppliers and
others.
Inconsistency between income and expenses.
No proper way to handle the accounts.
The bakery owner should have to monitor the restaurant POS (Point of Sale)
whether its working proper way continuously.
Lack of security regarding manual data entries.
Unable to get the feedback of the customers and employees.
Bakery Process :-
This will handle the process of purchasing items from suppliers;
manufacturing products, employee process and others.
Restaurant Process :-
This process handles the selling of the manufactured products to
the customers, replace orders, edit orders and dispatch the
products and etc.
Customer View Process :-
This is a web based solution where the customers can visit the web
site and check the items they wish to buy from the restaurant.
Customers can give a feedback regarding the restaurant food and
the service
This system is developed in a centralize database environment and which uses ASP.net with MS
SQL as the database. This is hosted through IIS to connect all the users who wish to access the
system.
10 | P a g e
Bakery & Restaurant Management System 2015
The Following Architecture will show the system flow.
- Bakeries
- Restaurants
- Centerlize Database
11 | P a g e
Bakery & Restaurant Management System 2015
This system is use in different locations, because bakery and its restaurants establish in
different places and its allow to accessibility from anywhere via the internet .the system is fully
control by where the main location is established .the administrator can anytime give the
accessibility to the users .upgrade the system can be done easily because its centralize and all
the data store in same place to management can be easily handle.
1.3.1 Objectives
Generate the code systems to all stocks, purchases and other items to identify the
specific manufactured products and others
Allow customers to post feedback online about the restaurant food or other
manufactured products
Enable the report generation on particular fields
Give the special benefits, discounts to customers who use the web site
Provide a special foods, beverage or current foods, manufactured items from restaurant
using hosted site daily
Users can identify the current stock items, easy to find particular item or manufacture
details
Administrator of the Bakery can get the details from the manufactured item details
Manufacture unit price will update automatically under its added ingredients of items
Reduce the effort of the manual system activities
Remove all manual and paper work
1.3.2 Scope
12 | P a g e
Bakery & Restaurant Management System 2015
Facilitates to change the manufacture ingredients quantity and automatically the unit
price of manufacture item will be changed.
Track the manufacture transfer to the restaurant from the bakery, vehicle and the
employee (driver).
Facilitates a Day End Process in each restaurant.
Restricted to access the unauthorized users.
Encrypted some confidential data.
Trace the session and identify the user locations.
13 | P a g e
Bakery & Restaurant Management System 2015
Interviews
Questionnaires
Observations
Reports
Group Meetings
Interviews :-
This method is used to collect the information from individuals with face to face interaction.
This was conducted with the owner of the bakery and employees who are working in the
restaurant. Sometimes interviews were held in over the phone to gather the details. Sharing
details with both side and formal interview give much effort solve the problem. by using
interviewing as a requirement gathering technique could be very useful because it help to
clarified doubts at same time by asking questions ,it is very useful to get a clear picture about
the users and their designated areas of duty by asking open end questions .
Questionnaires :-
A printed document contains a number of questions that should be answered by the resource
person. The questionnaires contain yes/no questions, multiple choice questions, scaled and
open ended questions. This type of method is used to get the responses from the people who
cannot explain the business to the analysis. This method is very useful to get information from a
large crowd .this method is save the time in both side and most of include close ended
questions.
14 | P a g e
Bakery & Restaurant Management System 2015
Observation :-
This method is used to observe the current manual system and to learn about the system. By
visiting the main bakery helped in identifying the process and the weakness of the system. How
the employees interact with the current system is also observed.
Reports :-
This is used to get historical details, annual reports, income and expenses, invoices, bills, tax file
and more about the existing system. These details were used to identify the current status
about the place and to analysis and decide what features should come out with the proposed
system.
Group Meeting :-
This bakery and restaurant is a medium sized organization which have employees working in
different locations. By getting all of them into a discussion regarding the new system is another
method of gathering requirements which helps to identify different perspectives about the
existing system and new system.
15 | P a g e
Bakery & Restaurant Management System 2015
16 | P a g e
Bakery & Restaurant Management System 2015
Usability -:
This is facilitate to users who can use the system anywhere in the word
and system must be friendly and any person can understand the process
of the system. Well form interfaces, help guidance will be advantage of
usability.
17 | P a g e
Bakery & Restaurant Management System 2015
Reliability -:
The system consist many calculations parts and users must working with
correctly and running without any failures. The manufacturing part of the
system consists several item and unit price will be calculate the sum of
the Items.
Security -:
This function must be perform highly in the system because avoid virus
attacks, phishing attacks and more things from the system .data must
secured, it should be encrypted from others to avoid see what is actual
data. Backup the system database in every 24 hours.
Correctness -:
The system data must be accuracy and correctness because users expect
the details without errors and correctness data. Modify stock and other
details must be updated correctly in database.
Maintainability -:
System can add, updates new features without harming to the system.
This is most probably want if new technology release and deal with it.
18 | P a g e
Bakery & Restaurant Management System 2015
This allows to only Restaurant Task .This user can only handle the Point of
Sale ,order Edit ,Day end Process and some other function. This user can
contact with admin of the particular bakery through messages, message
tracker function is allowed to this users. This user can view the past order
and edit the orders if any mistakes happen in transaction.
2.6.1 Developments
Hardware Requirements
Intel Pentium core I 3 .0 GHz Processor
RAM 4GB
125 VGA Card or no board.
200 GB hard disk.
Network Adapter.
Internet Connection.
Monitor.
Keyboard / mouse.
Software Requirements
Microsoft windows 7 ultimate.
Microsoft .NET Framework 3.5 and 4.5
Microsoft ASP.NET MVC 3
Microsoft ASP.NET MVC Web Pages
Microsoft Visual Studio 2012.
Microsoft SQL Server 2005 or 2008.
Cristal Report 9.
Team Viewer 9.
IIS 6.0 Manager.
New Upgrade version of Firefox or Chrome.
19 | P a g e
Bakery & Restaurant Management System 2015
2.6.2 Operations
Main Server will be stored in separate place where all the data will be stored there.
Hardware Requirements
Intel Pentium core I 3 .0 GHz Processor.
RAM 8GB.
500 GB Hard Disk
256 separate VGA.
Internet connection.
UPS (30 min).
Key board /mouse.
Printer.
Monitor.
Software Requirements
Windows Server 2008 R2.
Microsoft SQL Server 2005/ 2008.
Microsoft .NET Framework 3.5 and 4.5
Microsoft ASP.NET MVC 3
Microsoft ASP.NET MVC Web Pages
Team Viewer 9
IIS Manager 6.0.
Monitoring recorder.
Virus Gard.
20 | P a g e
Bakery & Restaurant Management System 2015
2.7 WORKING SHEDULE
21 | P a g e
Bakery & Restaurant Management System 2015
The bakery admin have authorize to add items to stocks and exists current
quantity in item will be added to the system and the authorize persons can be
able to access the delete the item or update the item if gets any issue.
When some time the item price will be change, so the system
users can be able to change the item price related to the item and the system
will create new item batch.
22 | P a g e
Bakery & Restaurant Management System 2015
Use Case name Open Stock And Price Change
Description This use case explains how to add Open Stock And Price Change
record will be added
Actor Administrator
Normal course of events 1. Administrator logs in to the system
2. Selects stock control bakery open stock from the
home page
3. Enters the record index of the record that needs to be
edited
4. Clicks on submit button
23 | P a g e
Bakery & Restaurant Management System 2015
ii. Supplier purchase Module
24 | P a g e
Bakery & Restaurant Management System 2015
10. Add item to purchase from the supplier
11. Add purchase details
12. Go to the finalize purchase form
13. Select branch and purchase no
14. Finalize the purchasing
15. Go to the GRN form
16. Select the location and purchase order no
17. Add GRN button
18. Go to the finalize GRN form
19. Click Finalize button
25 | P a g e
Bakery & Restaurant Management System 2015
Use Case name Location Module
Description This use case explains how to add location
Actor Administrator
Normal course of events 1. Administrator logs in to the system
2. Go to the category & location location form from the
home page
3. Auto generate the location code
4. Fill the details in fields
5. Select employee
6. Select status
7. Select position
8. Click submit button.
26 | P a g e
Bakery & Restaurant Management System 2015
v. Manufacture Module
27 | P a g e
Bakery & Restaurant Management System 2015
Use Case name Add New Manufactures
Description This use case explains how to add Manufacture To Bakery
Actor Administrator
Normal course of events 1. Administrator logs in to the system
2. Go to the manufacturing manufacturing process
Item Manufacture (id generator) form from the
home page
3. Select the location
4. Select Category
5. Auto generate the manufacture code
6. Type manufacture name
7. Click add button
8. Go to the item manufacture Item Product form
9. Select location ,category and manufacture
10. Add to items selecting item name and type the
quantity.
11. Click add to list
12. Go to manufacturing finalize form
13. Select the location, category and manufacture
name
14. Related details show in the grid.
15. Click manufacture button
28 | P a g e
Bakery & Restaurant Management System 2015
vi. Point Of Sale Module
29 | P a g e
Bakery & Restaurant Management System 2015
Use Case name Point OF Sale module
Description This use case explains how to place order form the customer
Actor Administrator
Normal course of events 1. Administrator logs in to the system
2. Go to the POS point of sale form from the
home page
3. Generate order id
4. Select the location
5. Select customer id
6. Click reserve order button to reserve the order
7. Select restaurant
8. Search manufacture item and select
9. Details will show the fields
10. Type quantity
11. Click add to list button
12. Click next button to finalize the order
13. Select payment type
14. Click submit button to finalize
30 | P a g e
Bakery & Restaurant Management System 2015
31 | P a g e
Bakery & Restaurant Management System 2015
32 | P a g e
Bakery & Restaurant Management System 2015
33 | P a g e
Bakery & Restaurant Management System 2015
34 | P a g e
Bakery & Restaurant Management System 2015
35 | P a g e
Bakery & Restaurant Management System 2015
36 | P a g e
Bakery & Restaurant Management System 2015
37 | P a g e
Bakery & Restaurant Management System 2015
3.2.4 ER Diagram
This diagram shows the graphical representation of the system and shows the relationships
between each entities in the system. This Diagram main entities regarding to the system. This
is data modeling technique and it helps to proceed the business process.
38 | P a g e
Bakery & Restaurant Management System 2015
39 | P a g e
Bakery & Restaurant Management System 2015
40 | P a g e
Bakery & Restaurant Management System 2015
The general view of Database design define the table of the SQL and its interact with
system. The following diagram will show the tables of the database.
41 | P a g e
Bakery & Restaurant Management System 2015
Database is used to develop Microsoft SQL Server Environment and its relational database
management system. NET, C# and ASP.NET developers use to develop the system using this
server.
42 | P a g e
Bakery & Restaurant Management System 2015
TBALES -:
I. tblLocation
This is use to define the location when the admin of the system need to define
the Bakeries and Restaurants
Sample Data
II. tblCategory
Category details are store here. Every location having a unique category code
and different location having different category.
43 | P a g e
Bakery & Restaurant Management System 2015
Sample Data
III. tblBakery_Res_Return
Return the manufactured products due to some reasons.
IV. tblBakeryBatchMaster
44 | P a g e
Bakery & Restaurant Management System 2015
add Item to system and batch code, item code and location code are primary
keys and item code is unique to all location and bath code can be different
when the changing prices regarding to the item .
Sample Data
IV. tblBakeryItemMaster
This table is use in commonly to all location and when adding item details the basic details will
be store here.
45 | P a g e
Bakery & Restaurant Management System 2015
Sample Data
V. tblBakeryTransaction
All the bakery transaction, trans type and refer code will be shown what kind of transactions
and item_in and item_out will demonstrate the bakery current stock in quantity and remarks
filed will be identify the detail of transaction
46 | P a g e
Bakery & Restaurant Management System 2015
Sample Data
VI. tbl_customer
Add a customers to the system
47 | P a g e
Bakery & Restaurant Management System 2015
Sample Data
VII. tblEmployee
This shows details of employees and restaurants Admin type column shows to whom these
employee belongs to.
Sample Data
48 | P a g e
Bakery & Restaurant Management System 2015
VII. tblItem_Image
This will show whether admin can update the images of the each item Image path column show
the image path of the system
Sample Data
VIII. tblManufactureFromToLocation
49 | P a g e
Bakery & Restaurant Management System 2015
This uses to transfer the manufactured product another location (Restaurant to
restaurant).from_location is current location and To_location will be the request come from the
location to transfer Manufacture product.
Sample Data
IX. tblManufactureTransfer
Users will add manufacture product in particular location and date. Qty_in field shows how
many products produced for particular date and qty_out field shows how much transfers to the
restaurant and etc.
Sample Data
50 | P a g e
Bakery & Restaurant Management System 2015
X. tblManufacturing
Sample Data
XI. tblManufacturingDetails
Sample Data
51 | P a g e
Bakery & Restaurant Management System 2015
tblManufacturingTemp And tblManufacturingTempDetail tables are used to temporary store
the data and when its come to finalize stage related data will be added to the Original Table
tblManufacturing AND tblManufacturingDetails to avoid the misused and duplication data.
52 | P a g e
Bakery & Restaurant Management System 2015
Particular users have access to the admin panel of this system using this form and when user
enter the invalid detail the following error will be display.
53 | P a g e
Bakery & Restaurant Management System 2015
This shows add Items to the bakery, selecting bakery location and category (drop box), the item
code will be generate automatically. system facilitate add images regarding the item and unit
(drop box) show the item measurement and other fields are mandatory to fill .clicking save
button data will be add .user can facilitate to select category and click the search button , the
added relevant items will be display in the grid .
54 | P a g e
Bakery & Restaurant Management System 2015
II. Price Change Form (Item Master price Changes price Change)
This uses to change an item prices .when changing the item price automatically create a new
batch. Selecting location code and item name shows the details of exists item and Batch
Quantity filed indicate if user select Change Qty radio button current quantity will be update to
these new prices with new batch ,if select New Qty radio button then create a new batch (the
item having two batches in different prices).
55 | P a g e
Bakery & Restaurant Management System 2015
This form is used when the customer purchase the order firstly user should reserve the order
using clicking reserve order button selecting particular location and customer id fields.
Selecting restaurant the reserve order id will showed and the particular items will showed
related to the restaurant.selecting the item code and batch code ,the selling price,current
quantity fields will be display .using add to cart button can add a maufatcure item to particular
order .Next button will be visible when having manufacture items in particular order and
location .
56 | P a g e
Bakery & Restaurant Management System 2015
This shows order details in particular order id ,there will be payment type and when you9b
click one of this, the releated fields will be visible and if user select CASH radion button the
total cash and balance field will be visible.these fields must be filled to finalize the order .
57 | P a g e
Bakery & Restaurant Management System 2015
3.4.5 Purchasing
I. Purchase Order Process
1. Purchase Order (Purchasing Purchase Order Process Purchase Order)
User must first generate the purchase order no. User can purchase order from this form and
this form provide generate the purchase order no in particular location.
58 | P a g e
Bakery & Restaurant Management System 2015
After adding purchase order no; system facilitate to add a purchase item from supplier ,free
quantity field indicate some time supplier willing to give free quantity the bakery .selecting
pending purchase order related other fields will be
3.6.9 Manufacturing
I. Item Manufacture Process
Manufacture process consist three stages, these stage are followings.
1. Item Manufacture (id generation) (Manufacturing Item Manufacture
Process Item Manufact )
User can generate the specific manufacture code regarding the selecting location and particular
category.
59 | P a g e
Bakery & Restaurant Management System 2015
60 | P a g e
Bakery & Restaurant Management System 2015
61 | P a g e
Bakery & Restaurant Management System 2015
62 | P a g e
Bakery & Restaurant Management System 2015
63 | P a g e
Bakery & Restaurant Management System 2015
3.6 CODING
This is develop by asp.net environment (Active server pages ) that involve with C#
language along with HTML,Java script ,CSS for user interface designed and java script
for client validation
Asp.net is open source of web application and use to develop dynamic web pages
epically suit for wed development and can be embedded into html
Below code is commonly used to generate next id
public class POSController
{
static SqlConnection connection = new SqlConnection(DConnection.dbConnctionString);
try
{
String query = "SELECT MAX(RIGHT(order_id, 10)) + 1 AS Expr1 FROM
tblPOS_order";
SqlCommand c = new SqlCommand(query, connection);
rdr = c.ExecuteReader();
if (rdr.Read())
{
if (rdr["Expr1"].ToString().Equals(""))
{
nextId = "OR-0000000001";
}
else
{
nextId = rdr["Expr1"].ToString();
nextId = "OR-" + nextId.PadLeft(10, '0');
}
}
else
{
nextId = "OR-0000000001";
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
rdr.Close();
connection.Close();
return nextId;
64 | P a g e
Bakery & Restaurant Management System 2015
Below javascript code use to validate the fields in each page
<script>
function vall() {
$(document).ready(function () {
$('#Button1').click(function () {
var Name, pass, gender, conpass, EmailId, emailExp;
Name = $("#txtLocName").val();
gender = $("#txtDesc").val();
pass = $("#txtAddress").val();
conpass = $("#txtContact").val();
// EmailId = $("#txtmail").val();
// emailExp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-
])+\.)+([com\co\.\in])+$/;
if (Name == '' && gender == 0 && pass == '' && conpass == '')
return false;
}
if (EmailId == '') {
alert("Email Id Is Required");
return false;
}
if (EmailId != '') {
if (!EmailId.match(emailExp)) {
alert("Invalid Email Id");
return false;
}
}
return true;
})
});
}
</script>
65 | P a g e
Bakery & Restaurant Management System 2015
CHAPTER 04 IMPLEMENTATION
4.1 INTRODUCTION
This is used in converting the system design to executable program. The logical design converts
into physical design using developing tools. This chapter shows how to handle the physical
system and configure the system to fulfill the requirements.
66 | P a g e
Bakery & Restaurant Management System 2015
This system is centralize and the users log the system via the using internet. This
network protected by the firewall and external users can identify the can view the
system.
Serve
r
Clients
67 | P a g e
Bakery & Restaurant Management System 2015
Controller
Model
View
68 | P a g e
Bakery & Restaurant Management System 2015
CHAPTER 05 TESTING
5.1 INTRODUCTION
Software testing and hardware testing gain to process of validation and verification system.
Testing need to confirm that the system functions are working without any error, misuse
causes. This is mainly focus in customer satisfaction about the system and it helps to identify
the correctness, completeness and quality of the software
I. Unit Testing -:
Unit testing can be done by smallest unit test and get the output if the proper answer is
coming out .unit testing can be done in back box testing and white box testing.
Back box testing -: this is used in checking the system without checking internal
function process.
White Box testing -: this is used in checking internal functions and get the
expected result is coming out
2. Integration Testing -:
Integrate the small units and check the function is working properly. The purpose of this
is to identify the issues with integration.
3. System Testing :-
After integrating the part of the system and whole system test use to confirm that the functions
are working properly in the real environment .this uses to identify the errors in real
environment.
69 | P a g e
Bakery & Restaurant Management System 2015
5. Module testing :-
Module testing called a dynamic testing .this is use when execution of the software
units. Checking the system module vise
70 | P a g e
Bakery & Restaurant Management System 2015
name
password
Enter the valid Redirect to admin Page with session
user name and
password
2 Logout from Click the log Redirect to the main customer form using close the session
the system out link from
user profile
3 Access the Enter the URL Redirect to the main customer form
Admin Page of a page
without login
Category & Location Module
4 Open the Check whether The category code will be generate
Category Form the generate
the codes
6 Add a Category Checking each Show to error warning message to each field.
fields are filled
or validate
71 | P a g e
Bakery & Restaurant Management System 2015
Field.
Test whether show the successful message
the enter
details are
correct
Test whether Show the error
the detail are message
not added
Item Master - Bakery Module
9 Open the Select the The Unique Item Code will be generate
Bakery Item bakery
Master Form location and
category code
10 Add Items Basic Check whether show the mandatory fields to fill it
Details To the particular
Particular fields are filled
Location
72 | P a g e
Bakery & Restaurant Management System 2015
particular
items
Click the If deleted item the message is show
delete button
If not
13 Show the Select the The Items in related to location Code will display
current Item Location Code
Details
Select the The Batcher in related to Item name and location will be
Item Name display
73 | P a g e
Bakery & Restaurant Management System 2015
Select the The itme details related to batch Code,item name and
Batch Code loccation will be display in particular fields
14 Add a price Click save Choose the Change Qty radio button or New Qty Radio
change button Button
Check whether If filled proceed the process and show the success message .
the details are
filled
15 Open the open Check Generate the new stock id in related field .
stocks form generate the
stock id
View the Check whether The particular Item details will be show in related fields.
particular Item selecting
location code,
Item name
and Batch
Code
16 Add Open Stock Check whether
mandatory
fields and
filled or not
74 | P a g e
Bakery & Restaurant Management System 2015
Click Add If fill ,then process the proceedure and show the success
button message
Manufactureing Module
75 | P a g e
Bakery & Restaurant Management System 2015
batch
20 Add Items To Check the type Show the error message if field is not filled or wrong format
particular quantity is
manufacture filled If added data show success message
Items
21 Go to the Item View the item manufacture Finalize Form
manufacture
finalize form
22 Get particular Selecting the particular category types will be display
manufacture location
details
Select the Particular manufacture will be display under the location and
category category
Select the View the manufacture details under the grid .
manufacture
23 Finalize the Click the If added data show the success message
manufacture manufact
button If not show the error message
76 | P a g e
Bakery & Restaurant Management System 2015
77 | P a g e
Bakery & Restaurant Management System 2015
32 Click the finalize Checking Particular manufacture will be display under the location and
button to location is category
finalize the exist
manufacture Checking View the manufacture details under the grid
whether
manufacture is
Exist
Selecting the particular category types will be display
location
Checking Particular manufacture will be display under the location and
category is category
exist
Checking the transfer manufacture details will show in the gird .
whether
manufacture is
Exist
If transaction is transfer
78 | P a g e
Bakery & Restaurant Management System 2015
Transport Module
33 Go the Check Show the next vehicle code
vehicle whether
details Form generate
vehicle code
34 Click submit Check
button whether
fields are
filled
Supplier Module
35 Go to the Check whether View the form and generate the next supplier code
supplier details Generate the
Form supplier code
36 Click submit Check whether
button fields are filled
79 | P a g e
Bakery & Restaurant Management System 2015
Delete supplier Check whether Delete the supplier from the system .
details supplier
details show in
grid
Purchase Module
37 Go to the View the purchsae order form and generate the next
purchase order purchase no
38 Add Purchase Check whether show the message
Button location and
supplier is
selected
80 | P a g e
Bakery & Restaurant Management System 2015
form
43 Go the GRN Show the form and generate next next GRN Code
Details Form
44 Add Return Check whether Show the locations in the field .
Purchases location is
selected
Check whether Show the purchase order id in particular location
the purchase View the purchase item in the grid
order is exists Show the grand total of items
Check Show the error in particular fields .
mandatory
fields are If added show the success message
exists
If not added show the error message
81 | P a g e
Bakery & Restaurant Management System 2015
48 Go to the point View the form and generate the next order id
of sale form
49 Reserve the Check Select the location and Select the customer
order existence of
location and If added show the success message as Resever the Order
customer
If not added show the error message
50 add
Manufacture
Items to Order
Check whether Select the restaurent and particular order id will be display
restaurant is
Exists
Check whether Selecting the location particular items will be display in the
items is exists
feild
Check whether Selecting the items, the particular batches will be display the
batch is exists
field and selecting batch the particular items details will be
show the other fields.
Check whether 1.Check the type qantity with current quantity
type the 2.check the validation of the field.
quantity
52 Click the finalize Check whether 1.show the warning message under the fields.
button the validation 2. check the null values and show
is done
Check whether 1.select the at least one radio button regarding about
payment payments .
process is
selected
If added show the success message
82 | P a g e
Bakery & Restaurant Management System 2015
83 | P a g e
Bakery & Restaurant Management System 2015
68 Go to the add View the Add User Form And generate the next User ID
User Form
69 Click the submit Check whether Show the warning messages when the mandatory fields are
button fields are fill not filled .
If added show successful message
84 | P a g e
Bakery & Restaurant Management System 2015
77 Click edit link Check whether The particular gird fields will be enable and update
select the grid
column
78 Click delete link The particular grid field will be delete
85 | P a g e
Bakery & Restaurant Management System 2015
Usability Testing :-
This is use to testing via using user interfaces .test the application user interfaces user friendly
or not, there is five components should be include to this testing
Learnability - how the use can interact with the system.
Efficiency - how fast user can accomplish the task
Memorability how the function is going to work again
Error how many error user can find.
Satisfaction - how much user like the system.
Maintainability Testing :-
This is use to how easy to change the application or product
Load testing :-
This is the behavior of the application .this is helps to how many users can use the
system in concurrently.
Stress Testing :-
this is use to ensure software does not crash with some reasons .concurrency pass the
data to the system in seconds to check whether the system can be handle or not
Performance testing :-
This is use to how fast the system can be user without any issues.
86 | P a g e
Bakery & Restaurant Management System 2015
5.5 Deployment
This phase is use to implement the system in operation environment.
Staff training
The users of the system need to give a training to how to use, how to view reports and more
about the system, the training should run with step by steps
Client Feedback
After 7 day need get the client feedback of the system and are they satisfaction about the
system, modification and more. If the client is not satisfy well about the system give another
training and involve the system.
87 | P a g e
Bakery & Restaurant Management System 2015
6.1 INTRODUCTION
Bakery and restaurant management system is centralized system which provides wide range of
solutions to the customers and allow users to connect the system. The main site provides new
updates of particular restaurant details to the customers and system consists three parts
Bakery, Restaurant and customer view part . Every day manufactured items transfer from
bakery to particular restaurants. Stock handling, purchases items and more functions handle by
this system.
Learned about how to manage the project and got the idea about how to handle the scope.
During the scope of the project learn how to manage scope of the project and what things
that come to the project are and what the useless
88 | P a g e
Bakery & Restaurant Management System 2015
Understood about the testing strategies and got the experience about how to test the
current system.
Choosing the development language c#,asp.net reduce the complexity than other language
Gained knowledge about how to design the form using frame works.
Managed to handle the MSSQL database server and their operations.
Learned new design patterns (MVC)
Improving a security aspect to the system
While developing the system gain knowledge about the sql injections, encrypt password
other attacks from the unauthorized person.
Weaknesses -
This is not 100% error free.
Browser compatibility issue.
Some cases difficult to understand.
Design frames work issues.
89 | P a g e
Bakery & Restaurant Management System 2015
CONCLUSION
Sri Lanka is currently developing country and now a days most of people are using
computerized systems to solve the day today problems. The bakery management
system is one of the system to solve the financial problems, efficiency problem
and more.
This system allows to users to manufacture the items, Point of Sales,
transfer items, stock reports and more plus well documented reports while
working with testing period. It gives errors to me and sometime got more time to
solve it and its good experience to me .System provides benefit to the customer
and take feedback from them that they can manage with developing.
90 | P a g e
Bakery & Restaurant Management System 2015
Connect the SQL server using Windows Select the Security Logins New Logins to
Authentication create a new User
Type The Login Name That you want and select the
SQL Server Authentication to define the Password
91 | P a g e
Bakery & Restaurant Management System 2015
And go the server roles form and select every check boxes to define the accessibility of users. And after that disconnect the
database and connect again, then user can use the own Login name and password to access the server
Right Click the Database and click New Define the Database Name as BakeryRestaurant
Database and click ok.
92 | P a g e
Bakery & Restaurant Management System 2015
And select the created database BakeryRestaurant , right click and restore the database from fresh backup
from the device
93 | P a g e
Bakery & Restaurant Management System 2015
VIII. There is two way to configure the Web.config file in the project. The user can change
the user id and password through the visual studio OR Notepad.
Using Notepad
i. Go to the Source File Location, BRMNGTsystem and open the Web.config file
through notepad.
Connection string contain the User Id and Password, these two fields must be fill in users computer
sql server user name and password.
If the user name and password not exists in the users computer sql server, then the connection
string must be like this before run the project.
94 | P a g e
Bakery & Restaurant Management System 2015
Go to the source file location and open double click BRMNGTsystem.sln or Open the
Microsoft Visual Studio 2012 brows the file location.
After opening visual studio go to the server explorerData Connections right click
and go the modify connection to configure the User Name and Password to Current SQl
Server User Name and Password.
95 | P a g e
Bakery & Restaurant Management System 2015
96 | P a g e
Bakery & Restaurant Management System 2015
Go to the control panel Programs programs and Features and click Turn Windows features on or
off link and tick these below.
After the installation IIS, user must copy the BRMNGTsystem (the source file) into this path .this path will
exist when after install the IIS. (C driver interpub wwwroot) copy the source file into this folder
97 | P a g e
Bakery & Restaurant Management System 2015
This is use to add a site to the local host. Click site Default
Web Site Add Application
Alias filed that the user can define any name to host site in
locally and physical path define the source file path (it
should be in wwwroot folder).the following figure show it.
After that adding BakeryMNGT, click that BakeryMNGT go to the direct browsing and enable the fields
that figure show below.
98 | P a g e
Bakery & Restaurant Management System 2015
Finally user can run the selecting BakeryMNGT and click the Browse *.:81 (http) locally in user system.
99 | P a g e
Bakery & Restaurant Management System 2015
100 | P a g e
Bakery & Restaurant Management System 2015
In Advanced Table show all categories and click EDIT link the user can update the detail and
delete link will remove the detail while checking the detail in other tables.
101 | P a g e
Bakery & Restaurant Management System 2015
This is used to add location and need to select the employee whose own of the location and
position field indicate , if the location belongs to bakery and restaurant . All location details will
be shown below. status indicates whether location is activated or not. After clicking submit
button details will be added.
Successful message will be displayed after adding he details.
102 | P a g e
Bakery & Restaurant Management System 2015
103 | P a g e
Bakery & Restaurant Management System 2015
104 | P a g e
Bakery & Restaurant Management System 2015
IV. Price Change Form (Item Master price Changes price Change)
This is used to change an item prices .When changing the item price automatically, create a
new batch. Selecting location code and item name shows the details of exists item and Batch
Quantity filed indicate if user select Change Qty radio button. Current quantity will be updated
to these new prices with new batch ,if select New Qty radio button then create a new batch
(the item having two batches in different prices).
105 | P a g e
Bakery & Restaurant Management System 2015
Selecting location code and item code , the relevant batches will be
displayed .
Stock Control
VI. Open Stocks (Stock Control Bakery Open Stocks)
106 | P a g e
Bakery & Restaurant Management System 2015
This form is use to if the bakery run in manually need to add a current stocks to the system to
continue the process.
VII. Open Stock View (Stock Control Bakery Open Stocks View)
User can view the opening stocks related to location.
3.6.10 Manufacturing
III. Item Manufacture Process
Manufacture process consist three stages, these stage are followings.
4. Item Manufacture (id generation) (Manufacturing Item Manufacture
Process Item Manufact )
User can generate the specific manufacture code regarding the selecting location and particular
category.
107 | P a g e
Bakery & Restaurant Management System 2015
Figure 3.6.9 I shows to generate the manufacture id and after selecting the location, category
and manufacture Name, user can add a particular items regarding the product like a ingredients
using add to list button ,quantity field indicate how many quantity will be add to the
manufacture .
108 | P a g e
Bakery & Restaurant Management System 2015
Users can see the particular location manufactures, included Items detail and the unit cost of
manufacture product. It facilitates to change details to edit details.
109 | P a g e
Bakery & Restaurant Management System 2015
110 | P a g e
Bakery & Restaurant Management System 2015
User can transfer the manufacture products to particular Restaurants
111 | P a g e
Bakery & Restaurant Management System 2015
3.6.11 Transport
I. Vehicle Details (Transport Vehicle Details from )
User can add a vehicle details and all vehicle details will be shown the grid and can delete the
specific vehicle in the grid selecting delete link.
112 | P a g e
Bakery & Restaurant Management System 2015
3.4.11
I. I. Supplier Details (Supplier Supplier Details )
User can add supplier details to the system. All fields are mandatory to fill. System facilitates to
edit and delete the users.
113 | P a g e
Bakery & Restaurant Management System 2015
This form is used to check the quantities of items in particular purchase order no after
receiving supplier goods .user can give discount (if necessary ) .
114 | P a g e
Bakery & Restaurant Management System 2015
This shows order details in particular order id ,there will be , payment type and click one of
this, the releated fields will be visible and if user select CASH radion button the total cash and
balance field will be visible.these fields must be filled to finalize the order .
115 | P a g e
Bakery & Restaurant Management System 2015
After adding the orders, the order details will be shown by selecting particular location and
order id and how the payment happen in particular order.
VI . Update Quantity
This is visible when clicking upper form order id (order details item tab) and user can update
the quantity after adding the order
116 | P a g e
Bakery & Restaurant Management System 2015
Clicking the grid order id, the return form is visible and system facilitate to add the return
manufactures to the system
117 | P a g e
Bakery & Restaurant Management System 2015
User can view the particular location transactions and Current Stock Details in selection date.
118 | P a g e
Bakery & Restaurant Management System 2015
This is use to add new Users to the system and Admin Type indicate the particular user related
to which field.
The grid shows all the user details and admin capable to delete the users.
119 | P a g e
Bakery & Restaurant Management System 2015
Admin can add a modules to the users when accessing the system, the system shows the
particular modules to the user when its logged.
Module details will display when selecting user detail and location. In the grid 1 indicate, which
modules can be access to the particular user and clicking edit button admin can put the 1 as to
another module that means the user can access that module .0 means the user cannot access
the module .
120 | P a g e
Bakery & Restaurant Management System 2015
V. Change Password
The current user can change the profile password giving current password.
3.6.15Employee Details
EACH FIELDS VALIDATE SHOW THE ERROR LIKE THIS .WHEN CLICK SUBMIT BUTTON THE
FIELDS ARE NOT FILLED THESE ERROR WILL BE ACCURE
121 | P a g e
Bakery & Restaurant Management System 2015
122 | P a g e
Bakery & Restaurant Management System 2015
123 | P a g e
Bakery & Restaurant Management System 2015
124 | P a g e
Bakery & Restaurant Management System 2015
125 | P a g e
Bakery & Restaurant Management System 2015
UML DIAGRAMS
126 | P a g e
Bakery & Restaurant Management System 2015
Use Case name Transport And Supplier Module
Description This use case explains how to transport and supplier details to the
system
Actor Administrator
Normal course of events 15. Administrator logs in to the system
16. Go to the Transport vehicle details form from the
home page
17. Generate vehicle id
18. Fill the fields.
19. Add submit button
20. Go to the Supplier Supplier details form from the
home page
21. Generate supplier code
22. Fill the fields
23. Select the state
24. Add Submit button
127 | P a g e
Bakery & Restaurant Management System 2015
viii. Employee Module
128 | P a g e
Bakery & Restaurant Management System 2015
ix. User Controller Module
129 | P a g e
Bakery & Restaurant Management System 2015
8. Go to the user Controller User Module form from the
home page
9. Select user
10. Select the location
11. Select the module
12. Click submit button to add modules to specific user
13.
130 | P a g e
Bakery & Restaurant Management System 2015
Activity Diagrams
131 | P a g e
Bakery & Restaurant Management System 2015
VI. Activity Diagram for Day End Process
132 | P a g e
Bakery & Restaurant Management System 2015
133 | P a g e
Bakery & Restaurant Management System 2015
134 | P a g e
Bakery & Restaurant Management System 2015
135 | P a g e
Bakery & Restaurant Management System 2015
136 | P a g e
Bakery & Restaurant Management System 2015
137 | P a g e
Bakery & Restaurant Management System 2015
138 | P a g e
Bakery & Restaurant Management System 2015
139 | P a g e
Bakery & Restaurant Management System 2015
140 | P a g e
Bakery & Restaurant Management System 2015
141 | P a g e
Bakery & Restaurant Management System 2015
142 | P a g e
Bakery & Restaurant Management System 2015
143 | P a g e
Bakery & Restaurant Management System 2015
144 | P a g e
Bakery & Restaurant Management System 2015
145 | P a g e
Bakery & Restaurant Management System 2015
146 | P a g e
Bakery & Restaurant Management System 2015
147 | P a g e
Bakery & Restaurant Management System 2015
APPENDIX 4 - DATABASE
XI. tblMessage
Add Massages to the Locations.
Sample Data
XII. tblModule
This is show the system modules that allows to users.
XIII. tblOpenStock
Bakery is going to transfer the manual system to computerize
system, the bakery users add current stock to the system
to proceed the process.
XIV. tblPOS_order
148 | P a g e
Bakery & Restaurant Management System 2015
This will show the particular location (Restaurants)
have many order and status field indicate the place
order process in particular customer.
Sample Data
XV. tblPOS_orderdetail
This is shows particular order detail under the order,
the manufacture products who buy from the
restaurants.
Sample Data
149 | P a g e
Bakery & Restaurant Management System 2015
XVI. tblPOS_PaymentDetails
Add customer payment to the system when the order is
proceed
Show Data
XVII. tblPOS_PaymentProcess
add payment process happen between customer and
cashier in restaurants.
Show Data
XVIII. tblPOS_Trans_To_Trans
Add manufacture product from to location another
Show Data
150 | P a g e
Bakery & Restaurant Management System 2015
XIX. tblPOS_Transaction
This shows all transaction happens in restaurants .bakery
send the manufacture to the restaurant and this data will
show here and some others transaction also show here
show data
XX. tblPurchaseOrder
This uses to purchase order from the supplier, total
of the purchase detail will be shown in total field and
status field show the current progress of the
purchase order
151 | P a g e
Bakery & Restaurant Management System 2015
Show data
XXI. tblPurchaseDetails
This shows purchase order details under the purchase
order id.
Sample Data
XXII. tblPurchaseReturn
this shows purchase order detail that already received
and compare the purchase order, current situation
confirm the details .like a GRN (Good Receive Note)
Show Data
152 | P a g e
Bakery & Restaurant Management System 2015
XXIII. tblPurchaseReturnDetails
This show details of GRN details
Sample Data
XXIV. tblSalesDetails_Return
This shows the return manufacture products
under the order id, and return id, its refer the
tblSales_Return table order_no.
XXV. tblSite_Gallery
Add images to each locations .image_path indicates
the uploading file location.
show data
153 | P a g e
Bakery & Restaurant Management System 2015
XXVI. tblSite_messages
This is shows the customer can make an inquiry online
and these detail will be shown here.
Sample Data
XXVII. tblSupplier
Add Supplier Details To the Database.
Show Data
XXVIII. tblSupplierTransaction
This shows the transactions between supplier and the
bakery
154 | P a g e
Bakery & Restaurant Management System 2015
XXIX. tblTransport
This show the vehicle detail regarding to the transaction
Show Data
XXX. tblTransportTransaction
This i shows the details of transaction between location to
location using by vehicle.
Show Data
XXXI. tblUnitMeasure
This i shows measurement of items, manufacture
products and more.
Show Data
155 | P a g e
Bakery & Restaurant Management System 2015
XXXII. tblUser
Add Users To The System.
show data
XXXIII. tblUserModule
Add modules To Users in the system, if the filed having 1
means these fields are available to the user to access the
system.
Show data
156 | P a g e
Bakery & Restaurant Management System 2015
APPENDIX 5 - CODE
public static int UpdateOpenStockDetails(string locationCode, string openCode, string
itemCode, int batchCode,float typeQty,float totalAmount)
{
int added = 0;
connection.Open();
try
{
string sql = "UPDATE tblBakeryTransaction SET item_in="+typeQty+" WHERE
refer_code='"+openCode+"' AND item_code='"+itemCode+"' AND batch_code="+batchCode+" AND
location_code='"+locationCode+"'";
SqlCommand command = new SqlCommand(sql, connection);
int update1 = command.ExecuteNonQuery();
if (update1 > 0)
{
string sql2 = "UPDATE tblSupplierTransaction SET item_in=" + typeQty
+ ",amount="+totalAmount+" WHERE refer_code='" + openCode + "' AND item_code='" +
itemCode + "' AND batch_code=" + batchCode + " AND location_code='" + locationCode +
"'";
SqlCommand command2 = new SqlCommand(sql2, connection);
int update2 = command2.ExecuteNonQuery();
if (update2 > 0)
{
string sql3 = "UPDATE tblOpenStock SET item_in=" + typeQty + "
WHERE open_stock_code='" + openCode + "' AND item_code='" + itemCode + "' AND
batch_code=" + batchCode + " AND location_code='" + locationCode + "'";
SqlCommand command3 = new SqlCommand(sql3, connection);
int update3 = command3.ExecuteNonQuery();
if (update3 > 0)
{
added = 1;
}
else
{
added = 0;
}
}
}
}
catch (Exception ex)
{
ex.ToString();
}
connection.Close();
return added;
157 | P a g e
Bakery & Restaurant Management System 2015
public static int DeleteOpenStockDetails(string locationCode, string openCode, string
itemCode, int batchCode)
{
int added = 0;
connection.Open();
try
{
string sql = "DELETE FROM tblBakeryTransaction WHERE refer_code='" +
openCode + "' AND item_code='" + itemCode + "' AND batch_code=" + batchCode + " AND
location_code='" + locationCode + "'";
SqlCommand command = new SqlCommand(sql, connection);
int update1 = command.ExecuteNonQuery();
if (update1 > 0)
{
if (update2 > 0)
{
string sql3 = "DELETE FROM tblOpenStock WHERE
open_stock_code='" + openCode + "' AND item_code='" + itemCode + "' AND batch_code=" +
batchCode + " AND location_code='" + locationCode + "'";
SqlCommand command3 = new SqlCommand(sql3, connection);
int update3 = command3.ExecuteNonQuery();
if (update3 > 0)
{
added = 1;
}
else
{
added = 0;
}
}
}
}
catch (Exception ex)
{
ex.ToString();
}
connection.Close();
return added;
158 | P a g e
Bakery & Restaurant Management System 2015
if (location.Equals("none"))
{
sql="SELECT SUM(item_in - item_out) as amt FROM
tblPOS_Transaction WHERE trans_date < '"+DateTime.Today.ToShortDateString()+"'";
}
else
{
sql = "SELECT SUM(item_in - item_out)as amt FROM
tblPOS_Transaction WHERE (location_code = '" + location + "') AND trans_date <'" +
DateTime.Today.ToShortDateString() + "'";
}
if (dat.Read())
{
if (float.Parse(dat["amt"].ToString())==0)
{
state = "DONE";
}
else
{
state = "NOT_DONE";
}
}
else
{
state = "NOT_DONE";
}
dat.Close();
}
catch (Exception ex)
{
ex.ToString();
}
finally
{
connection.Close();
}
return state;
}
159 | P a g e
Bakery & Restaurant Management System 2015
}
else
{
p.ItemIn = 0;
}
dat.Close();
}
catch (Exception ex)
{
ex.ToString();
}
finally
{
connection.Close();
}
return p;
}
160 | P a g e
Bakery & Restaurant Management System 2015
public static int TransferToTempTableToOriginalTableOrderDetails(Order o)
{
int isAdded = 0;
int sequenceId = ManufactureTransferToLocations.getNextPOSSequenceId(o.LocationCode,
DateTime.Now.ToString());
POsTranasaction p = new POsTranasaction();
try
{
connection.Open();
SqlCommand seletCommand = new SqlCommand("SELECT * FROM tblPOS_orderdetail_temp WHERE
order_id='" + o.OrderId + "'", connection);
SqlDataReader dar = seletCommand.ExecuteReader();
while (dar.Read())
{
////////////POS TRANSACTION///
string locationcodeTo = o.LocationCode;
string refer_code = o.OrderId;
string trans_type = "ORDER";
string remarks = "ORDERS";
string transDate = DateTime.Now.ToString();
string by_user = o.ByUser;
string by_date = DateTime.Now.ToString();
/// END POS TRANSACTION ////////////////////////////////
///// ORDER DETAILS//////////////////////////////////////
string orderId=dar["order_id"].ToString();
string manufactCode=dar["manufact_code"].ToString();
int batchCode=int.Parse(dar["batch_code"].ToString());
float quantity=float.Parse(dar["quantity"].ToString());
float unit_price=float.Parse(dar["unit_price"].ToString());
float total=float.Parse(dar["total"].ToString());
///// END ORDER DETAILS //////////////////////////////////////
insertOrder+="('"+orderId+"','"+manufactCode+"',"+batchCode+","+quantity+","+unit_price+","+total+"";
insertOrder+=");INSERT INTO tblPOS_orderdetail
(order_id,manufact_code,batch_code,quantity,unit_price,total) VALUES";
dar.Close();
if (addedOrderDetail > 0)
{
SqlCommand myCommandUpdate = new SqlCommand("UPDATE tblPOS_order SET
status='SUCCESS' WHERE order_id='" + o.OrderId + "'", connection);
int update = myCommandUpdate.ExecuteNonQuery();
if (update > 0)
{
if (addedPOs > 0)
{
isAdded = 1;
}
else
{
isAdded = 0;
}
}
else
{
isAdded = -1;
}
}
else
{
isAdded = -2;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
finally
{
connection.Close();
}
return isAdded;
}
162 | P a g e
Bakery & Restaurant Management System 2015
public static float getCURRENT_QTY_inBakerySIDE(string locationCode, string itemCode,
int batchCode)
{
SqlDataReader datar = null;
float curQty = 0;
Item l = new Item();
// SqlConnection connection = new
SqlConnection(DConnection.dbConnctionString);
connection.Open();
itemCode = itemCode.Trim();
try
{
String query = "SELECT SUM(item_in - item_out) AS tqty FROM
tblBakeryTransaction WHERE (location_code = '"+locationCode+"') AND (item_code =
'"+itemCode+"') AND (batch_code = "+batchCode+")";
SqlCommand command = new SqlCommand(query, connection);
datar = command.ExecuteReader();
if (datar.Read())
{
curQty = float.Parse(datar["tqty"].ToString());
}
else
{
curQty = 1;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
finally
{
datar.Close();
connection.Close();
}
return curQty;
163 | P a g e
Bakery & Restaurant Management System 2015
164 | P a g e