Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 39

ADVANCED ROOM BOOKING SYSTEM

INDEX

1.

BCA VI SEM, SGT College Bellary Page 1


ADVANCED ROOM BOOKING SYSTEM

ABSTRACT

The purpose of Room Booking System is to automate the existing manual system by
the help of computerized equipment’s and full-fledged computer software, fulfilling their
requirements, so that their valuable data information can be stored for a longer period with
easily available and easy to work with. Room Booking System, as described above, can lead
to error free, secure reliable and fast management system. It can assist the user to concentrate
on their other activities rather to concentrate on the record keeping. Thus, it will help
organization in better utilization of records without redundant entries. That means that one
need not be distracted by information that is not relevant, while being able to reach the
information. The aim is to automate its existing manual system by the help of computerized
equipment’s and full-fledged computer software, fulfilling their requirements. Basically, the
project describes how to manage for good performance and better services for the clients.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

INTRODUCTION
The “Room Booking System” has been developed to override the problems prevailing in the
practicing manual system. This software is supported to eliminate and, in some cases, reduce
the hardships faced by this existing system. Moreover, this system is designed for the
particular need of the company to carry out operations in a smooth and effective manner. The
application is reduced as much as possible to avoid errors while entering the data it also
provides error message while entering invalid data. No formal knowledge is needed for the
user to use the system. Thus, by this all it provides it is user secure, reliable, and fast
management system. It can assist the user to concentrate on their other activities rather to
concentrate on the record keeping. Thus, it will help organization in better utilization of
resources.

Every organization whether big or small, has challenges overcome and managing the
information of Room, Hotel, Payments, Customers, Booking, Every Room Booking System
has different Hotel needs, therefore we design exclusive employee management systems that
are adapted to your managerial requirements. This is designed to assist strategic planning and
will help you ensure that your organization is equipped with the right level of information and
details for your future goals. Also, for those busy executives who are always on the go, our
system come with remote access feature, which will allow you to manage your workforce
anytime, at times. These systems will ultimately allow you to better manage resources.

PROBLEM STATEMENT

To design and develop C# based real-time ADAVNCED ROOM BOOKING SYSTEM


application, which allows you to track of all the room booking, payments, add staff, add
users.

AIM OF THE PROJECT

The aim of this application is to automate its existing manual system by the help of
computerized equipment’s and full-fledged computer software, fulfilling their requirements,
so that their valuable data information can be stored for a longer period with easy accessing
and manipulation of the same.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

EXISTING SYSTEM

In the existing system the Room Booking are done manually so in this system lack of security
of data, more manpower, time consuming, it consumes large volume of paperwork and it
needs manual calculations.

PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities. The proposed
system can overcome all the limitations of the existing system. The system provides proper
security and reduces the manual work by sorting the data.

OBJECTIVES

1. The main objective is to manage the details of Hotel, Rooms, Services, Payments and
Booking.
2. To provide the searching facilities based on various factors. Such as Hotel, Services,
Payments, Booking.
3. To Room Booking System also manage the customers details online for payments
details, Booking details, Hotel.
4. To tracks all the information of Rooms, Customers, and payments etc.
5. To create a database management system (DBMS) this allocates storage to the data
and provides security for the stored data.

ADVANTAGES

1. The stored system is useful to calculate easily how many rooms are available and how
many rooms are booked etc.
2. This application is effective and saves time and cost of the users.
3. Easy retrieved of information.
4. Reduced errors due to human intervention.
5. User friendly screen to enter the data.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

HARDWARE REQUIREMENTS SPECIFICATION


• Processor : AMD RYZEN 5
• RAM : 16 GB
• SSD : 512 GB
• Monitor : 16 – inch HD Display
• Keyboard : Standard Keyboard
• Mouse : Standard optional mouse or Touch pad

SOFTWARE REQUIREMENTS SPECIFICATION

• Operating System : Windows 11


• Programming Language : C#.Net
• IDE : Visual Studios 2022
• Database : Microsoft SQL Server Management Studio 17
• Framework : .Net Framework v4.5

SYSTEM ANALYSIS

