Final Black Book

77
PROJECT REPORT ON ONLINE FOOD ORDERING PORTAL SUBMITTED TO UNIVERSITY OF MUMBAI SUBMITTED BY ABNISH S. SINGH GUIDED BY PROF. BINITA THAKKAR T.Y. B. Sc. (INFORMATION TECHNOLOGY) YEAR 2013-2014 LATE SHRI VISHNU VAMAN THAKUR CHARITABLE TRUST’S BHASKAR WAMAN THAKUR COLLEGE OF SCIENCE YASHWANT KESHAV COLLEGE OF COMMERCE VIDYADAYANAND PATIL COLLEGE OF ARTS VIRAR (W), TAL. VASAI, DIST. THANE 40103

description

A complete black book for hotel mgmt

Transcript of Final Black Book

Page 1: Final Black Book

PROJECT REPORT ON

ONLINE FOOD ORDERING PORTAL

SUBMITTED TO

UNIVERSITY OF MUMBAI

SUBMITTED BY

ABNISH S SINGH

GUIDED BY

PROF BINITA THAKKAR

TY B Sc (INFORMATION TECHNOLOGY)

YEAR 2013-2014

LATE SHRI VISHNU VAMAN THAKUR CHARITABLE

TRUSTrsquoS

BHASKAR WAMAN THAKUR COLLEGE OF SCIENCE

YASHWANT KESHAV COLLEGE OF COMMERCE

VIDYADAYANAND PATIL COLLEGE OF ARTS

VIRAR (W) TAL VASAI DIST THANE 40103

Late Shri Vishnu Waman Thakur Charitable Trustrsquos Bhaskar Waman Thakur College of Science

Yashwant Keshav Patil College of Commerce

Vidya Dayanand Patil College of Arts

Virar (W)

CERTIFICATE

This is to certify that project done

on____________________________________by

MrMs _____________________ Seat no______

in partial fulfillment of BSc IT degree

(SEM VI) examination had not been submitted

for any other examination and does not form

any other course undergone by the guide

_____________ _____________ ______________

Project Guide Examiner Head of Dept

Date Date Date

COLLEGE SEAL

Acknowledgment

This is the project I started as a part of my course curriculum and

it gives me great pleasure to present the report of this project work

conducted towards the fulfillment of the ldquoOnline Food Ordering Portalrdquo project assigned to me by Mr CS Sethi GM of Neelam-e-Punjab

As per the guidelines laid down by Mumbai University I take this

opportunity to thank all those who have made the effort in the success of

this project

I am also grateful to our respected Prof Mrs Sampada Deshmukh

head of BSc(IT) department for the corporation and spirit he laid me I

would like to thank all the professors and my colleagues who helped me

to complete this project

I give my special thanks to Prof Binita Thakkar who for me had

been source of motivation and encouragement to me Also at the same

time I thank her for the invaluable guidance she provided me in the

completion of my project work within a given stipulated time

I give my special thanks to Mr Monty (Admin of Restaurant) and

his employees for giving me very precious information and there valuable

time to complete this project

Finally it gives me a great pleasure in expressing my sincere and

heartfelt thanks to all my friends and my family members who have

assisted me in this project by various means

Abnish S Singh

Index

SrNo Topic Page No

1 Introduction 1

11 Organizational Profile 2

12 Introduction To Project 3

2 System Study And Analysis 4

21 Existing System 5

22 Limitations Of Existing System 6

23 Proposed System 7

24 Benefits Of Proposed System 8

3 Planning Phase 9

31 Feasibility Study 10

32 Milestones 12

33 Fact Finding Techniques 13

4 Front-Back end 15

41 Need For ASPNET and SQL Server-2008 16

42 Proposed system will include 18

5 System Design and Development 19

51 Gantt Chart 20

52 ERD 21

53 Event table 22

6 UML Design 23

61 Use case diagram 24

62 Class Diagram 25

63 Sequence Diagram 26

64 State Chart Diagram 27

65 Activity Diagram 28

66 Database Design 29

67 Menu Tree 31

68 CRUD Table 32

7 System Coding Convention 33

8 Screen Layouts Coding 36

9 Test Cases 61

10 Reports Screen LayoutsSource Code 64

11 Future Enhancement 68

12 Conclusion 70

13 Bibliography 72

1 | P a g e

INTRODUCTION

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 2: Final Black Book

Late Shri Vishnu Waman Thakur Charitable Trustrsquos Bhaskar Waman Thakur College of Science

Yashwant Keshav Patil College of Commerce

Vidya Dayanand Patil College of Arts

Virar (W)

CERTIFICATE

This is to certify that project done

on____________________________________by

MrMs _____________________ Seat no______

in partial fulfillment of BSc IT degree

(SEM VI) examination had not been submitted

for any other examination and does not form

any other course undergone by the guide

_____________ _____________ ______________

Project Guide Examiner Head of Dept

Date Date Date

COLLEGE SEAL

Acknowledgment

This is the project I started as a part of my course curriculum and

