Вы находитесь на странице: 1из 4

Hotel Management System C#.

Net &
SQL CSE Final Year Project
November 15, 2011 by Thousand Projects

Hotel Management System


The Hotel Management System is developed to maintain the details of
Customer booking information, trace the details of customer also maintain the
information about the hotel room availability.
Using this project users may know all the details which is provided by the
Hotel Management System. Users can view the availability of rooms and
dates for booking in advance.
In the same way in this project one more user is involved he is most important
person who is able to controlling all the information and also make the
necessary changes when they raised is called Administrator . He can do the
updates and set the prices regarding the rooms and change the users name
and password such type of all these things are made by the Administrator
level
The Hotel Management System provides following features.
1.Check In Details of Customer
2.Customer Booking Details
3.Rooms Availability Information
4.Check Out details
5.Searching the details of Customer.
This application is developed by using windows application in C#.Net .
Software and Hardware Requirements
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;

using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class customer_CostomerRegistration : System.Web.UI.Page
{
SqlConnection
con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString)
;
SqlCommand cmd;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Label1.Text == "Username is Available.")
{
if (TextBox1.Text != "" && TextBox2.Text != "")
{
cmd = new SqlCommand("insert into
tbl_login(uname,password,gender,email,status,type,cdate)values('"+TextBox1.Text+"','"+Tex
tBox2.Text+"','"+DropDownList1.SelectedItem.ToString()
+"','"+TextBox5.Text+"','Activate','Customer',getdate())", con);
con.Open();
int user = cmd.ExecuteNonQuery();
con.Close();
if (user == 1)
{
cmd = new SqlCommand("insert into

tbl_contact(uid,country,state,city,contactno,cdate)values(" +
Convert.ToInt32(GetUid(TextBox1.Text)) + ",'" + TextBox6.Text + "','" +
TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "',getdate())", con);
user = 0;
con.Open();
user = cmd.ExecuteNonQuery();
if (user == 1)
{
string s = "Your Registration successfully completed.";
Response.Redirect("~/customer/CustomerLogin.aspx?rconfirm=" + s.ToString());
}
}
}
}
else
{
Label2.Text = "The Username is already taken.Choose another Name.";
}
}
private int GetUid(string uname)
{
cmd = new SqlCommand("select uid from tbl_login where uname='" + uname.ToString() + "'
and type='Customer' ", con);
con.Open();
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
int n = 0;
if (dr.Read())
{
n= Convert.ToInt32(dr[0].ToString());
}
dr.Close();
return n;
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{

cmd = new SqlCommand("select uname from tbl_login where uname='" +


TextBox1.Text + "' and type='Customer' ", con);
con.Open();
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
if (dr.Read())
{
Label1.Text = "Username is not Available.";
Label1.BackColor = System.Drawing.Color.Red;
TextBox1.Focus();
}
else
{
Label1.Text = "Username is Available.";
Label1.BackColor = System.Drawing.Color.Green;
TextBox2.Focus();
}
dr.Close();
}
}

Software Requirements:
Operating System : Windows 2000/xp/Vista
Front End Software
Database

: Microsoft Visual studio 2005, C#.Net

: Microsoft SQL Server 2005

Hardware Requirements:
Processor

: Pentium 4.0(1.6 GHz) and Higher

Memory

: 256 MB

Hard Disk

: 40 GB

Download Hotel Management System C#.Net & SQL CSE Final Year Project

Вам также может понравиться