It is a process of studying and identifying the problem defined earlier by the client in the
requirement phase. The general system analysis deals with the system behaviour for the input
values provided by the user. The primary purpose of system analysis is a methodology of how
the system and its components or modules function together according to the objectives
specified by the user.

The fundamental objectives of system analysis are to ensure that the proposed system will
meet the client needs and can be delivered in time and, to prove the operational efficiently
too. The analysis made on the said project “ADVANCED ROOM BOOKING” will give the

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

clear idea of “What the system should do?” as specified in the objectives by the end user, the
proposed system must function through the interface and DB modules to ensure the integrity
and efficiently of the system components. Each component of a system will work effectively
accordingly to user inputs and can be stored retrieved with proper database designs made in
next phase of the project.

SYSTEM DESIGN

The developing application is considered to the version upon the system, which is proposed to
be built with the content and touch of MS SQL Server as backend database. C#.net is the
Front-end technology used to design the application and Visual Studios 2019 is the IDE used
to develop the application.

SOFTWARE DEVELOPMENT PROCESS MODEL

SDLC is a process followed for a software project, within a software organization. It consists
of a detailed plan describing how to develop, maintain, replace and alter or enhance specific
software. The life cycle defines a methodology for improving the quality of software and the
overall development process.

The following figure is a graphical representation of the various stages of a typical SDLC.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

Requirement
Analysis

System

Design

Implementation

Testing

Deployment

Maintenance

Figure 1: Waterfall Model

PHASES IN WATERFALL MODEL:


1. Requirement Gathering and Analysis
2. System Design
3. Implementation and Unit Testing
4. Implementation and Testing
5. Deployment
6. Maintenance

1. REQUIREMENT GATHERING AND ANALYSIS

Requirement analysis is the most important and fundamental stage in SDLC. It is performed
by the senior members of the team with inputs from the customer, the sales department,
market surveys and domain experts in the industry. This information is then used to plan the
basic project approach and to conduct product feasibility study in the economical,
operational, and technical areas.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

2. SYSTEM DESIGN

Once the requirement analysis is done the next step is to clearly define and document the
product requirements and get them approved from the customer or the market analysis. This
is done through SRS software requirement specification document which consists of all the
product requirements to be designed and developed during the project life cycle.

3. IMPLIMENTATION

SRS is the reference for product architects to come out with the best architecture for the
product to be developed. Based on the requirements specified in SRS, usually more than one
design approach for the product architecture is proposed and document in a DDS-Design
Document Specification.

A design approach clearly defines all the architectural modules of the product along with its
communication and data flow representation with the external and third-party modules. The
internal design of all the modules of the proposed architecture should be clearly defined with
the minutest of the details in DDS.

4. TESTING

In the stage of SDLC the actual development starts, and the product is built. The
programming code is generated as per DDS during this stage. If the design is performed in a
detailed and organized manner, code generation can be accomplished without much hassle.

Developers have to follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers etc are used to generate the code.

Different high-level programming languages such as C, C++, Pascal, Java, C#.Net and PHP
are used for coding. The programming language is chosen with respect to the type of software
being developed

5. DEPLOYEMENT OF SYSTEM

This stage is usually a subset of all the stages as in the modern SDLC models, the testing
activities are mostly involved in all the stages of SDLC. However, this stage refers to the

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

testing only stage of the product where products defects are reported, tracked, fixed, and
retested, until the product reaches the quality standards defined in the SRS.

6. MAINTENANCE

Once the product is tested and ready to be deployed it is released formally in the appropriate
market. Sometime product deployment happens in stages as per the organizations, business
strategy. The product, may first be released in a limited segment and tested in the real
business environment (UAT- User acceptance testing)

Then based on the feedback, the product may be released as it is or with suggested
enhancements in the targeting market segment. After the product is released in the market, its
maintenance is done for the existing customer base.

SOFTWARE MODEL APPROACH

A module is a software component or a part of a program that contains one or more routines.
One or more independently developed modules together makeup a program. Advanced Room
Booking System contains the following modules.

1. Login Module
2. Add Module
3. Booking Module
4. Payment Module
5. View Module
1.Login Module