it gives me great pleasure to present the report of this project work

conducted towards the fulfillment of the ldquoOnline Food Ordering Portalrdquo project assigned to me by Mr CS Sethi GM of Neelam-e-Punjab

As per the guidelines laid down by Mumbai University I take this

opportunity to thank all those who have made the effort in the success of

this project

I am also grateful to our respected Prof Mrs Sampada Deshmukh

head of BSc(IT) department for the corporation and spirit he laid me I

would like to thank all the professors and my colleagues who helped me

to complete this project

I give my special thanks to Prof Binita Thakkar who for me had

been source of motivation and encouragement to me Also at the same

time I thank her for the invaluable guidance she provided me in the

completion of my project work within a given stipulated time

I give my special thanks to Mr Monty (Admin of Restaurant) and

his employees for giving me very precious information and there valuable

time to complete this project

Finally it gives me a great pleasure in expressing my sincere and

heartfelt thanks to all my friends and my family members who have

assisted me in this project by various means

Abnish S Singh

Index

SrNo Topic Page No

1 Introduction 1

11 Organizational Profile 2

12 Introduction To Project 3

2 System Study And Analysis 4

21 Existing System 5

22 Limitations Of Existing System 6

23 Proposed System 7

24 Benefits Of Proposed System 8

3 Planning Phase 9

31 Feasibility Study 10

32 Milestones 12

33 Fact Finding Techniques 13

4 Front-Back end 15

41 Need For ASPNET and SQL Server-2008 16

42 Proposed system will include 18

5 System Design and Development 19

51 Gantt Chart 20

52 ERD 21

53 Event table 22

6 UML Design 23

61 Use case diagram 24

62 Class Diagram 25

63 Sequence Diagram 26

64 State Chart Diagram 27

65 Activity Diagram 28

66 Database Design 29

67 Menu Tree 31

68 CRUD Table 32

7 System Coding Convention 33

8 Screen Layouts Coding 36

9 Test Cases 61

10 Reports Screen LayoutsSource Code 64

11 Future Enhancement 68

12 Conclusion 70

13 Bibliography 72

1 | P a g e

INTRODUCTION

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 3: Final Black Book

Acknowledgment

This is the project I started as a part of my course curriculum and

it gives me great pleasure to present the report of this project work

conducted towards the fulfillment of the ldquoOnline Food Ordering Portalrdquo project assigned to me by Mr CS Sethi GM of Neelam-e-Punjab

As per the guidelines laid down by Mumbai University I take this

opportunity to thank all those who have made the effort in the success of

this project

I am also grateful to our respected Prof Mrs Sampada Deshmukh

head of BSc(IT) department for the corporation and spirit he laid me I

would like to thank all the professors and my colleagues who helped me

to complete this project

I give my special thanks to Prof Binita Thakkar who for me had

been source of motivation and encouragement to me Also at the same

time I thank her for the invaluable guidance she provided me in the

completion of my project work within a given stipulated time

I give my special thanks to Mr Monty (Admin of Restaurant) and

his employees for giving me very precious information and there valuable

time to complete this project

Finally it gives me a great pleasure in expressing my sincere and

heartfelt thanks to all my friends and my family members who have

assisted me in this project by various means

Abnish S Singh

Index

SrNo Topic Page No

1 Introduction 1

11 Organizational Profile 2

12 Introduction To Project 3

2 System Study And Analysis 4

21 Existing System 5

22 Limitations Of Existing System 6

23 Proposed System 7

24 Benefits Of Proposed System 8

3 Planning Phase 9

31 Feasibility Study 10

32 Milestones 12

33 Fact Finding Techniques 13

4 Front-Back end 15

41 Need For ASPNET and SQL Server-2008 16

42 Proposed system will include 18

5 System Design and Development 19

51 Gantt Chart 20

52 ERD 21

53 Event table 22

6 UML Design 23

61 Use case diagram 24

62 Class Diagram 25

63 Sequence Diagram 26

64 State Chart Diagram 27

65 Activity Diagram 28

66 Database Design 29

67 Menu Tree 31

68 CRUD Table 32

7 System Coding Convention 33

8 Screen Layouts Coding 36

9 Test Cases 61

10 Reports Screen LayoutsSource Code 64

11 Future Enhancement 68

12 Conclusion 70

13 Bibliography 72

1 | P a g e

INTRODUCTION

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 4: Final Black Book

Index

SrNo Topic Page No

1 Introduction 1

11 Organizational Profile 2

12 Introduction To Project 3

2 System Study And Analysis 4

21 Existing System 5

22 Limitations Of Existing System 6

23 Proposed System 7

24 Benefits Of Proposed System 8

3 Planning Phase 9

31 Feasibility Study 10

32 Milestones 12

33 Fact Finding Techniques 13

4 Front-Back end 15

41 Need For ASPNET and SQL Server-2008 16

42 Proposed system will include 18

5 System Design and Development 19

51 Gantt Chart 20

52 ERD 21

53 Event table 22

