Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PROJECT REPORT ON
HOTEL MANAGEMENT
Submitted in Partial Fulfilment of Requirement
For the Degree of
SESSION 2014-15
PROJECT GUIDE:-
SUBMITTED BY:-
RIZWAN MUSTAFA
BCA 6TH SEM
(LECTUReR)
(COMPUTER APPLICATION DEPtt.)
Certificate
This is to certify that the project report
entitled HOTEL MANAGEMENT SYSTEM
has
been
completed
MUSTAFA.
RIZWAN
by
at
department
of
Computer
is
to
certify
that
the
above
Project Guide-
ACKNOWLEDGEMENT
Computers are magnificent tools for the realization of our
dreams, but no machine can replace the human spark of spirit,
compassion, love, and understanding. Thanks God, the
merciful and the passionate, for providing us the opportunity
to step in the excellent world of computer science.
Thanks goes to our project guide MR.ASIF MUSTAFA
Thank You
(RIZWAN MUSTAFA)
PREFACE
TABLE OF CONTENTS
1. INTRODUCTION
OPERATION ENVIRONMENT
OBJECTIVE
7
8
9
2.VISUAL BASIC
10
3. PROBLEM DEFINITION
11
4. SOFTWARE DESIGN
12
5. FEASIBILITY STUDY
12
14-15
16-18
19-21
9. VALIDATION CHECKS
22-23
24-32
11. TABLE
33-37
38-51
13. CODING
52-85
86-89
15. EVALUATION
90-92
16. CONCLUSION
93
6
17. REFERENCES
94
INTRODUCTION OF HOTEL
A hotel is an establishment that provides lodging paid on
a short term basis. Facilities provided may range from a basic bed and
storage for clothing , to luxury features like en-suite bathrooms .Larger
hotels may provided additional guest facilities such as a swimming pool,
business centre, childcare , conference facilities and social function
services.
Hotel rooms are usually numbered (or named in some smaller hotels
and B&Bs) to allow guests to identify their room. Some hotels offer
meals as part of a room and board arrangement. In the United
Kingdom , a hotel is required by law to serve food and drinks to all
guests within certain stated hours. In Japan, capsule hotels provided a
minimized amount of room space and shared facilities.
An upscale full service hotel facilities that offers luxury amenities , full
service accommodation ,on-site full service restaurant(s),and the highest
level of personalized and professional service. Luxury Hotels are
normally classified with at least a four Diamond or five Diamond status
or a four or Five Star rating depending on the country and local
classification standards . Examples may include : Waldorf Astoria , Four
Seasons, Conrad ,Fairmont ,and Ritz Carlton.
Full service hotels often contain upscale full-service facilities with a large
volume of full service accommodation
OPERATION ENVIRONMENT
PROCESSOR
OPERATING SYSTEM
MEMORY
WINDOW 7,
1GB RAM OR ROME
DATABASE
OBJECTIVE
Our team has decided to work on a PROJECT on a very
interesting topic HOTEL MANGEMENT SYSTEM that keeps
all the maintenance records of entry data. The system will be
very much prevalent in coming times to help the users in their
operations in connection with security.
Our objectives here is to automate all above activities used in
software in user friendly manner to entertain user and given
rise to their knowledge and also to eliminate the difficulties.
10
PROBLEM DEFINITION
Our project attempts to replace the tedious and time space
consuming paper and pen work with the easy to use, time, space
saving computerized system.
When we start to work on this project we thought to give
emphasis only on Hotel Management System. When we want to
collect data from companies/colleges. We notice numbers of
shortcomings in the existing system.
After passing all the phase of a software development, we
were able to fulfil the shortcoming of the Hotel Management
System.
Simple interface of the system let one to work easily. All the
authority and security of the software let one to work easily. All the
authority and security if the software highly checked.
11
SOFTWARE DESIGN
OBJECTIVE OF DESIGN:
FEASIBILITY STUDY
A procedure that identifies, describes and evaluates
candidate systems and selects the best system for the job is
called as Feasibility Study.
Three key considerations are involved in the feasibility analysis:
1. Technical Feasibility
2. Economic Feasibility
3. Behavioural Feasibility
12
1. TECHNICAL FEASIBILITY
The use of Microsoft Visual Studio .NET makes form design
easy and convenient. The project can be run on any system with
minimum requirements. It reduces data entry errors because of data
entry validation, it can be easily handled by any user, and it also helps in
faster form design. Also the project database though developed in SQL
SERVER 2005, it is very easy to operate. Hence the project is technically
feasible.
2. ECONOMIC FEASIBILITY
Cost benefit analysis is very important in deciding whether the project is
economically feasible or not. It is alone sufficient to save our time and
money. It is one time investment and does not require regular
maintenance. Through cost benefit analysis it was concluded that the
benefits outweigh costs and thus the project is economically feasible.
3.BEHAVIOURAL FEASIBILITY
Behavioural feasibility determines how much effort will go into
educating, selling and training the user staff on a candidate system. The
project was also evaluated to be behaviourally feasible as it is very userfriendly and hardly needs any extra efforts to educate user for its utility
and functioning.
13
14
15
Lack of security:
In the current system all the transaction are handled
manually so it is not very much safe on account of keeping records of
keeping record secured so that anyone cannot make any wrong
manipulation with that and also cannot spoil the record. The files in
which information is stored can be stolen or destroyed by the third party.
They may also be damaged due to the natural problems such they may
16
caught fire or rates may also bite them. It is also very easy for one
information stored in the file.
Information overload:
In current system there is information overload because all the
processing of transaction and records keeping system is manual. In
current system all the details of regarding retailers, inventory, billing and
orders are kept manually, so it increases the number of files for keeping
all these records.
Data redundancy:
It means that same data fields appear in many files and often
in different formats. In manual system. It poses quit a big problem
because the data has to be maintained in large volumes but in our
system. This problem can be overcome by providing the condition if the
data entered is duplicate. It will not be entered otherwise updating will
take place.
17
SOFTWARE REQUIREMENTS
Operating system- Windows 98 is used as the operating
system as it is stable and supports more features and is
more users friendly.
.NET Framework 2.0 / 3.5.
Database SQL Server 2005- SQL Server 2005 is used as
database as it easy to maintain and retrieve records by
simple queries which are in English language which are
easy to understand and easy to write.
HARDWARE REQUIREMENTS
Intel dual core is used as a processor because it is fast
than other processors to provide reliable and stable and
we can run our pc for long time.
By using this processor we can keep on developing our
project without any worries.
Ram 1 GB is used as it will provide fast reading and
writing capabilities and will in turn support in
processing.
18
I. Requirements Specification:
A Software Requirements Specification is a complete
description of the behaviour of a system to be developed. It
includes a set of use cases that describe all the interactions the
users will have with the software.
We studied the requirement and specification provided by
client & list out all the functional requirement of project that
would be implemented from our side. We also suggest client
some good functionality like contact import.
19
20
V. Software deployment:
Software deployment is all of the activities that make a
software system available for use. The general deployment
process consists of several interrelated activities with possible
transitions between them. These activities can occur at the
producer site or at the consumer site or both. Because every
software system is unique, the precise processes or procedures
within each activity can hardly be defined. Therefore,
"deployment" should be interpreted as a general process that has
to be customized according to specific requirements or
characteristics.
21
VALIDATION CHECKS
Under validation we have provided certain constraints
and primary keys to few fields of the tables of the database
used in application. This validation made at database level is
listed below:
Not null:
22
Numeric only:
Numeric only constraints restrict field to have numeric
values only. Otherwise it violates the rule.
Character only:
It restricts the field to accept only character value.
Date:
The valid date with valid format should be enter in the
given textbox.
Email:
The @ Symbol is required in this field otherwise it will
not work properly
23
24
25
26
27
28
Update Table
process
29
30
Processing
4
Close
Database
3
Computer Bills
Cash
CUSTOMER
31
32
TABLES
33
CHANGE PASSWORD
34
35
CUSTOMER DETAIL
36
37
38
39
LOGIN IMAGE
40
41
42
43
44
45
46
PARKING IMAGE
47
48
49
CHECKOUT IMAGE
50
51
CODING
52
SPLASH CODING
using
using
using
using
using
using
using
using
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form12 : Form
{
public Form12()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
progressBar1.Value = progressBar1.Value+1;
if (progressBar1.Value == 100)
{
timer1.Enabled = false;
Form1 f1 = new Form1();
f1.Show();
this.Hide();
}
}
}
}
53
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form1()
{
InitializeComponent();
}
54
MessageBox.Show("login Successfull");
Form3 f3 = new Form3();
f3.Show();
this.Hide();
}
else
{
MessageBox.Show("Check Username or Password", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
55
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form14 : Form
{
SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
string s1, s2;
public Form14()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
try
{
con = new SqlConnection(cs);
con.Open();
string qr = "select * from security where security_question='" +
comboBox1.Text + "'";
cmd = new SqlCommand(qr, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
s1 = dr[0].ToString();
s2 = dr[1].ToString();
}
56
}
catch (Exception A)
{
MessageBox.Show(A.Message);
}
57
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Data.SqlClient;
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
SqlConnection con;
SqlCommand cmd;
SqlDataReader dr;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
String s1, s2;
public Form2()
{
InitializeComponent();
}
private void button3_Click_1(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(cs);
con.Open();
string sql = "select * from login";
cmd = new SqlCommand(sql, con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
s1 = dr[0].ToString();
s2 = dr[1].ToString();
}
if (textBox1.Text == s1)
{
if (textBox2.Text == s2)
{
if (textBox3.Text != "" && textBox4.Text != "")
{
if (textBox3.Text == textBox4.Text)
{
SqlConnection con1 = new SqlConnection(cs);
con1.Open();
string str1 = "update login set password='" +
textBox4.Text + "'";
SqlCommand cmd1 = new SqlCommand(str1, con1);
cmd1.ExecuteNonQuery();
MessageBox.Show(" Password Successful change");
}
else
MessageBox.Show("Plese Check Your Confirm Password. . . .
58
.");
}
else
MessageBox.Show("Please Enter New and Confirm Password. . . .
.");
}
else
MessageBox.Show("Plese Enter Correct Password. . . . .");
con.Close();
}
else
MessageBox.Show("Plese select Correct user type. . . . .");
con.Close();
59
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void button12_Click(object sender, EventArgs e)
{
Form4 f4 = new Form4();
f4.ShowDialog();
}
private void button13_Click(object sender, EventArgs e)
{
Form5 f5 = new Form5();
f5.ShowDialog();
}
60
61
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form4 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form4()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length == 0 || textBox2.Text.Length == 0 || textBox3.Text.Length ==
0 || comboBox1.Text.Length == 0 || dateTimePicker1.Text.Length == 0 || textBox4.Text.Length
== 0 || textBox5.Text.Length == 0 || textBox6.Text.Length == 0 || textBox7.Text.Length == 0
|| textBox8.Text.Length == 0 || textBox9.Text.Length == 0 || textBox10.Text.Length == 0)
{
MessageBox.Show("Please Fill All Entries");
}
else
{
try
{
con = new SqlConnection(cs);
con.Open();
string str = "insert into customer_detail values('" + textBox1.Text + "','" +
textBox2.Text + "','" + textBox3.Text + "','" + comboBox1.Text + "','" + dateTimePicker1.Text
+ "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text +
"','" + textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "')";
cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();
MessageBox.Show("Record Submitted");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
62
try
{
con = new SqlConnection(cs);
con.Open();
string st = "select isnull(max(customer_id),0)+001 from
customer_detail";
cmd = new SqlCommand(st, con);
int sr = Convert.ToInt32(cmd.ExecuteScalar());
textBox1.Text = Convert.ToString(sr);
con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
63
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form5 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
string s1,s2;
public Form5()
{
InitializeComponent();
}
private void button8_Click(object sender, EventArgs e)
{
this.Close();
Form3 f = new Form3();
f.Show();
}
private void button1_Click(object sender, EventArgs e)
{
}
private void button4_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(cs);
con.Open();
string sql = "select * from check_in";
cmd = new SqlCommand(sql, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
s1 = dr[10].ToString();
s2 = dr[0].ToString();
}
if (comboBox1.Text == s1)
{
if (textBox1.Text == s2)
{
MessageBox.Show("room is already reserve");
64
else
{
if (textBox1.Text.Length == 0 || textBox2.Text.Length == 0 || textBox3.Text.Length
== 0 || textBox4.Text.Length == 0 || textBox5.Text.Length == 0 || textBox6.Text.Length == 0
|| numericUpDown1.Text.Length == 0 || numericUpDown2.Text.Length == 0 ||
dateTimePicker1.Text.Length == 0 || textBox7.Text.Length == 0 || comboBox1.Text.Length ==
0 || comboBox2.Text.Length == 0 || comboBox3.Text.Length == 0 || textBox8.Text.Length ==
0 || textBox9.Text.Length == 0)
{
MessageBox.Show("Please Fill All Entries");
}
else
{
try
{
con = new SqlConnection(cs);
con.Open();
string str = "insert into check_in values('" + textBox1.Text + "','" +
textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" +
textBox6.Text + "','" + numericUpDown1.Text + "','" + numericUpDown2.Text + "','" +
dateTimePicker1.Text + "','" + textBox7.Text + "','" + comboBox1.Text + "','" +
comboBox2.Text + "','" + comboBox3.Text + "','" + textBox8.Text + "','" + textBox9.Text +
"')";
cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();
MessageBox.Show("Record Submitted");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
private void textBox7_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsNumber(e.KeyChar) | char.IsControl(e.KeyChar))
e.Handled = false;
else
e.Handled = true;
}
private void textBox8_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsNumber(e.KeyChar) | char.IsControl(e.KeyChar))
e.Handled = false;
else
e.Handled = true;
}
private void textBox9_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsNumber(e.KeyChar) | char.IsControl(e.KeyChar))
e.Handled = false;
65
else
e.Handled = true;
}
private void button7_Click(object sender, EventArgs e)
{
new Form13().ShowDialog();
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
string str = Convert.ToString(comboBox1.SelectedItem);
if (comboBox2.SelectedItem == "AC")
{
textBox8.Text = "1500";
}
else
{
textBox8.Text = "1000";
}
66
else
{
MessageBox.Show("Check Barrower ID", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
67
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form13 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form13()
{
InitializeComponent();
}
private void Form13_Load(object sender, EventArgs e)
{
con = new SqlConnection(cs);//connection string class=constring
con.Open();
string st = "select
customer_id,customer_name,gender,adults,childrens,contact_no,date,days,room_no,ac,floor,p
rice,amount from check_in ";
cmd = new SqlCommand(st, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
int J = da.Fill(ds, "check_in");
if (J > 0)
{
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "check_in";
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
68
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form8 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form8()
{
InitializeComponent();
}
69
textBox7.Text = dr[8].ToString();
textBox8.Text = dr[9].ToString();
}
else
{
MessageBox.Show("Check customer_ID", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
70
PARKING CODING
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form10 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form10()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length == 0)
{
MessageBox.Show("First Insert borrower ID");
return;
}
try
{
con = new SqlConnection(cs);
con.Open();
string sql = "select * from check_in where customer_id= '" +
textBox1.Text + "' ";
cmd = new SqlCommand(sql, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
MessageBox.Show("Record found");
textBox2.Text = dr[1].ToString();
}
else
{
MessageBox.Show("Check customer_ID", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
catch (Exception ex)
{
71
72
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form9 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
int a, b, c;
public Form9()
{
InitializeComponent();
}
a = Convert.ToInt32(textBox1.Text);
b = Convert.ToInt32(textBox2.Text);
c = a * b;
textBox3.Text = Convert.ToString(c);
73
textBox6.Text = Convert.ToString(c);
d = Convert.ToInt32(textBox3.Text);
f = Convert.ToInt32(textBox6.Text);
g = Convert.ToInt32(textBox9.Text);
h = Convert.ToInt32(textBox12.Text);
i = d + f + g + h;
textBox13.Text = Convert.ToString(i);
74
a = Convert.ToInt32(textBox23.Text);
b = Convert.ToInt32(textBox24.Text);
c = a * b;
textBox25.Text = Convert.ToString(c);
75
textBox45.Text = Convert.ToString(c);
76
con.Open();
string sql = "select * from check_in where customer_id= '" +
textBox54.Text + "' ";
cmd = new SqlCommand(sql, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
MessageBox.Show("Record found");
textBox55.Text = dr[1].ToString();
textBox56.Text = dr[10].ToString();
}
else
{
MessageBox.Show("Check customer_ID", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
77
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form7 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form7()
{
InitializeComponent();
}
private void button2_Click_1(object sender, EventArgs e)
{
new Form11().ShowDialog();
}
private void button4_Click(object sender, EventArgs e)
{
int a, b,c;
if (textBox1.Text.Length == 0)
{
MessageBox.Show("First Insert borrower ID");
return;
}
try
{
con = new SqlConnection(cs);
con.Open();
string sql = "select * from check_in where customer_id= '" +
textBox1.Text + "' ";
cmd = new SqlCommand(sql, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
MessageBox.Show("Record found");
textBox2.Text = dr[1].ToString();
comboBox1.Text = dr[2].ToString();
textBox3.Text = dr[3].ToString();
78
textBox4.Text = dr[4].ToString();
dateTimePicker1.Text = dr[8].ToString();
textBox5.Text = dr[9].ToString();
textBox6.Text = dr[10].ToString();
textBox7.Text = dr[11].ToString();
textBox8.Text = dr[12].ToString();
textBox9.Text = dr[13].ToString();
textBox12.Text = dr[14].ToString();
a = Convert.ToInt32(textBox5.Text);
b = Convert.ToInt32(textBox9.Text);
c = a * b;
textBox10.Text = Convert.ToString(c);
con = new SqlConnection(cs);
con.Open();
string sql1 = "select * from parking_detail where customer_id= '"
+ textBox1.Text + "' ";
cmd = new SqlCommand(sql1, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox11.Text = dr[3].ToString();
}
con = new SqlConnection(cs);
con.Open();
string sql2 = "select * from food where customer_id= '" +
textBox1.Text + "' ";
cmd = new SqlCommand(sql2, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox14.Text = dr[0].ToString();
}
}
else
{
MessageBox.Show("Check customer_ID", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
int z, y, x, w , u ;
private void button3_Click(object sender, EventArgs e)
79
z = Convert.ToInt32(textBox10.Text);
y = Convert.ToInt32(textBox12.Text);
x = Convert.ToInt32(textBox11.Text);
w = Convert.ToInt32(textBox14.Text);
u = w + x + z - y;
textBox13.Text = Convert.ToString(u);
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length == 0 || textBox2.Text.Length == 0 || comboBox1.Text.Length
== 0 || textBox3.Text.Length == 0 || textBox4.Text.Length == 0 ||
dateTimePicker1.Text.Length == 0 || dateTimePicker2.Text.Length == 0 ||
textBox5.Text.Length == 0 || textBox6.Text.Length == 0 || textBox7.Text.Length == 0 ||
textBox8.Text.Length == 0 || textBox9.Text.Length == 0 || textBox10.Text.Length == 0 ||
textBox11.Text.Length == 0 || textBox14.Text.Length == 0 || textBox12.Text.Length == 0 ||
textBox13.Text.Length == 0)
{
MessageBox.Show("Please Fill All Entries");
}
else
{
try
{
con = new SqlConnection(cs);
con.Open();
string str = "insert into check_out values('" + textBox1.Text + "','" +
textBox2.Text + "','" + comboBox1.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" +
dateTimePicker1.Text + "','" + dateTimePicker2.Text + "','" + textBox5.Text + "','" +
textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "','" +
textBox10.Text + "','" + textBox11.Text + "','" + textBox14.Text + "','" + textBox12.Text + "','"
+ textBox13.Text + "')";
cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();
MessageBox.Show("Record Submitted");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
80
81
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form15 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form15()
{
InitializeComponent();
}
private void Form15_Load(object sender, EventArgs e)
{
con = new SqlConnection(cs);//connection string class=constring
con.Open();
string st = "select
customer_id,customer_name,gender,contact_no,checkin_date,checkout_date,days,room_no,ac
,floor,price,room_amount,parking_charges,food_charges,advance_amount,grand_total from
check_out ";
cmd = new SqlCommand(st, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
int J = da.Fill(ds, "check_out");
if (J > 0)
{
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "check_out";
}
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
82
System;
System.Collections.Generic;
System.ComponentModel;
System.Data;
System.Data.SqlClient;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
System.Drawing.Imaging;
System.IO;
namespace WindowsFormsApplication1
{
public partial class Form11 : Form
{
SqlConnection con = null;
SqlCommand cmd = null;
SqlDataReader dr = null;
string fi;
string cs = "Data Source=localhost;Initial Catalog=HMS;User ID=sa";
public Form11()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox2.Text.Length == 0)
{
MessageBox.Show("First Insert borrower ID");
return;
}
try
{
con = new SqlConnection(cs);
con.Open();
string sql = "select * from check_out where customer_id= '" +
textBox2.Text + "' ";
cmd = new SqlCommand(sql, con);
dr = cmd.ExecuteReader();
if (dr.Read())
{
MessageBox.Show("Record found");
textBox3.Text = dr[1].ToString();
textBox4.Text = dr[8].ToString();
textBox5.Text = dr[16].ToString();
}
}
83
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
}
84
85
SYSTEM TESTING
The Form authentication collects user's credential and lets
the application use own logic to authenticate users. The collected user's
credential is validated using the list maintained by the application. The
application maintains its own user list either using <credential> element
in the web.config file or using database. The advantage of using form
authentication is that the users don't need to be the member of windows
network to have access to the application.
The access control mechanism to prevent unauthorized logging to the
system.
System checks the password under the particular user identification. The
computer permits the various resources to the authorized person.
To understand what measures are taken for security of application, first
we need to understand what kind of threats penetrates the security of
application. Errors and omission, disgruntled and dishonest employees,
external attacks and natural disasters.
Install the software on a clean system.
Check for proper operation of software.
Check for .dll file conflicts.
Check for registry entry problems.
Check for file conflicts.
Create Application item.
Push application to test station and check for proper operation.
After performing all the above steps it is justified as project has been
implemented successfully.
basically based on the client what they want to update in the software. In
the project evaluation the main thing is how the project will work and
how much better performance in the system. The project is windows
86
2. Integration Testing
The aim of the system testing process was to determine all defects in our
project .The program was subjected to a set of test inputs and various
observations were made and based on these observations it will be
decided whether the program behaves as expected or not.
Our Project went through two levels of testing
1. Unit Testing
2. Integration Testing
88
UNIT TESTING
Unit testing is undertaken when a module has been created and
successfully reviewed .In order to test a single module we need to
provide a complete environment i.e. besides the module we would
require
The procedures belonging to other modules that the module
under test calls.
Non local data structures that module accesses.
A procedure to call the functions of the module under test
with appropriate parameters.
Unit testing was done on each and every module
1. Test For the admin module
Testing admin login form-This form is used for login of
administrator of the system. In this we enter the username and
password if both are correct administration page will open
otherwise if any of data is wrong it will get redirected back to
the login form and again ask for username and password.
Book Addition- Admin can enter details of book and can add the
details to the main book table also he can view the books requests.
INTEGRATION TESTING
In this type of testing we test various integration of the project
module by providing the input. The primary objective is to test the
module interfaces in order to ensure that no errors are occurring
when one module invokes the other module.
89
EVALUATION
The Form authentication collects user's credential and
lets the application use own logic to authenticate users. The
collected user's credential is validated using the list maintained by
the application. The application maintains its own user list either
using <credential> element in the web.config file or using database.
The advantage of using form authentication is that the users don't
need to be the member of windows network to have access to the
application.
The access control mechanism to prevent unauthorized logging to
the system.
System checks
the
password
under
the
particular
user
90
Steps to Evaluate
Install the software on a clean system.
Check for proper operation of software.
Check for .dll file conflicts.
Check for registry entry problems.
Check for file conflicts.
Create Application item.
Push application to test station and check for proper
operation.
After performing all the above steps it is justified as project has
been implemented successfully.
91
92
93
CONCLUSION
No body is perfect, neither Man or computer
MANAGEMENT
MANAGEMENT
94
REFERENCES
BLACK BOOK:For C# .NET Professional C# .NET 2008 Mathew Macdonald
Publication (Black book) .
For MS SQL SERVER 2008
www.google.com
www.w3school.com
www.programmer2 programmer.com
95