Login module is the gateway to the application which provides an authentication access to the
admin through username and password from which he/she can access the stored information
or manipulate the Room Booking System. The module consists of two primary fields that can
hold data values of type number and character respectively.

2. Add Module

This module allows admin to add up new users and new staff basic credentials like staff id,
name, contact no/mobile no, address. The admin will provide a unique identification number

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

while entering add staff or add user details which helps for the easy access of the specific
adding without any ambiguity.

3. Booking Module

Booking module allows user to book a room with the basic fields like Booking id, From, To,
Room no, No of people, Amount, Cust id, Name, Contact, Address. In this module we can
add the room booking details, and we can search and update the booking details.

4. Payment Module

This module allows user to pay the amount for booking a room by filling the attributes like
Cust id, Room id, Payment type and the payment type may be cash, online, card. In this
module we can pay the amount by clicking pay button or we can Reset the payment.

5.View Module

The entire details are been retrieved based on the ID number of the user and booking from the
stored database securely. In this module we can view the details like room booking and user
booking.

BCA 6TH SEM. Veerashaiva College Bellary Page


ADVANCED ROOM BOOKING SYSTEM

DESIGN MODULES

Class Diagram

A class diagram in the unified modelling language (UML) is a type of static structure diagram
that describes the structure of a system of a system by showing the system classes, their
attributes, operations, and the relationships among objects. The class diagram is the main
building block of object-oriented modelling

User/Admin
dbServer();

Admin User
Username: Varchar Username: Varchar
Password: Number Password: Number
Login (); Login ();
Register(); Register ();

View Booking
Book Room
Booking id: Number
Booking id: Number
Search ();
Room NO: Number
Add ();
View Users
User id: Number Payment
Search (); Cust id: Number
Delete (); Room id: Number
Pay ();
Add Staff
Staff id: Number View Booking
Name: Varchar Booking id : Number
Add (); Search ();
Fi gure 2: Class Diagram

BCA 6TH SEM, Veerashaiva college Bellary Page 11


ADVANCED ROOM BOOKING SYSTEM

Use Case Diagram


Use case model is an approach that is a combination of text and pictures to improve the
understanding of requirements. A use case model is describing the complete functionality of a
system by identifying how everything that is outside the system interacts with it.

ROOM BOOKING SYSTEM

Login

Book Room

Payment

View
Book ing

View users
User Admin

Add Staff

Add User

Figure 3: Use Case diagram representing Room Booking System

BCA 6TH SEM, Veerashaiva college Bellary Page 12


ADVANCED ROOM BOOKING SYSTEM

Sequence Diagram
A sequence diagram shows object interactions arranged in the sequence. It depicts the objects
and classes involved in the scenario and the sequence of message exchanged between the
objects needed to carry out the functionality of the scenario.

User Login Room Booking DB Module

Enter username
2 . Enter password

3. Successful Verify

4. Access to Application
5. Allows using modules
BCA 6TH SEM, Veerashaiva college Bellary Page 13
6. Book The Room
7. Stores in DB
8. Add/Payment/View record
9.Display of selected record SYSTEM
ADVANCED ROOM BOOKING

10. Logout

Figure 4: Sequence Diagram to represent the interaction between User and Room
Booking

DATABASE TABLES

Table 1: Database table dbo.bookr

ATTRIBUTES DATA TYPE SIZE


ID (id) Int 10
Fromdate ( fromd) Varchar
To date (tod) Varchar
Room no (roomno) Int 10
No of people (nopeople) Int 10
Amount (amnt) Int 10
Cust id (c_id) Int 10
Name (name) String 10
Contact (contact) Int 10
Address (addr) Varchar 50

Table 2: Database table dbo.staff

BCA 6TH SEM, Veerashaiva college Bellary Page 14


ADVANCED ROOM BOOKING SYSTEM

ATTRIBUTES DATATYPE SIZE

ID (id) Int 10

Name (name) String 10

Gender (gen) Varchar 10

Contact (contact) Int 10

Address (addr) Varchar 100

Salary Int 5

Designation (desig) Varchar 10

Table 3: Database table dbo.payment

