Mitchells Butlers Have Been At The Forefront Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Mitchells Butlers have been at the forefront of the industry since 1898. Mitchells Butlers PLC runs over 1,600 managed pubs, bars and restaurants throughout the United Kingdom including All Bar One, Toby Carvery, Harvester, O'Neill's, Sizzling Pubs, Crown Carveries, Ember Inns, Ember Pub and Dining, Browns Restaurants, Village Pub and Kitchen and Vintage Inns. Mitchell & Butler's success is based on innovations, listening to customer feedback and ensuring that there passionate staff are the best trained in the industry.

Not only does Mitchell & Butler Own a restaurant chains they also own the small UK hotel brand inn keepers lodge. Innkeeper's Lodges are found mainly next to Vintage Inns, but can also be found at other locations around the UK.

Within the vintage inn restaurant chain they have almost 200 restaurants around the United kingdom. The Vintage inn chain offers a country pub and restaurant dining in areas that are rural as well as in non rural areas. Accommodation can be found at 30 Vintage Inns across the United Kingdom.

1.3 Project Aims Objectives

The section below identifies list of objectives for undertaking the project.

These objectives are but not limited to;

Research into database security that can be used in order to allow data to be stored securely and successfully.

To design implement and test a prototype system that can be used to manage a restaurant.

Requirements Specification

System Design

Implementation

Testing

To prepare a critical evaluation of the project

Write a dissertation

Defend the project in a viva presentation.

1.4 Limitations

1.5 Project Report - General

2.0 Research

Topic: Database Security

2.1 What a database management system is and how it is used

As technology has evolved and computer technology is becoming more popular in peoples every day life's business are adapting their services so they can be made digitally and accessed online from anywhere. One of the ways in which businesses can manage information would be to create an electronic database attached to a web application or a website so they can input or retrieve information stored. A database is a collection of data stored on a computer using an application called a database management system. (Basta, 2011, Page 44)

dbms_internallvl

Figure 2.1.1: DBMS Diagram (TATA)

EBay is one of many examples, it is a ecommerce website that uses a database to store information. EBay uses databases to store information about products they list, account details and card details etc. There are many ways in which you can manage your database, one of which would be to use a DBMS. The goal of a DBMS is to provide users with the means to manipulate, analyse, store, and retrieve information. (Basta, 2011, Page 44) There are many DBMS such as MySQL, PostgreSQL, Microsoft Access, SQL Server, FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro. Some DBMS are available commercially and some are available as Freeware. There are many advantages to using database management systems which include the following Improved data sharing, Improved data security, Better data integration, Minimized data inconsistency, Improved data access, Improved decision making and Increased end-user productivity. Often different systems of an organization would access the different components of the operational data, in such an environment enforcing security can be quite difficult. (Ankit Goyal, 2008) Database security is a set of established procedures, standards, policies, and tools that are used to protect data from theft, misuse, and unwanted intrusions, activity's, and attacks. (Basta, 2011, Page 4) As databases are widely used to store information they have to be well maintained with security procedures in place. Some databases store numerous amounts of data including peoples information, here are some examples of what may be held in a database connected to a booking system; phone numbers, names, addresses, email addresses etc. If you use a DBMS you are able to control what users can access by the use of specific rules that administrators are able to set within the system. An example of where this can be used would be within a bank. You are able to give employees different privileges to the database so they can only access certain information. This means a janitor won't be able to access somebody's bank account information. Therefore this makes the system more secure.

2.2 Database Hacking

As databases are becoming more popular you find more and more people are trying to find ways in which to gain unauthorised access to people's personal data. It was found that there are a number of ways in which hackers can exploit databases such as SQL injection.

2.3 SQL injection

SQL injection or SQL insertion attack is a code injection technique that exploits a security vulnerability occurring in the database layer of an application and a service. (Lee et al, 2012) This means that people who are unauthorized to do so are able to insert bogus information into your database. There are many reasons why people would want to use SQL injection against your database one of which would be to view or change information already inside the database. Another reason would be to submit information into the database that is false. If this occurs it is a violation of the Data protection act as it is states that all information that is collected must be correct.