6 UML Design 23

61 Use case diagram 24

62 Class Diagram 25

63 Sequence Diagram 26

64 State Chart Diagram 27

65 Activity Diagram 28

66 Database Design 29

67 Menu Tree 31

68 CRUD Table 32

7 System Coding Convention 33

8 Screen Layouts Coding 36

9 Test Cases 61

10 Reports Screen LayoutsSource Code 64

11 Future Enhancement 68

12 Conclusion 70

13 Bibliography 72

1 | P a g e

INTRODUCTION

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 5: Final Black Book

1 | P a g e

INTRODUCTION

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 6: Final Black Book

2 | P a g e

Organization Profile

Neelam-e-Punjab the tradition of excellence and making each a meal a

gourmetrsquos delight it all began with a dream of Shri Raghubir Singh Chabra who

was founder of Neelam-e-Punjab group of restaurants started his journey since

1976 to create a group of restaurants with great style ambience and grandeur

It has always been our prime concern to retain the authenticity of various

cuisines using selective herbs and spices not only for the aroma but also for their

digestive and nutritional values as well

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 7: Final Black Book

3 | P a g e

Introduction to project

Online Food Ordering Portal is web application made for one of the

restaurant in Vasai named ldquoNeelam-e-Punjabrdquo

This application contains a web page for the customer By this webpage

customer can place the order online

This system mainly consists of transaction the system to open selection is

given on the login screen itself Login name and password is verified in the

selected system and then user allowed to use the system

Transaction IncludedD

The transaction included here is Add New User Order details Manage

Menu Search User Invoice Details and Customer Details

It provides integration of all above processes along with the automatic

updates as per the transaction

Reports are generated for each of the above processes to get the output

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 8: Final Black Book

4 | P a g e

System Study

amp

Analysis

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 9: Final Black Book

5 | P a g e

Existing System

The current System of a restaurant is very ancient and need to be replaced as

restaurant business is expanding One of the biggest disadvantages of the current

system is that lacking of the online ordering system each time a customer need to

call the restaurant and then he can booked his order

1 Current System is working manually

2 The customers are area centric

3 Information regarding Customer name Addresses amp their requirements are

needed to be entered into a registered

All the existing system is traditional and lack of use of technology therefore the

process is very time consuming and lengthy as paper work is there This was

creating a problem in maintaining data records stored at the end like profit and

loss a total expansion etc

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 10: Final Black Book

6 | P a g e

Limitation of Existing System

1 Maintain multiple registers become difficult

2 Business is not on the web which was biggest Disadvantages

3 To keep track of customerrsquos information is much more difficult

4 It is difficult to find a particular customerrsquos order from the whole

Stock

5 It is very difficult to know how many orders are given by a particular

customer

6 Not good communication between the different branches so there is

lacking of coordination between them

7 There exists a communication gap between staff customer agent and

management

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 11: Final Black Book

7 | P a g e

Proposed System

Statement of Need

Errors caused due to manual processing of data must be reduced

Security features like username ndash Password authentication must be enforced

to prevent unauthorized access

Logical and technical errors must be found

Facility to easily search a specific record must be enforced

The system must be user-friendly

A system should provide the interactive interface to the customer and the

interface is more information about the collection to the Customer

Help in reducing the file work

Statement of System Capabilities

Security features username and password authentication is implemented

An appropriate database tables are maintained to record and store validated

information

Facility to search a particular record is implemented

Report generation is implemented

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 12: Final Black Book

8 | P a g e

Benefits of Proposed System

System Benefits

This system has been developed to be simple and user-friendly Hence even a non-

technical user can use the system effectively and without any difficulty Other

benefits are as follows

The system is a GUI and hence user-friendly

It is upgradeable Hence further enhancements to the system are possible

The system is capable of generating the necessary reports

The system maintains speed and accuracy

It solves all problems encountered in the previous manually handled system

It takes care of database security by restricting unauthorized access to the system

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 13: Final Black Book

9 | P a g e

Planning Phase

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 14: Final Black Book

10 | P a g e

Feasibility Study

The feasibility study is undertaken to determine the possibility of either improving

the present system or developing a completely new system it help to obtain an

overview of the problem and get an idea whether a feasible solution exist This project has been tested in the following areas of feasibility

Operational Feasibility

Technical Feasibility

Economic Feasibility

1 Operational Feasibility

The current system is manual thus processing large amount of data become a

cumbersome activity Reports that are generated are difficult to prepare

manually and are also error prone Since the user finds difficulty operating a

manual system they have personally come forward and given their ideas

regarding what sort of computer system are expected The organization has

evaluated organizational and cultural issues to identify potential risk for the new

system And has come to conclusion that the new computerized system presents

no risk they might prevent effective use of the new system

The system is designed in such a way that it is easy to operate

The system does not involve any complex operations

It handles only simple data oriented functions

It is aimed at giving an easy way to generate reports

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 15: Final Black Book

11 | P a g e

2 Technical Feasibility

Generally new system brings new technology into an organization The