ATTRIBUTES DATA TYPE SIZE

ID Int 10

Customer id (c_id) Int 10

Room id ( r_id) Int 10

Payment type (pay_type) Varchar 10

Table 4: Database table dbo.user

ATTRIBUTES DATA TYPE SIZE

ID (id) Int 10

Name Varchar 10

Contact Int 10

BCA 6TH SEM, Veerashaiva college Bellary Page 15


ADVANCED ROOM BOOKING SYSTEM

Email Varchar 20

Address ( addr) Varchar 100

Password (password) Int 10

E-R Diagram
Entity relationship diagram represents the object relationship pairs in graphical forms thus the
primary goal of ER diagram is to represent data objects along with their relationships.
ER model for data users three features to describe the data:

• Entities which satisfy distinct real-world items in an application.


• Relationships connecting different entities and representing meaningful dependencies
between them.
• Attributes which specify various properties of entities and relations involved in a
system.

BCA 6TH SEM, Veerashaiva college Bellary Page 16


ADVANCED ROOM BOOKING SYSTEM

IMPLIMENTATION

Implementation is the stage of the project when the theoretical design is turned into working
system. It can be the most critical stage in achieving a successful new system and in giving the
user, confidence that the new system will work and effective. The goal of the coding phase is
to translate the design into code in the given programming language. The coding steps
translate the detailed design of the system into programming language. The translation process
continues when the compiler accepts source code as input and produces machine dependent
object code as output. Linking of object files are done to produce the machine code. Internal

BCA 6TH SEM, Veerashaiva college Bellary Page 17


ADVANCED ROOM BOOKING SYSTEM

documentation is another important factor, to facilitate others to understand the code and the
logic.

Programming Language Incorporated

Introduction to C#

C# is a general-purpose, modern, and object-oriented programming language pronounced as


“C Sharp”. It was developed by Microsoft led by Anders Hejlsberg and his team within
the .Net initiative and was approved by the European Computer Manufactures Association
(ECMA) and International Standards Organization (ISO). C# is among the languages for
Common Language Infrastructure. C# is a lot similar to Java syntactically and is easy for
users who have knowledge of C, C++, OR Java. C# is designed to work with Microsoft’s .Net
platform, which is a runtime support environment. Microsoft aim is to facilitate the exchange
of information and services over the web, and to enable developers to build highly portable
applications. C# simplifies programming language through its use of Extensible Mark-up
Language (XML) and Simple Object Access Protocol (SOAP) without requiring programmer
to write additional code.

Microsoft Visual Studio

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is


used to develop computer programs, as well as websites, web apps, web services and mobile
applications. Visual Studio uses Microsoft software development platforms such as windows
API, windows forms, windows presentation foundation, windows, and Microsoft Silver light.
It can produce both native code and managed code. Visual Studio includes a code editor
supporting Intelligence (the code completion component) as well as code refactoring. The
integrated debugger works both as a source-level debugger and a machine level debugger.

BCA 6TH SEM, Veerashaiva college Bellary Page 18


ADVANCED ROOM BOOKING SYSTEM

Other built-in tools include a code profiler, designer for building GUI applications, web
designers, class designers, and database schema designer. It accepts plug-ins that enhance the
functionality at most every level-including adding support for source control systems (like
Subversion and Git) and adding new toolsets like editors and visual designers for domain
specific languages or toolsets for other aspects of the software development lifecycle (like the
Azure DevOps client: Team Explorer).

