Escolar Documentos
Profissional Documentos
Cultura Documentos
ROLLNO: - RTB901A10
INDEX:-
1) ABSTRACT
2) STUDY OF PROBLEM
7) FORM DESIGNING
8) CODING
DETAIL DESCRIPTION:-
1. Abstract: -
2. Study of Problem: -
Every project have front end and back end. The back end
is that whose dealing with our data stored in secondary storage device. The front
is interface of our project by this we can do our queries. To make this project we
are use MSACCESS for back end and c# for front end.
INTRODUCTION OF MSACCESS: -
ℵ The original concept of Access was for end users to be able to “access” data
from any source e.g.:- Outlook, ASCII, dBase, Paradox, FoxPro, SQL Server,
Oracle, ODBC, C# etc.
2) Then select the new file from file menu and select blank database give the
name to database and click on ok.
CUSDETAIL
CUSID CUSROMNO CUSNAME CUSPHNO CUSADDRESS ROOM RENT
ROOMDETAIL
CUSID ROOMSTANDARD ROOMRENT
CUSAMOUNT
CUSID LIVINGTIME TOTALAMOUNT
Int I;
Double ff;
String name;
1) If statement:-
If (condition)
Statements;
2) If Else statement:-
If (condition)
Statements;
Else
Statement;
3) Looping statements:
}
6. WORKING OF THE PROJECT
Benefits of project:-
The software’s made man’s work easy and we can do more work. It also reduce the
work of humans.
Working of project:-
The Project Working On Hotel Room Reservation and Room Allocation. The
Project Contains The Records Of All Customers Whose Reserved The Rooms’ It
Must Contains The All Information Of Customer, In Out Time Detail, Room
Standard And Total Bill. In This Form We Can Add New Records, View Records,
Check Total Bill Of Customer.
The tables show data according to user order (first, next, last, previous, add, save)
etc.
7. FORM DESIGNING:-
Snapshots of forms:-
1. MDIFORM:-
8. Coding:-
CODING OF MDIFORM:-
using System.Data.OleDb;
namespace C_SHARPTERMPAPER
{
public partial class cusdetailandroomallocation : Form
{
public cusdetailandroomallocation()
{
InitializeComponent();
}
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.Jet.Oledb.4.0; Data
Source =D:\\DATABASEONE.mdb");
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
OleDbDataReader dr;
DataTable dt;
int totalrecords, i;
i = 0;
TXTID.Text = dt.Rows[i]["cusid"].ToString();
TXTROOMNO.Text = dt.Rows[i]["cusromno"].ToString();
TXTNAME.Text = dt.Rows[i]["cusname"].ToString();
TXTPNO.Text = dt.Rows[i]["cusphno"].ToString();
TXTADDRESS.Text = dt.Rows[i]["cusaddress"].ToString();
TXTRENT.Text = dt.Rows[i]["roomrent"].ToString();
}
i = i + 1;
TXTID.Text = dt.Rows[i]["cusid"].ToString();
TXTROOMNO.Text = dt.Rows[i]["cusromno"].ToString();
TXTNAME.Text = dt.Rows[i]["cusname"].ToString();
TXTPNO.Text = dt.Rows[i]["cusphno"].ToString();
TXTADDRESS.Text = dt.Rows[i]["cusaddress"].ToString();
TXTRENT.Text = dt.Rows[i]["roomrent"].ToString();
}
else
{
MessageBox.Show("YOU ARE AT LAST RECOR");
}
}
private void BTNprev_Click(object sender, EventArgs e)
{
if (i > 0)
{
i = i - 1;
TXTID.Text = dt.Rows[i]["cusid"].ToString();
TXTROOMNO.Text = dt.Rows[i]["cusromno"].ToString();
TXTNAME.Text = dt.Rows[i]["cusname"].ToString();
TXTPNO.Text = dt.Rows[i]["cusphno"].ToString();
TXTADDRESS.Text = dt.Rows[i]["cusaddress"].ToString();
TXTRENT.Text = dt.Rows[i]["roomrent"].ToString();
}
else
{
MessageBox.Show("you are at FIRST record");
}
}
da.InsertCommand.CommandType = CommandType.Text;
conn.Open();
da.InsertCommand.ExecuteNonQuery();
da.Fill(ds, "cusdetail");
dt = ds.Tables[0];
totalrecords =dt.Rows.Count;
MessageBox.Show("ok one record added sucessfully");
}
}
}
using System.Data.OleDb;
namespace C_SHARPTERMPAPER
{
public partial class CUSROOMDETAIL : Form
{
public CUSROOMDETAIL()
{
InitializeComponent();
}
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.Jet.Oledb.4.0; Data
Source =D:\\DATABASEONE.mdb");
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
OleDbDataReader dr;
DataTable dt;
int totalrecords, i;
private void CUSROOMDETAIL_Load(object sender, EventArgs e)
{
da.SelectCommand = new OleDbCommand();
da.SelectCommand.Connection = conn;
da.SelectCommand.CommandText = "select * from roomdetail ORDER BY CUSID";
conn.Open();
da.SelectCommand.ExecuteNonQuery();
da.Fill(ds, "roomdetail");
conn.Close();
dataGridView1.DataSource = ds.Tables[0];
dt = ds.Tables[0];
totalrecords = ds.Tables[0].Rows.Count;
i = 0;
TXTID.Text = dt.Rows[i]["cusid"].ToString();
TXTSTANDARD.Text = dt.Rows[i]["ROOMSTANDARD"].ToString();
TXTRENT .Text= dt.Rows[i]["roomrent"].ToString();
//TXTPNO.Text = dt.Rows[i]["cusphno"].ToString();
//TXTADDRESS.Text = dt.Rows[i]["cusaddress"].ToString();
//TXTRENT.Text = dt.Rows[i]["room rent"].ToString();
MessageBox.Show("database Loaded Successfully");
da.InsertCommand.CommandType = CommandType.Text;
conn.Open();
da.InsertCommand.ExecuteNonQuery();
da.Fill(ds, "roomdetail");
dt = ds.Tables[0];
totalrecords = dt.Rows.Count;
MessageBox.Show("record added sucessfully");
using System.Data.OleDb;
namespace C_SHARPTERMPAPER
{
public partial class CUSINOUTDETAIL : Form
{
public CUSINOUTDETAIL()
{
InitializeComponent();
}
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.Jet.Oledb.4.0; Data
Source =D:\\DATABASEONE.mdb");
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
OleDbDataReader dr;
DataTable dt;
int totalrecords, i;
da.InsertCommand.CommandType = CommandType.Text;
conn.Open();
da.InsertCommand.ExecuteNonQuery();
da.Fill(ds, "cusinout");
dt = ds.Tables[0];
totalrecords = dt.Rows.Count;
MessageBox.Show("record add");
}
using System.Data.OleDb;
namespace C_SHARPTERMPAPER
{
public partial class CUSBILLDETAIL : Form
{
public CUSBILLDETAIL()
{
InitializeComponent();
}
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.Jet.Oledb.4.0; Data
Source =D:\\DATABASEONE.mdb");
OleDbDataAdapter da = new OleDbDataAdapter();
DataSet ds = new DataSet();
OleDbDataReader dr;
DataTable dt;
int totalrecords, i;
da.InsertCommand.CommandType = CommandType.Text;
conn.Open();
da.InsertCommand.ExecuteNonQuery();
da.Fill(ds, "cusamount");
dt = ds.Tables[0];
totalrecords = dt.Rows.Count;
MessageBox.Show("one record added sucessfully");
}
}