proposed system requires technology and equipment which can be obtained

The operating system has the technical capacity to hold the data required to use

the proposed system Moreover the maintenance system has a lot of scope of

being expanded and developed to generate even more valuable and better

reports The present equipment technology assures technical guarantee of

accuracy reliability and ease of access

Also software used to build the system is simple enough in their usage

and functionality

To operate this system only a web browser is needed The system is

platform independent and browser independent and supports all kinds of

web browsers like Internet Explorer Mozilla Firefox etc

The system can be expanded if so decided

This system is technically more secure

3 Economic Feasibility

The Economic Feasibility of the system is mainly concerned with its financial

aspects It determines whether the investment that goes into the implementation of

the project is recoverable or not The Cost Benefit Analysis is a commonly used

method in evaluating the effectiveness of the system

The cost of developing this system currently includes the minimum software

cost to develop and run the system

The most of the software used in the system development is freely

available on the Web

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 16: Final Black Book

12 | P a g e

Milestones

Sr

No Phase

Duration

(Days) Start date

Finish

date

1 Planning phase 25 161213 100113

11 Defining Problem 9 161213 241213

12 Confirm Project

feasibility 8 251214 011214

13 Project schedule 5 020114 060114

14 Staffing project 1 070114 070114

15 Launching project 2 080114 100114

2 Analysis phase 30 100114 020214

21 Gathering information 10 100114 200114

22 Defining system

requirements 5 210114 250114

23 Prioritize requirements 4 260114 290114

24 Generate and evaluate

alternatives 2 300114 310114

25 Review the

documentations 2 10214 020214

3 Design phase 35 030214 180314

31 Design user interface 15 030213 180214

32 Design application

architecture 10 190214 010314

33 Design and integrate

database 5 020314 070314

34 Design and integrate

system control 5 080314 130314

4 Implementation phase 24 140313 160411

41 Construct the software

components 10 140314 240314

42 Verify and test the

components 10 250314 040414

43 Training and

documentation 3 040414 070414

44 Installing software 1 080412 090413

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 17: Final Black Book

13 | P a g e

Fact Finding Techniques

Information plays a very important role in any organization Acquiring valuable

information is essential for developing a new system in an organization There are

many ways of gathering information But the following things need to be kept in

mind while gathering information

No system details are left out

Problems are correctly identified

Repetitive work is avoided

Following are the fact findings techniques

Observation

As before developing anything we need to understand the entire system and

for this observation plays important role

This technique helped in understanding the actual process of Automobiles

system

While observing the day to day working of the Automobiles system we

came to know about a lot of things

It also helps to find out various procedures to be followed how the records

are maintained how the follow-ups are taken care of etc

Record Searching

This method is used to study all the records which are being maintained

manually

A proper study of all these records is being done to uncover all the details

regarding the overall working of the system Registers are maintained by the

sales people

Interviews

It is one of the best act which gives qualitative information about the system

Interviewing the people of the organization helped us to find out their

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 18: Final Black Book

14 | P a g e

difficulties and requirements which helped us a lot while developing the

system

With the help of this method we can evaluate the needs of the employees

and the company

People from different department of the company were interviewed for

collecting information from them

Questionnaires

It is one of the best techniques to find out the requirements to be added and

the existing working of the system by providing the questionnaires to all

levels of the organization so that the employees can provide quality answers

to the questions as they get a lot of time to go through the questionnaires

properly and answer them

To collect and analyze required information following methods were

adopted

Document Searching

Various documents were handled during the course of time their usage and

formats were studied

The relation with the system information given was analyzed

While studying the manual system various documents like Masters Form

service form etc have been studied to analyze recording in formation in

different logs Document study also helped in determining inputs and

outputs of the system

Visits

Many visits have been made to the office for acquiring various

information as well as documents required for identifying the

inputs and outputs of the system

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 19: Final Black Book

15 | P a g e

Frontend

amp

Backend

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 20: Final Black Book

16 | P a g e

NEED FOR ASPNET AND MY SQL SERVER

ASPNET is a server-side Web application framework designed for Web

development to produce dynamic Web pages

Features of ASPNET

Excellent tooling IDE CI etc Vast array of 3rd party libraries Huge amount of documentation available Large pool of developers available Platform ubiquitous Excellent performance Excellent specification

The Advantages of ASPNET are as follows

ASPNET drastically reduces the amount of code required to build large applications Java is platform-independent and flexible in nature

With built-in Windows authentication and per-application configuration your applications are safe and secured

Being language-independent it allows you to choose the language that best applies to your application or partition your application across many languages

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 21: Final Black Book

17 | P a g e

A SQL Server database is the most popular type of relational database on the web today

This is partly because it is completely free but also very powerful

What is a SQL Server database capable of

SQL Server database is capable of storing any type of that you want

You will use SQL statements to accomplish all of this

In more technical terms SQL Server has the following features

A broad subset of ANSI SQL 99 as well as extensions Cross-platform support Stored procedures Triggers Cursors Updatable Views

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 22: Final Black Book