Visual Studio supporter 36 different programming languages and allows the code editor and
debugger to support (to varying degrees) nearly any programming language, provided a
language -specific service exists. Built-in languages include C, C++, C++/CLI, Visual
Basic.Net, C#, F#, JavaScript, Typescript, XML, XSLT, HTML, and CSS. Support for other
languages such as Python, Ruby, Node.js among others is available via plugins. Java (and J#)
was supported in the past. The most basic edition of Visual Studio, the Community edition, is
available free of charge. The slogan for Visual Studio Community edition is “Free and fully
featured IDE” for students, open-source and individual developers.

SQL Server Management Studio

SQL Server Management Studio (SSMS) is a software application first launched with
Microsoft SQL Server 2005 that is used for configuring, managing, and administrating all
components within Microsoft SQL Server. It’s the successor to the Enterprise Manager in SQL
2000 or before. The tool includes both script editors and graphical tools which work with
objects and features of the server.

A central feature of SSMS is the Object Explorer, which allows the user to browse, select, and
act upon any of the objects within the server. It also shipped a separate Express edition that
could be freely downloaded, however recent versions of SSMS are fully capable of connecting
to and manage any SQL Server Express instance.

BCA 6TH SEM, Veerashaiva college Bellary Page 19


ADVANCED ROOM BOOKING SYSTEM

SAMPLE CODING

using System; using


System.Collections.Generic; using
System.ComponentModel; using
System.Data; using
System.Drawing; using
System.Linq; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace AdvancedRoomBookingSystemCSharp

BCA 6TH SEM, Veerashaiva college Bellary Page 20


ADVANCED ROOM BOOKING SYSTEM

{ public partial class Form1 :


Form
{ public
Form1()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)


{
RegisterUser obj = new RegisterUser();
obj.ShowDialog();
}

private void button1_Click(object sender, EventArgs e)


{
if (comboBox1.SelectedIndex == 0)
{
if (textBox1.Text == "shri" && textBox2.Text == "1234")
{
MessageBox.Show("You are logged in successfully..");
this.Visible = false;
Home obj1 = new Home();
obj1.ShowDialog(); textBox1.Text
= ""; textBox2.Text = "";
comboBox1.Text = "--Select--";
}
else
{
MessageBox.Show("Invalid Username Or Password.");
}
}
else if (comboBox1.SelectedIndex == 1)
{

BCA 6TH SEM, Veerashaiva college Bellary Page 21


ADVANCED ROOM BOOKING SYSTEM

SqlConnection con = new SqlConnection(@"Data


Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo
mBookingSystemCSharp\room.mdf;Integrated Security=True"); con.Open();
string str = "SELECT id FROM user1 WHERE name = '" + textBox1.Text + "' and pass = '" +
textBox2.Text + "'";
SqlCommand cmd = new SqlCommand(str, con);
SqlDataReader dr; dr = cmd.ExecuteReader();
if (dr.Read())
{
this.Visible = false;
Home2 obj2 = new Home2();
obj2.ShowDialog(); textBox1.Text
= ""; textBox2.Text = "";
comboBox1.Text = "--Select--";
}
else
{
MessageBox.Show("Invalid username and Password.");
}
}
}

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !(char.IsLetter(e.KeyChar) || e.KeyChar == (char)Keys.Back);
}

private void textBox2_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}
}

BCA 6TH SEM, Veerashaiva college Bellary Page 22


ADVANCED ROOM BOOKING SYSTEM

} using System; using