2.4 Intrusion Detection System (IDS)

To detect an attack, the driver uses stripped-down SQL queries and stack traces to create SQL statement signatures that are then used to distinguish between injected and legitimate queries. (Mitropoulos and Spinellis, 2009) IDS is a system used to detect intrusions, AMNESIA is an example of an IDS. AMNESIA is a, tool that detects and prevents SQL injection attacks by combining static analysis and runtime monitoring. Empirical evaluation has shown that AMNESIA is both effective and efficient against SQL injection. (Halfond and Orso, 2006)

Figure 2.4.1: Database IDS Architecture

Another example of an IDS would be a system based on MAS. idMAS-SQL (Intrusion Detection Based on MAS to Detect and Block SQL injection), a hybrid solution based on a distributed architecture (multiagent system - MAS) capable of detecting and blocking SQL injection attacks. (Cristian, 2012) It is important that you can prevent hackers from gaining access to your database, this means preventing the use of SQL Injection and many other methods. SQL injection can be used to insert unauthorised entries into the database making the data unreliable and inaccurate. There are various legislations in place that tell database administrators what they can and cannot do. For example Data Protection act.

2.5 Updates and system patches

It is essential that you keep your system up-to-date with the latest stable versions of software installations and operating systems. Software vulnerabilities have become a serious concern because un patched software runs the risk of being exploited by hackers. (Temizkan, 2012) Within updates the developers may have fixed bugs and security holes which will improve your system security.

2.6 Security policies

The information security policy is a direction-giving document for information security within an organisation. (Höne and Eloff, 2002) Every business needs a security policy in place as it is an essential part of making your business secure. It is a document that indicates management's commitment to and support of information security, as well as defining the role information security has to play in reaching and supporting the organisation's vision and mission. (Höne and Eloff, 2002) These policies contain all the vital information that must be enforced. If somebody breaches the security policy, the policy must also contain information about the consequences. There are many security policies that may be enforced such as a Bluetooth device, printer, dial in , internet, removable devices, mobile phone, remote desktop etc. all these security policies are in place as if they were misused they could have a serious role in whether or not your security becomes compromised. An example of why security policies are used. This an example of why a security policy exists when remotely accessing servers. When people accessing the servers from remote locations. There must be a security policy that has to be signed by anyone who wants to access the servers from a remote location. This means not everyone can access the servers remotely limiting the possibility of the servers being hijacked. There have been reports that employers have found some employees which don't comply with their security policy regulations. Employees' failure to comply with information systems security policies is a major concern for information technology security managers. (Siponen, 2012) seeing as this is a major part in security, if employees refuse to comply with security policies they will face immediate disciplinary action or maybe even fired.

2.7 Data encryption

Encryption is vital to the success of secure data transfer and storage in today's society. (Basta, 2011, Page 168) Protecting the storage of your data is equally important as protecting it in transit. Hard disks should apply encryption techniques to add an extra layer of security to the database. (Basta, 2011, Page 168) it is essential that both the drive and the way the data is transmitted must be encrypted. Secure socket layer is a protocol that encrypts the data stream when communicating over the internet. The SSL protocol was originally developed by Netscape, to ensure security of data transported and routed through HTTP, LDAP or POP3 application layers. (Onyszko, 2004) there is a piece of software called true crypt that will encrypt the whole of your drive in real time so if someone tries to gain access to the drive that doesn't have the correct password they will not be able to see any of the content that is written and being stored. If somebody from outside visits the premises where your system is located, and tries to access the computer system, they will be able to get hold of all the information that is being stored on the drive. This may be anyone from a cleaner to a maintenance man. Anyone entering the premises must sign the relevant security policies telling them what they can do.

2.8 Data Protection Act

The data protection act is a legislation that was put in place in 1998. This act details information and guidelines that must be abided by when collecting and storing data. This act is set out into 8 principles which are as follows;

Personal data shall be processed fairly and lawfully and, in particular, shall not be processed unless -

At least one of the conditions in Schedule 2 is met, and