18 | P a g e

Proposed System will include

Frontend ASPNET with c

Backend SQL Server-2008

HARDWARE REQUIREMENT

A 80 GB Hard disk

B 256 MB RAM

C Operating System

i Windows 2000

ii Windows XP

iii Windows Vista

iv Windows 7

SOFTWARE REQUIREMENT

A) Visual Studio-2010

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 23: Final Black Book

19 | P a g e

System Design

amp

Development

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 24: Final Black Book

20 | P a g e

Gantt Chart

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 25: Final Black Book

21 | P a g e

Entity Relationship Diagram

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 26: Final Black Book

22 | P a g e

Event Table

Sr

No

Event Trigger Source Use case Response Destination

1

Search Menu

Menu is

searching

Customer

Lookup for the menu

Menu Details

Admin

2

Registration

New

Registration

Customer

Respond to the

customer signup

Signup Form

Admin

3

Admin can Add

New Items

New Food

Admin

Respond to the

customer about new food

Details of

Food

Customer

4

Customer can

provide Feedback

Feedback

Customer

Respond to the customer about

Feedback

Message of Feedback

Admin

5

The customer Add the items in Cart

Selection process

Customer

Confirm

Item Added

Admin

6

Admin can check

order details

Place Order

Admin

Placing the order

Heshe wants

Order Details

Customer

7

Admin checks daily order placed by the

customer

Checking

order

Admin

Checking for the order

Order

Summary

Customer

8

The Admin accepts the order from the

customer

Accept order

Admin

Accepting the order

Order details

Customer

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 27: Final Black Book

23 | P a g e

Uml Diagrams

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 28: Final Black Book

24 | P a g e

Use Case Diagram

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 29: Final Black Book

25 | P a g e

Class Diagram

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 30: Final Black Book

26 | P a g e

Sequence Diagram

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 31: Final Black Book

27 | P a g e

State Chart Diagram

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 32: Final Black Book

28 | P a g e

Activity Diagram

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 33: Final Black Book

29 | P a g e

Database Design

Food Details

Order Details

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 34: Final Black Book

30 | P a g e

User Details

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 35: Final Black Book

31 | P a g e

Menu Tree

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 36: Final Black Book

32 | P a g e

Crud Table

DB

Form

Log

in

Me

nu

Ite

ms

Re

gis

tra

tio

n

Ord

ers

Re

po

rt

Login

CR C

Menu Items

CRUD CRUD

Registration R

CRD CRD

Orders R

CRD

Report CR

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 37: Final Black Book

33 | P a g e

System Coding

Convention

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 38: Final Black Book

34 | P a g e

Login

Component Name Code Name

TextBox1 txtid TextBox2 txtpassword

Label1 lbluser Label2 lblpass

Button1 btnlogin Button2 btnReset

Button 3 lblError

Registration

Component Name Code Name

TextBox1 txtName TextBox2 txtPassword

Label1 Lblname Label2 lblpassword

Label3 lblResult Button1 btnRegister

Order

Component Name Code Name

TextBox1 txtDataOpen1 TextBox2 txtDataOpen2

Label1 lblOpenOrder

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 39: Final Black Book

35 | P a g e

Shop

Component Name Code Name

Label1 lblResult Label2 lblError

Button1 btnOk Button2 btnCancel

Items Add

Component Name Code Name

Label1 lblName Label2 lblType

Label3 lblPrice Label4 lblRoast

Label5 lblCountry

Label6 lblImage

Label7 lblReview Label8 lblResult

TextBox1 txtName TextBox2 txtType

TextBox3 txtPrice TextBox4 txtRoast

TextBox5 txtCountry DropDownList1 ddImage

TextBox6 txtReview Button1 btnSave

Button2 btnUploadImage FileUpload1 FileUpload1

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 40: Final Black Book

36 | P a g e

Screen Layouts

amp

Source Code

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 41: Final Black Book

37 | P a g e

Login

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 42: Final Black Book

38 | P a g e

Login

using System public partial class Pages_Account_Login SystemWebUIPage protected void Page_Load(object sender EventArgs e) protected void btnLogin_Click(object sender EventArgs e) User user = ConnectionClassLoginUser(txtLoginText txtPasswordText) if(user = null) Store login variables in session Session[login] = userName Session[type] = userType ResponseRedirect(~PagesHomeaspx) else lblErrorText = Login failed

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 43: Final Black Book

39 | P a g e

Admin

using System public partial class Pages_Account_Admin SystemWebUIPage protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx)

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 44: Final Black Book

40 | P a g e

Food

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 45: Final Black Book

41 | P a g e

Food