System.Collections.Generic; using
System.ComponentModel; using
System.Data; using
System.Drawing; using
System.Linq; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace AdvancedRoomBookingSystemCSharp
{ public partial class Home :
Form
{
public Home()
{
InitializeComponent();
}

private void viewBookingToolStripMenuItem_Click(object sender, EventArgs e)


{
ViewBooking obj = new ViewBooking();
obj.ShowDialog();
}

private void viewUsersToolStripMenuItem_Click(object sender, EventArgs e)


{
ViewUser obj1 = new ViewUser();
obj1.ShowDialog();
}

private void addStaffToolStripMenuItem_Click(object sender, EventArgs e)


{
AddStaff obj2 = new AddStaff();
obj2.ShowDialog();

BCA 6TH SEM, Veerashaiva college Bellary Page 23


ADVANCED ROOM BOOKING SYSTEM

private void logoutToolStripMenuItem_Click(object sender, EventArgs e)


{
this.Visible = false;
Form1 obj3 = new AdvancedRoomBookingSystemCSharp.Form1();
obj3.ShowDialog();
}
}
} using System; using
System.Collections.Generic; using
System.ComponentModel; using
System.Data; using
System.Drawing;
using System.Linq; using
System.Text; using
System.Threading.Tasks; using
System.Windows.Forms;

namespace AdvancedRoomBookingSystemCSharp
{ public partial class Home2 :
Form
{
public Home2()
{
InitializeComponent();
}

private void bookRoomToolStripMenuItem_Click(object sender, EventArgs e)


{
BookRoom obj = new AdvancedRoomBookingSystemCSharp.BookRoom();
obj.ShowDialog();
}

BCA 6TH SEM, Veerashaiva college Bellary Page 24


ADVANCED ROOM BOOKING SYSTEM

private void paymentToolStripMenuItem_Click(object sender, EventArgs e)


{
Payment obj1 = new Payment();
obj1.ShowDialog();
}

private void viewBookingToolStripMenuItem_Click(object sender, EventArgs e)


{
ViewBooking obj2 = new AdvancedRoomBookingSystemCSharp.ViewBooking();
obj2.ShowDialog();
}

private void logoutToolStripMenuItem_Click(object sender, EventArgs e)


{
this.Visible = false;
Form1 obj3 = new AdvancedRoomBookingSystemCSharp.Form1();
obj3.ShowDialog();
}
}
} using System; using
System.Collections.Generic; using
System.ComponentModel; using
System.Data; using
System.Drawing; using
System.Linq; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace AdvancedRoomBookingSystemCSharp
{ public partial class BookRoom :
Form
{
public BookRoom()

BCA 6TH SEM, Veerashaiva college Bellary Page 25


ADVANCED ROOM BOOKING SYSTEM

{
InitializeComponent();
}

private void textBox7_TextChanged(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(@"Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo
mBookingSystemCSharp\room.mdf;Integrated Security=True");

con.Open();
if (textBox7.Text != "")
{
try
{
string getCust = "select name,contact,addr from user1 where id=" +
Convert.ToInt32(textBox7.Text) + " ;";

SqlCommand cmd = new SqlCommand(getCust, con);


SqlDataReader dr; dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox9.Text = dr.GetValue(0).ToString();
textBox8.Text = dr.GetValue(1).ToString();
textBox10.Text = dr.GetValue(2).ToString();
}
else
{
MessageBox.Show(" Thid Id's Customer is not recorded... ");
textBox7.Text = "";
}
}
catch (SqlException excep)

BCA 6TH SEM, Veerashaiva college Bellary Page 26


ADVANCED ROOM BOOKING SYSTEM

{
MessageBox.Show(excep.Message);
}
con.Close();
}
}
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo
mBookingSystemCSharp\room.mdf;Integrated Security=True"); con.Open();
string gen = string.Empty;

try
{
string str = "INSERT INTO
bookr(fromd,tod,roomno,nopeople,amnt,c_id,name,contact,addr) VALUES('" + textBox2.Text
+ "','" + textBox3.Text + "','" + textBox5.Text + "','" + textBox4.Text + "','" + textBox6.Text +
"','" + textBox7.Text + "','" + textBox9.Text + "','" + textBox8.Text + "','" + textBox10.Text +
"'); ";

SqlCommand cmd = new SqlCommand(str, con);


cmd.ExecuteNonQuery();

//-------------------------------------------//

string str1 = "select max(Id) from bookr;";

SqlCommand cmd1 = new SqlCommand(str1, con);


SqlDataReader dr = cmd1.ExecuteReader(); if
(dr.Read())
{

BCA 6TH SEM, Veerashaiva college Bellary Page 27


ADVANCED ROOM BOOKING SYSTEM

MessageBox.Show("Room Booking Information Saved Successfully..");


textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
textBox5.Text = ""; textBox6.Text = ""; textBox7.Text = "";
textBox8.Text = ""; textBox9.Text = ""; textBox10.Text =
"";
}
}
catch (SqlException excep)
{
MessageBox.Show(excep.Message);
}
con.Close();
}
private void button2_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo
mBookingSystemCSharp\room.mdf;Integrated Security=True");

con.Open(); if
(textBox1.Text != "")
{
try
{ string
getCust = "select
fromd,tod,roomno,nopeople,amnt,c_id,name,contact,addr from bookr where id=" +
Convert.ToInt32(textBox1.Text) + " ;";
SqlCommand cmd = new SqlCommand(getCust, con);
SqlDataReader dr; dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox2.Text = dr.GetValue(0).ToString();
textBox3.Text = dr.GetValue(1).ToString(); textBox5.Text

BCA 6TH SEM, Veerashaiva college Bellary Page 28


ADVANCED ROOM BOOKING SYSTEM

= dr.GetValue(2).ToString(); textBox4.Text =
dr.GetValue(3).ToString(); textBox6.Text =
dr.GetValue(4).ToString(); textBox7.Text =
dr.GetValue(5).ToString(); textBox9.Text =
dr.GetValue(6).ToString(); textBox8.Text =
dr.GetValue(7).ToString(); textBox10.Text =
dr.GetValue(8).ToString();
}
else
{
MessageBox.Show(" Sorry, This ID, " + textBox1.Text + " Booking Room
Record is not Available. "); textBox1.Text = "";
}
}
catch (SqlException excep)
{
MessageBox.Show(excep.Message);
}
con.Close();
}
}

private void button3_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(@"Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo
mBookingSystemCSharp\room.mdf;Integrated Security=True"); con.Open();
try
{
string str = " Update bookr set fromd='" + textBox2.Text + "',tod='" + textBox3.Text
+ "',roomno='" + textBox5.Text + "',nopeople='" + textBox4.Text + "',amnt='" +
textBox6.Text + "',c_id='" + textBox7.Text + "',name='" + textBox9.Text + "',contact='" +
textBox8.Text + "',addr='" + textBox10.Text + "' where id='" + textBox1.Text + "'";

BCA 6TH SEM, Veerashaiva college Bellary Page 29


ADVANCED ROOM BOOKING SYSTEM

SqlCommand cmd = new SqlCommand(str, con);


cmd.ExecuteNonQuery();

string str1 = "select max(id) from bookr;";


SqlCommand cmd1 = new SqlCommand(str1, con);
SqlDataReader dr = cmd1.ExecuteReader(); if
(dr.Read())
{
MessageBox.Show("" + textBox1.Text + "'s Details is Updated Successfully.. ",
"Important Message");
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox5.Text = "";
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";
textBox9.Text = "";
textBox10.Text = "";
}
}
catch (SqlException excep)
{
MessageBox.Show(excep.Message);
}
con.Close();
}
private void BookRoom_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data
Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\User\Downloads\kashipar
a.com_advancedroombookingsystemc\AdvancedRoomBookingSystemCSharp\AdvancedRoo

BCA 6TH SEM, Veerashaiva college Bellary Page 30


ADVANCED ROOM BOOKING SYSTEM

mBookingSystemCSharp\room.mdf;Integrated Security=True"); con.Open();


string str1 = "select max(id) from bookr;";
SqlCommand cmd1 = new SqlCommand(str1, con);
SqlDataReader dr = cmd1.ExecuteReader(); if
(dr.Read())
{
string val = dr[0].ToString();
if (val == "")
{
textBox1.Text = "1";
}
else {
int a;
a = Convert.ToInt32(dr[0].ToString());
a = a + 1; textBox1.Text =
a.ToString();
}
}
con.Close();
}

private void textBox9_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !(char.IsLetter(e.KeyChar) || e.KeyChar == (char)Keys.Back);
}

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}