In the case of sensitive personal data, at least one of the conditions in Schedule 3 is also met.

Personal data shall be obtained only for one or more specified and lawful purposes, and shall not be further processed in any manner incompatible with that purpose or those purposes.

Personal data shall be adequate, relevant and not excessive in relation to the purpose or purposes for which they are processed.

Personal data shall be accurate and, where necessary, kept up to date.

Personal data processed for any purpose or purposes shall not be kept for longer than is necessary for that purpose or those purposes.

Personal data shall be processed in accordance with the rights of data subjects under this Act.

Appropriate technical and organisational measures shall be taken against unauthorised or unlawful processing of personal data and against accidental loss or destruction of, or damage to, personal data.

Personal data shall not be transferred to a country or territory outside the EEA unless that country or territory ensures an adequate level of protection for the rights and freedoms of data subjects in relation to the processing of personal data.

(Information Commissioner's Office)

2.9 Algorithms

2.10 Conclusion

When developing a system that has the use of a database it is important that there are security measures in place. As the system may contain information that is private and this data must be secure at all times. This will be done by making sure that the database is maintained with the latest security patches available for software and operating systems. The database management system that will be chosen will be constantly updated to stable versions and any security patches that have been released will be added. Encrypting the data when it is in transit and being stored on the disk is a must as this adds an extra layer of security. Any data being collected will be encrypted using secure socket layer in order for it to be transmitted over the web as this makes use of a secure protocol. Data that is on the hard drive will be secured through the use of a piece of software called true crypt. Using an IDS will be beneficial as way of preventing SQL injection this will ensure that there is no body present in the system that isn't authorized. Security policies must be in place, and states what you may accesses within the system and defines the consequences of breach. The system will have security policies stating who is allowed to access certain parts of the system for example only managers are allowed to access the tools with administrator privileges set. As it is important to comply with legislations such as the data protection act, it is important that you only collect data that is relevant for a purpose which has been stated. The system that will be built will only collect data that is relevant to a reservations diary. Once implemented this will ensure that the system is secure.

4.0 Analysis

4.1 The Current System

At the moment the church mouse has two systems in place. First of which is a system that uses a paper dairy.

When somebody phones up to reserve a table in the restaurant, The team member dealing with the reservation will ask for information such as they will give over information such as name, date, time, number of guests, special requirements and a phone number. All this information is written down inside a diary.

The second system that the restaurant has is a way that staff can process and send orders into the kitchen and drinks orders to the bar. Their current system which they would like improving is made up of a checkout style till linked with a central server which is very basic.

When employees start work they have to assign themselves to a server, they do this by inserting a key into the checkout till which is uniquely coded to each individual employee. Then they have to specify whether or not they are a waiter or bar staff.

In order for staff to send a food order into the kitchen or a drinks order to the bar, they are to set up a table. The Church Mouse at this present time uses a table system based on wooden spoons which are numbered and colour coded to each section of the bar/ restaurant. The staff would issue a spoon and setup a table on the till system using a three step process. First of all they would insert there key, then they would enter the issued spoon number and create the table on the server. Once the table is setup they then process the order which is then sent to the server and sent on to the relevant place ether the bar or the kitchen which is then printed out onto tickets.

4.2 Requirements for the Proposed System

This is a brief summary of the system to tackle the challenges which are slowing down their service with the following features below:

Table Reservation System

Food and Drinks Menu System

Till System

Receipt and Ticket Handling

Stock Level Counter

Table Planner

Menu Ordering System

Drinks Ordering System

Pre Booking System

Deposit Handling

Integrate all systems into one system to work together

4.3 Constraints and Limitations

4.4 Software Tools

They have decided that I am to build a new system written in C# that will integrate both systems into one allowing them to manage their business more efficiently.

5.0 Design and development

5.1 Restaurant Management System- Design Elements

I have developed my application using C# programming language. To develop my application I used the software package developed by Microsoft, visual studio2010.

5.2 MySQL Database and Database Management

One of the requirements that my client had specified, was to implement a database within the application so data can be stored remotely rather being part of the programming. Having a database means that more than one program is able to access the data simultaneous where as if the data was stored within arrays or variables within the code only that application would be allowed access the information.

The database that my client requested for me to use was MySQL database. To set up the MySQL database I installed on locally, WAMP. WAMP stands for Windows, Apache, PHP, MySQL. One of the main reasons that I choose to use a WAMP server is that all software included within the package are up to date. WAMP release updates often with the latest updates off all the software it includes. Having up to date versions off all the software means there will be less vulnerabilities allowing a more secure and stable server.

To create my database I used a web application called phpMyAdmin. phpMyAdmin is a browser database management system developed in PHP. I used this system to be able to create and manage databases that I am using as part of my application. Using phpMyAdmin allows me to perform tasks like creating, modifying and deleting tables allot easier.

I created one database, RMS. Within RMS there are multiple tables, table_login, table_one, table_two, table_three, table_four,table_five, table_six, table_bar, table_syslog and finaly table_reservations.

Below show the data that I am collecting within the tables listed above;

table_login

ID, INT(Auto Increment)

UserName, Text

Password, Text

table_one

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_two

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_three

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_four

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_five

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_six

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_bar

ID, INT(Auto Increment)

Time, Time

Item, Text

Price, INT

table_reservations

ID, INT(Auto Increment)

Date, Date

Name, Text

Telephone Number, INT

Number of Guests, INT

Special Requirements, Text

Time, Time

table_syslog

ID, INT(Auto Increment)

Time, Time

Message, Text

5.3 Developing The Application - Client and Server Loader

I developed the loader to launch the client and server application independently. Throughout development of the loader, I have developed three versions witch implement different functions.

In version one the loader consisted of a main form with two buttons, btnRunClient and btnRunServer. These buttons would Load the client and server on different threads when clicked.

Running the code on multi threads allows me to use the client and the server at the same time, on the same pc without conflicting between each other. To be able to load the client and the server on different threads I used a background worker. To create the background worker I used the background worker form control from within visual studio. Now that the background worker form controls had been added to the main form I named them bgRunClient and bgRunServer. I associated events with these controls, do work. Any code that I write in this event will be run on a new thread.

private void bgRunServer_DoWork(object sender, DoWorkEventArgs e)

{

Application.Run(new Server());

}

To be able to trigger the event I use the RunWorkerAsync(); this creates a new thread and executes the code written in the do work event.

The following code shows how I start the bgRunServer background worker.

bgRunServer.RunWorkerAsync();

In version two I made it so you had to log in to be able to launch the client and server. I changed the main form of the login to include two new text fields and a checkbox, txtPassword, txtUserName and chkLoadServer. The checkbox allows you to specify whether or not the client or server is loaded when checked the server will be loaded but when left unchecked the client will be loaded. The login credentials are checked against the details entered into the form and if mach allow the client and server to be loaded.

if (txtPassword.Text == "admin" && txtUserName.Text == "" )

{

if (chkLoadServer.Checked)

{

bgRunServer.RunWorkerAsync();

}

else

{

bgRunClient.RunWorkerAsync();

}

}

else

{

MessageBox.Show("Login Failed. Check Username and Password");

}

In version three I modified the existing code so instead of the login credentials being stored within a variable I implemented a way of checking a database. This allows me to easily add new team members to the system without having to alter the application code.

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command = conn.CreateCommand();

command.CommandText = "SELECT * FROM `table_login` WHERE userName='" + txtUserName.Text + "'";

MySqlDataAdapter da = new MySqlDataAdapter(command);

DataTable dt = new DataTable();

da.Fill(dt);

if (txtPassword.Text == dt.Rows[0]["pwd"].ToString() && txtUserName.Text == dt.Rows[0]["userName"].ToString())

{

if (chkLoadServer.Checked)

{

bgRunServer.RunWorkerAsync();

}

else

{

bgRunClient.RunWorkerAsync();

}

}

else

{

MessageBox.Show("Login Failed. Check Username and Password");

}

I also made the password box display * characters instead of the password text being showed in plain text.

5.4 Developing The Application - Client

The client is run on a separate thread from the client and server loader. The client consisted of a main form with multiple buttons, labels, timers, data grid views, panels and textboxes;

btnTablePlanner

btnFood

btnDrink

btnResevations

btnPrintBill

btnCashOff

btnLogout.

txtTableSelected

timer1

dataGridViewFoodOrdered

txtTableSelected

PanelReserve

PanelFood

PanelDrink

PanelTablePlanner

Instead of having new forms being loaded I made it so everything is on the same from and when the buttons are pressed the graphical user interface will update according to what information needs to be displayed. I grouped together controls that relate to each other into panels. When the button is clicked I made it so the relevant panel is set to visible and the unrelated panels are set to hidden.

private void button1_Click(object sender, EventArgs e)

{

panelReserve.Visible = false;

PanelFood.Visible = true;

PanelDrink.Visible = false;

PanelTablePlanner.Visible = false;

}

To connect to the database and fill the data grid view with values from the database I used the MySQL connection wizard built into visual studio.

When a user selects a table it updates the value in txtTableSelected. I made it so when that value in the text box changes, the data grid corresponding to that value would loaded and displayed on the main form. This means if someone was to type a value into the text field, without clicking on a table in the table planner the data grid will still update as normal.

When the text is changed the application also updates a variable Table_Selected, this variable identifies witch table within the database, which is being used. This variable is used when processing food and drink orders.

private void txtTableSelected_TextChanged(object sender, EventArgs e)

{

if (txtTableSelected.Text == "1")

{

Table_Selected = "table_one";

dataGridView1.Visible = true;

dataGridView2.Visible = false;

dataGridView3.Visible = false;

dataGridView4.Visible = false;

dataGridView5.Visible = false;

dataGridView6.Visible = false;

dataGridViewBar.Visible = false;

}

}

My client requested that I implemented a digital clock that would be displayed on the main form. To create the clock I added a Timer control from the toolbox in visual studio. Once the timer has been added to the form, I set the timer interval to 1000. I then created a tick event, the code that gets the current system time and updates the label is written within this event.

private void timer1_Tick(object sender, EventArgs e)

{

lblTime.Text = DateTime.Now.ToString("hh:mm");

}

As the timer interval is set to 1000 this means that the code that is associated with the tick event will be run every one second.

5.5 Developing The Application - Table Planner

When the user clicks on btnTablePlanner, the system makes PanelTablePlanner visible. If any other panel is visible other than PanelTablePlanner it will be set to hidden.

PanelTablePlanner shows a graphical user interface of the floor appears displaying a blueprint, this blueprint shows the table and bar areas. When the user interacts with the blueprint, by clicking on one of the tables, the application executes commands according.

If the user was to click on a table, the table that the user selects would be then inputted into txtTableSelected.

private void panBAR_Click(object sender, EventArgs e)

{

txtTableSelected.Text = "BAR";

}

To save time when processing drinks at the bar I made it so when the user clicks on btnTablePlanner the bar is automatically selected. I do this by when panBAR paint is visible it will execute the following code.

private void panBAR_Paint(object sender, PaintEventArgs e)

{

txtTableSelected.Text = "BAR";

}

5.6 Developing The Application - Food Menu System

When the user clicks on btnFood, the system makes PanelFood visible. If any other panel is visible other than PanelFood it will be set to hidden.

PanelFood brings up a menu with buttons for all the food items on the menu. When the food buttons are pressed, The application checks to see if table is selected, it does this by checking the text that is in txtTableSelected.Text. If there is no text or the text is equal to BAR the application will redirect you to PanelTablePlanner to select a table.

if (txtTableSelected.Text == "" || txtTableSelected.Text == "BAR")

{

panelReserve.Visible = false;

PanelFood.Visible = false;

PanelDrink.Visible = false;

PanelTablePlanner.Visible = true;

MessageBox.Show("Please Select A Table");

}

Once that you have selected a table the application will then connect to the MySQL database and run the insert command associated with that button.

To connect to the MySQL database, you require to have made a connection. This connection requires a connection string. The connection string gives the application information of the whereabouts that the server is hosted, the port that the server is using to be able to receive MySQL connections, the username and password of the MySQL database and finally what database you are going to be connecting to.

To identify the correct table to insert the values into the application calls the variable Table_Selected. This variable contains the name of the table selected and is used within the SQL command.

The Insert command will contain different information for all the items on the menu. The information values within the insert command can be easily made so to allow a page in the server that will be able to update the information.

INSERT INTO `rms`.`" + Table_Selected + "` (`ID` ,`Time` ,`Item` ,`Price`)VALUES (NULL , '" + DateTime.Now.ToString("h:mm:ss") + "' , 'Lamb' , '9' );

This command will insert the system time, the item name and the price into the selected table.

if (txtTableSelected.Text != "BAR")

{

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command = conn.CreateCommand();

command.CommandText = "INSERT INTO `rms`.`" + Table_Selected + "` (`ID` ,`Time` ,`Item` ,`Price`)VALUES (NULL , '" + DateTime.Now.ToString("h:mm:ss") + "' , 'Lamb' , '9' );";

conn.Open();

command.ExecuteNonQuery();

conn.Close();

}

As well as adding a record into the table that is associated with Table_Selected , the application also enters a record into table_syslog. Whenever the user interacts with the application log will be logged in table_syslog table. The following information will inserted, time and message values, into table_syslog.

INSERT INTO `rms`.`table_syslog` (`ID` ,`Time` ,`Message` )VALUES (NULL , '" + DateTime.Now.ToString("h:mm:ss") + "', 'Table " + Table_Selected + " Has Been Cashed Off');

Once that information had been inserted into the table the application would then refresh the data grid view to show the updated information in the table.

this.table_fourTableAdapter.Fill(this.rmsDataSet9.table_four);

this.table_threeTableAdapter.Fill(this.rmsDataSet8.table_three);

this.table_fiveTableAdapter.Fill(this.rmsDataSet7.table_five);

this.table_twoTableAdapter.Fill(this.rmsDataSet6.table_two);

this.table_sixTableAdapter.Fill(this.rmsDataSet5.table_six);

this.table_oneTableAdapter.Fill(this.rmsDataSet4.table_one);

this.table_barTableAdapter1.Fill(this.rmsDataSet3.table_bar);

this.table_oneTableAdapter1.Fill(this.rmsDataSetOne.table_one);

this.table_barTableAdapter.Fill(this.rmsDataSetBAR.table_bar);

5.7 Developing The Application - Drinks Menu System

When the user clicks on btnDrink, the system makes PanelDrink visible. If any other panel is visible other than PanelDrink it will be set to hidden.

PanelDrink brings up a menu where there are buttons for all the available drinks. When a drinks button is pressed, The application checks to see if table is selected. It does this by checking the text that is in txtTableSelected.Text. Unlike possessing food orders the txt selected table makes sure that txtTableSelected isn't left blank. If the field is blank you will be redirected to PanelTablePlanner where txtTableSelected.Text is automatically set to "BAR".

if (txtTableSelected.Text == "" || txtTableSelected.Text == "BAR")

{

panelReserve.Visible = false;

PanelFood.Visible = false;

PanelDrink.Visible = false;

PanelTablePlanner.Visible = true;

MessageBox.Show("Please Select A Table");

}

Once that the application has checked whether or not there has been a table selection or that the bar tab has been setup. The application then connects to the database and uses a insert query to insert a record into the database associated with the selected table.

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command = conn.CreateCommand();

command.CommandText = "INSERT INTO `rms`.`" + Table_Selected + "` (`ID` ,`Time` ,`Item` ,`Price`)VALUES (NULL , '" + DateTime.Now.ToString("h:mm:ss") + "' , 'Diet Pepsi' , '2' );";

conn.Open();

command.ExecuteNonQuery();

conn.Close();

Once that the entry has been inserted into the table, like before when processing food orders the application refreshes the visible data grid view to display the updated information.

5.8 Developing The Application - Table Reservation System

When the user clicks on btnReservations, the system makes PanelResevations visible. If any other panel is visible other than PanelResevations it will be set to hidden.

PanelResevations brings up a form that allows you to insert reservations into the system. This form consists of four Text fields, txtName, txtTelephoneNumber, txtNumberOfGuests and txtSpecialRequirements. As well as text fields the form includes two Time date pickers dtpTime and dtpDate. There are three buttons one for submit, clear and view bookings, btnClear, btnSubmit and btnViewBookings.

When the btnSubmit is clicked, the application then checks the information that has been entered in the form. The application makes sure that the required information isn't left blank. If required information isn't present the system will flag up a message box asking you to enter the information.

If the information is correct and not left blank the application will then connect and insert the record into tabe_reservations.

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command = conn.CreateCommand();

command.CommandText = "INSERT INTO `rms`.`table_resevations` (`ID` ,`Date` ,`Name` ,`Telephone Number` ,`Number Of Guests` ,`Special Requirements` ,`Time` )VALUES (NULL , '" + tdpDate.Text + "', '" + txtName.Text + "', '" + txtTelephoneNumber.Text + "', '" + txtNumberOfGuests.Text + "', '" + txtSpecialRequirements.Text + "', '" + dtpTime.Text + "');";

conn.Open();

if (txtName.Text != "" && txtNumberOfGuests.Text != "" && txtTelephoneNumber.Text != "")

{

command.ExecuteNonQuery();

}

else

{

MessageBox.Show("Please Fill Out All Information");

}

conn.Close();

Once that the record has been inserted into the table the application clears the text fields so a new reservation is able to be added.

txtName.Clear();

txtNumberOfGuests.Clear();

txtSpecialRequirements.Clear();

txtTelephoneNumber.Clear();

5.9 Developing The Application - Viewing Reservations

When btnViewBookings is clicked the application starts a new background worker and runs a new form.

Background worker

Big Refresh Button

btnRefresh Refreshes the datagrid View

5.10 Developing The Application - Cashing off

Cash off

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command = conn.CreateCommand();

command.CommandText = "SELECT SUM( COALESCE( `Price` , 0 ) ) FROM " + Table_Selected;

MySqlDataReader myReader;

myReader = command.ExecuteReader();

try

{

while (myReader.Read())

{

MessageBox.Show("You have sucsessfully cashed off: £" + myReader.GetString(0));

}

}

Add To System Log

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command2 = conn.CreateCommand();

command2.CommandText = "INSERT INTO `rms`.`table_syslog` (`ID` ,`Time` ,`Message` )VALUES (NULL , '" + DateTime.Now.ToString("h:mm:ss") + "', 'Table " + Table_Selected + " Has Been Cashed Off: £" + myReader.GetString(0) + "');";

conn.Open();

command2.ExecuteNonQuery();

conn.Close();

Cashed off Clear Data From Data Grid

string connString = "Server=localhost;port=3306;Database=rms;Uid=root;Password=;";

MySqlConnection conn = new MySqlConnection(connString);

MySqlCommand command3 = conn.CreateCommand();

command3.CommandText = "TRUNCATE TABLE " + Table_Selected;

conn.Open();

command3.ExecuteNonQuery();

conn.Close();

5.11Developing The Application - Printing Bills

5.12 Developing The Application - Logging out

Close Form

Stops The Background worker

Adds To System Log

5.13 Developing The Application - Server

5.13 Developing The Application - Change, edit, delete reservations

5.14 Developing The Application - Disable buttons

5.14 Developing The Application - Input food wait

5.15 Developing The Application - Check system log

5.12 Developing The Application - Logging out

6.0 Testing

6.1 Unit Testing

6.2 Acceptance Testing

7.0 Management Control

7.1 Introduction

7.2 Project Planning and Management

8.0 Evaluation

8.1 System Evaluation

8.1.1 Achievements

8.1.2 System Weaknesses

8.1.3 Further Improvements

8.2 Research Evaluation

8.3 Process Evaluation

9.0 Conclusion

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.