using System using SystemCollections using SystemText public partial class Pages_Food SystemWebUIPage protected void Page_Load(object sender EventArgs e) FillPage() private void FillPage() ArrayList foodList = new ArrayList() if(IsPostBack) foodList = ConnectionClassGetFoodByType() else foodList = ConnectionClassGetFoodByType(DropDownList1SelectedValue) StringBuilder sb = new StringBuilder() foreach (Food food in foodList) sbAppend( stringFormat( lttable class=foodTablegt lttrgt ltth rowspan=6 width=150pxgtltimg runat=server src=6 gtltthgt ltth width=50pxgtName lttdgt lttdgt0lttdgt

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 46: Final Black Book

42 | P a g e

lttrgt lttrgt ltthgtType ltthgt lttdgt1lttdgt lttrgt lttrgt ltthgtPrice ltthgt lttdgt2 $lttdgt lttrgt lttrgt ltthgtRoast ltthgt lttdgt3lttdgt lttrgt lttrgt ltthgtOrigin ltthgt lttdgt4lttdgt lttrgt lttrgt lttd colspan=2gt5lttdgt lttrgt lttablegt foodName foodType foodPrice foodRoast foodCountry foodReview foodImage)) lblOuputText = sbToString() protected void DropDownList1_SelectedIndexChanged(object sender EventArgs e) FillPage()

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 47: Final Black Book

43 | P a g e

Add Food

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 48: Final Black Book

44 | P a g e

Add Food

using System using SystemCollections using SystemIO public partial class Pages_Food_Add SystemWebUIPage region Events protected void Page_Load(object sender EventArgs e) AuthenticateAdministrator() string selectedValue = ddlImageSelectedValue ShowImages() ddlImageSelectedValue = selectedValue protected void btnUploadImage_Click(object sender EventArgs e) try string filename = PathGetFileName(FileUpload1FileName) FileUpload1SaveAs(ServerMapPath(~ImagesFood) + filename) lblResultText = Image + filename + succesfully uploaded Page_Load(sender e) catch (Exception) lblResultText = Upload failed protected void btnSave_Click(object sender EventArgs e) try string name = txtNameText string type = txtTypeText double price = ConvertToDouble(txtPriceText) price = price 100

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 49: Final Black Book

45 | P a g e

string roast = txtRoastText string country = txtCountryText string image = ImagesFood + ddlImageSelectedValue string review = txtReviewText Food food = new Food(name type price roast country image review) ConnectionClassAddFood(food) lblResultText = Upload succesful ClearTextFields() catch (Exception) lblResultText = Upload failed endregion region Methods private void ShowImages() Get all filepaths string[] images = DirectoryGetFiles(ServerMapPath(~ImagesFood)) Get all filenames and add them to an arraylist ArrayList imageList = new ArrayList() foreach (string image in images) string imageName = imageSubstring(imageLastIndexOf() + 1) imageListAdd(imageName) Set the arrayList as the dropdownviews datasource and refresh ddlImageDataSource = imageList ddlImageDataBind() private void ClearTextFields() txtCountryText =

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 50: Final Black Book

46 | P a g e

txtNameText = txtPriceText = txtReviewText = txtRoastText = txtTypeText = private void AuthenticateAdministrator() if ((string)Session[type] = administrator) ResponseRedirect(~PagesAccountLoginaspx) endregion

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 51: Final Black Book

47 | P a g e

Order Details

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 52: Final Black Book

48 | P a g e

Order Details

using System using SystemCollections using SystemNet using SystemNetMail using Entities namespace Pages public partial class Pages_OrdersDetailed SystemWebUIPage protected void Page_Load(object sender EventArgs e) CheckIfAdministrator() lblTitleText = stringFormat(lth2gtClient 0ltbr gtDate 1lth2gt RequestQueryString[client] RequestQueryString[date]) protected void btnShip_Click(object sender EventArgs e) Get variables from Url string client = RequestQueryString[client] DateTime date = ConvertToDateTime(RequestQueryString[date]) Get user info + users placed orders User user = ConnectionClassGetUserDetails(client) ArrayList orderList = ConnectionClassGetDetailedOrders(client date) Update database and send confirmation e-mail Afterwards send user back to Orders Page ConnectionClassUpdateOrders(client date) SendEmail(userName userEmail orderList) ResponseRedirect(~PagesOrdersaspx) private void CheckIfAdministrator() if ((string)Session[type] = administrator)

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 53: Final Black Book

49 | P a g e

ResponseRedirect(~PagesAccountLoginaspx) private void SendEmail(string client string email ArrayList orderList) MailAddress to = new MailAddress(email) TODO Fill in your own e-mail here MailAddress from = new MailAddress(your_emailgmailcom) string body = stringFormat( Dear 0 We are happy to announce that your order placed on 1 has been completed and is ready for pickup Your ordered products 2 You can come collect your order at your earliest convienence Kind regards Abnish client RequestQueryString[date] GenerateOrderedItems(orderList)) MailMessage mail = new MailMessage(from to) mailBody = body mailSubject = Your order has been prepared SmtpClient smtp = new SmtpClient() smtpHost = smtpgmailcom smtpPort = 587 TODO Fill in your own e-mail and password here smtpCredentials = new NetworkCredential(your_emailgmailcom yourPassword) smtpEnableSsl = true smtpSend(mail)

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 54: Final Black Book