private void textBox5_TextChanged(object sender, EventArgs e)


{

BCA 6TH SEM, Veerashaiva college Bellary Page 31


ADVANCED ROOM BOOKING SYSTEM

}
private void textBox5_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}
private void textBox4_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}

private void textBox6_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}
private void textBox7_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}

private void textBox8_KeyPress(object sender, KeyPressEventArgs e)


{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}
}}

BCA 6TH SEM, Veerashaiva college Bellary Page 32


ADVANCED ROOM BOOKING SYSTEM

SYSTEM TESTING

System testing is a level of testing that validates the complete and fully integrated software
product. The purpose of a system test is to evaluate the end-to-end system specifications. It
involves two kinds of testing integration testing and acceptance testing.

Integration testing is a level of software testing where individual units are combined and tested
as a group. Acceptance testing is a level of software testing where a system is tested for
acceptability.

Software Testing

Software testing is designed as an activity to check whether the actual results match the
expected results and to ensure that the software system is Defect free. It involves execution of
a software component or system component to evaluate one or more properties of interest.
Software testing also helps to identify errors, gaps, or missing requirements in contrary to the
actual requirements.

Why is Software Testing is Important?

• Testing the fully integrated applications including external peripherals in order to


check how components interact with one another and with the system as a whole. This
is also called End to End testing scenario.
• Verify through testing of every input in the application to check for desired outputs.
• Testing of the user’s experience with the application.