50 | P a g e

private string GenerateOrderedItems(ArrayList orderList) string result = double totalAmount = 0 foreach (Order order in orderList) result += stringFormat( - 0 (1 euro) X 2 = 3 euro orderProduct orderPrice orderAmount (orderAmount orderPrice)) totalAmount += (orderAmount orderPrice) result += stringFormat( Total Amount 0 euro totalAmount) return result

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 55: Final Black Book

51 | P a g e

Shop

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 56: Final Black Book

52 | P a g e

Shop

using System using SystemCollections using SystemText using SystemWebUIWebControls using Entities namespace Pages public partial class Pages_Shop SystemWebUIPage protected void Page_Load(object sender EventArgs e) GenerateControls() protected void btnOk_Click(object sender EventArgs e) Authenticate() SendOrder() lblResultText = Your order has been placed thank you for shopping at our store btnOkVisible = false btnCancelVisible = false protected void btnCancel_Click(object sender EventArgs e) Session[orders] = null btnOkVisible = false btnCancelVisible = false lblResultVisible = false protected void btnOrder_Click(object sender EventArgs e) Authenticate()

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 57: Final Black Book

53 | P a g e

GenerateReview() Fill page with dynamic controls showing products in database private void GenerateControls() Get all coffeeObjects from database ArrayList coffeeList = ConnectionClassGetCoffeeByType() foreach (Coffee coffee in coffeeList) Create Controls Panel coffeePanel = new Panel() Image image = new Image ImageUrl = coffeeImage CssClass = ProductsImage Literal literal = new Literal Text = ltbr gt Literal literal2 = new Literal Text = ltbr gt Label lblName = new Label Text = coffeeName CssClass = ProductsName Label lblPrice = new Label Text = StringFormat(0000 coffeePrice + ltbr gt) CssClass = ProductsPrice TextBox textBox = new TextBox ID = coffeeIdToString() CssClass = ProductsTextBox Width = 60 Text = 0 Add validation so only numbers can be entered into the textfields RegularExpressionValidator regex = new RegularExpressionValidator ValidationExpression = ^[0-9] ControlToValidate = textBoxID ErrorMessage = Please enter a number

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 58: Final Black Book

54 | P a g e

Add controls to Panels coffeePanelControlsAdd(image) coffeePanelControlsAdd(literal) coffeePanelControlsAdd(lblName) coffeePanelControlsAdd(literal2) coffeePanelControlsAdd(lblPrice) coffeePanelControlsAdd(textBox) coffeePanelControlsAdd(regex) pnlProductsControlsAdd(coffeePanel) Returns a list of all orders placed in textboxes private ArrayList GetOrders() Get list of Textbox objects in ContentPlaceHolder ContentPlaceHolder cph = (ContentPlaceHolder)MasterFindControl(ContentPlaceHolder1) ControlFinderltTextBoxgt cf = new ControlFinderltTextBoxgt() cfFindChildControlsRecursive(cph) var textBoxList = cfFoundControls Create orders using data from textfields ArrayList orderList = new ArrayList() foreach (TextBox textBox in textBoxList) Make sure textboxText is not null if (textBoxText = ) int amountOfOrders = ConvertToInt32(textBoxText) Generate Order for each textbox which has an order greater than 0 if (amountOfOrders gt 0) Coffee coffee = ConnectionClassGetCoffeeById(ConvertToInt32(textBoxID)) Order order = new Order(

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 59: Final Black Book

55 | P a g e

Session[login]ToString() coffeeName amountOfOrders coffeePrice DateTimeNow false) Add order to ArrayList orderListAdd(order) return orderList Generate HTML table to review Current Order private void GenerateReview() double totalAmount = 0 ArrayList orderList = GetOrders() Session[orders] = orderList StringBuilder sb = new StringBuilder() sbAppend(lttablegt) sbAppend(lth3gtPlease review your orderlth3gt) Generate a row for each Order foreach (Order order in orderList) double totalRow = orderPrice orderAmount sbAppend(StringFormat(lttrgt lttd width = 50pxgt0 X lttdgt lttd width = 200pxgt1 (2)lttdgt lttdgt3lttdgtlttdgteurolttdgt lttrgt orderAmount orderProduct orderPrice StringFormat(0000 totalRow))) totalAmount = totalAmount + totalRow Generate row for Total Amount sbAppend(StringFormat(lttrgt lttdgtltbgtTotal ltbgtlttdgt lttdgtltbgt0 euro ltbgtlttdgt lttrgt totalAmount))

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 60: Final Black Book

56 | P a g e

sbAppend(lttablegt) Export data and make Controls visible lblResultText = sbToString() lblResultVisible = true btnOkVisible = true btnCancelVisible = true Send order to database private void SendOrder() ArrayList orderList = (ArrayList)Session[orders] ConnectionClassAddOrders(orderList) Session[orders] = null Check if user is logged in private void Authenticate() if (Session[login] == null) ResponseRedirect(~PagesAccountLoginaspx)

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 61: Final Black Book

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 62: Final Black Book

58 | P a g e

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 63: Final Black Book

59 | P a g e

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 64: Final Black Book

60 | P a g e

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 65: Final Black Book

61 | P a g e

Test Cases

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 66: Final Black Book

62 | P a g e

Sr No

Form

Name

Test Case

Test Data

State

Test Input

Value

EXP Result

1

Login Form

Login ID

Alphabet

Digits

Valid

Admin

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Characters

Symbols Digits

Valid

Hgf1233

Allowed To Enter Data

Null

Invalid

Error

Message

2

Register User

Name

Characters

Valid

Abnish

Allowed To Enter Data

Digits

Invalid

123

Error

Message

Null

Invalid

Error

Message

User Id

Digits

Valid

1234

Allowed To Enter Data

Null

Invalid

Error

Message

Password

Alphabets Digits

Valid

Abc123

Allowed To Enter Data

Special Symbol

Valid

$ ^ amp ( ) - +

Allowed To Enter Data

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 67: Final Black Book

63 | P a g e

Null

Invalid

Error

Message

Mobile No

Numbers

Valid

12345

Allowed To Enter Data

Null

Invalid

Error

Message

Alphabets

Invalid

Abcd

Not Allowed

To Enter Data

Email Id

Alphabets Digits

Valid aabnishhgmailCom

Allowed To Enter Data

Null

Invalid

Error

Message 4

Upload New Item

Item Id

Digits

Valid

01

Allowed To Enter Data

Null

Invalid

Error

Message

Item Name

Alphabets

Valid

ABC

Allowed To Enter Data

Special

Symbols

Invalid

$ ^ amp ( ) - + rdquo ~ `

Error

Message

Null

Invalid

Error

Message

Item Img

Digits

Alphabets

Valid

001 Abhi

Allowed To Enter Data

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 68: Final Black Book

64 | P a g e

Report Screen

Layouts

amp

Source Code

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 69: Final Black Book

65 | P a g e

Crystal Report

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 70: Final Black Book

66 | P a g e

Crystal Report

using System using SystemCollectionsGeneric using SystemLinq using SystemWeb using SystemWebUI using SystemWebUIWebControls using SystemDataSqlClient using SystemData using SystemConfiguration using CrystalDecisionsCrystalReportsEngine public partial class Pages_reportpage SystemWebUIPage SqlConnection con = new SqlConnection(ConfigurationManagerConnectionStrings[coffeeConnection]ConnectionString) SqlCommand cmd = new SqlCommand() SqlDataAdapter adp = new SqlDataAdapter() DataTable dt = new DataTable() ReportDocument rpt = new ReportDocument() protected void Page_Load(object sender EventArgs e) generateReports() public void generateReports() try cmdCommandText = select from orders cmdConnection = con adpSelectCommand = cmd dtClear()

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 71: Final Black Book

67 | P a g e

adpFill(dt) rptLoad(ServerMapPath(~PagesOrderReportrpt)) rptSetDataSource(dt) CrystalReportViewer1ReportSource = rpt catch(Exception ex) ResponseWrite(exMessage)

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 72: Final Black Book

68 | P a g e

Future

Enhancement

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 73: Final Black Book

69 | P a g e

A logical and technical error will be found less in future

System will be more user friendly as compare to todayrsquos system

System will have more detail information about the different Employees

consultancy companies candidates etc

It will have easy search to the specific type of Employee

In the security vision the user name and password authentication is

more secure than todayrsquos model

System will automatically include new Candidates which are newly created

and the user can get the information about it very easily

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 74: Final Black Book

70 | P a g e

Conclusion

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 75: Final Black Book

71 | P a g e

It was great opportunity for us as a student to learn and understand various aspects

associated with project development I did undergo from various phases of project

development life cycle like analysis design coding implementation and testing

The preceding material is a sincere effort from my side to create the ldquoONLINE

FOOD ORDERING PORTALrdquo software as my project work for BScIT project I

got the idea about the ups and downs taking place during the project development

I analyzed the problems and solved those problems that were faced in my project

The project shows the flow of each and every transaction which is being carried

out by the desired user successfully thus giving him the desired result

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 76: Final Black Book

72 | P a g e

Bibliography

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of
Page 77: Final Black Book

73 | P a g e

Sites Visited

wwwcodeprojectcom

wwww3schoolscom

wwwgooglecom

wwwallthewebcom

Books

Software Engineering by Roger S Pressman (Tata Mc-Graw hill5th edition)

Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw

hill3rd edition)

Unified Modeling Language 2 tool kit by Nons-Erik Eriksson Magnus

penkee Brian lyonsDavidfode (2nd Edition)

NET (Core Reference) -by Jeff Prosise

ASP NET in a Nutshell - by G Andrew Duthie

ASP Net by Example - by Steven A Smith

ASPNET with C Wrogs United Limited

The Unified Modeling Language User Guide by Grady Booch (Pearson education)

  • What is a SQL Server database capable of