Testing Objectives

1. Finding defects which may get created by the programmer while developing the
software.
2. Gaining confidence in and providing information about the level of quality
3. To prevent defects.
4. To make sure that the result meets the business and user requirements.
5. To ensure that it satisfies the BRS that is Business Requirement Specification and SRS
that is System Requirement Specifications.
6. To gain the confidence of the customers by providing them a quality product.

Testing Strategies

BCA 6TH SEM, Veerashaiva college Bellary Page 33


ADVANCED ROOM BOOKING SYSTEM

1. Unit Testing
It is a process of testing a programming component such as objects, methods etc.
Where it is used:
• To check and set the values of all attributes associated with the object.
• To test all the operations associated with the object.
• To put the object into all possible states.

There are many modules like Login module, Add Staff module, Room Booking
module, Payment module, View module.

2. Integration Testing
It is a level of software testing where individual units are combined and tested as a
group. The purpose of this level of testing is to expose faults in the interaction between
integrated units. The number of text fields specified in the design should match with
the number of entities in the database.
3. System Testing
Here the entire software system is tested. The reference document for this process is
the requirements document, and the goals to see if software meets its requirements.
The software has been tested against requirements of project and it is checked whether
all requirements of project have been satisfied or not.
4. Validation Testing
The process of evaluating software during the development process to determine
whether it satisfies specified requirements. Validation Testing ensures that the product
actually meets the client’s needs. It can also be defined as to demonstrate that the
product fulfils its intended use when deployed on appropriate environment.
5. Black Box Testing
It considers a module as a single unit and checks the unit at interface and
communication with other modules rather getting into details at statement level.
6. White Box Testing
This is a unit testing method where a unit will be taken at a time and tested thoroughly
at a statement level to find the maximum possible errors.

OUTPUT SCREENS

BCA 6TH SEM, Veerashaiva college Bellary Page 34


ADVANCED ROOM BOOKING SYSTEM

Login Page

Home Page

BCA 6TH SEM, Veerashaiva college Bellary Page 35


ADVANCED ROOM BOOKING SYSTEM

Add Staff Page

View RoomBookingPage

BCA 6TH SEM, Veerashaiva college Bellary Page 36


ADVANCED ROOM BOOKING SYSTEM

View User Page

Home Page 2

BCA 6TH SEM, Veerashaiva college Bellary Page 37


ADVANCED ROOM BOOKING SYSTEM

Room Booking Page

Payment Page

BCA 6TH SEM, Veerashaiva college Bellary Page 38


ADVANCED ROOM BOOKING SYSTEM

CONCLUSION

The Advanced Room Booking System is designed and implemented to reach the functional
requirements and objectives of the end user. The system is secured by providing the
authenticated 4-digit password, which is the gateway of application. The customer can reserve
a room in a secured mannered use the application at any time in any place. This system is
designed to benefit all its customers to use in more effective and authenticated way. This
Room Booking System will provide the environment in which new enhancements can be
performed on it.

FUTURE ENHANCEMENT
The following enhancements can be done for the project.
• Use of Bio-metric authentication (Fingerprint) can improve more security.
• Mini statement field can be added for the application.
• Improved GUI can be updated.

BIBLIOGRAPHY
Books Referred

• C#.NET-Wrox Publications
• Object Oriented System Development-Ali Bahrami
• C# in Depth-Skeet

Websites Referred

• www.google.com
• www.youtube.com
• https://code-projects.org/c/languages/project/c-sharp-projects/
• www.kashipara.com

BCA 6TH SEM, Veerashaiva college Bellary Page 39

You might also like