Online Hostel Management System
Online Hostel Management System
Online Hostel Management System
MANAGEMENT SYSTEM
Submitted by
RESHMI RADHAKRISHNAN
RINSHA P.A
ROOPASREE R
SCHOOL OF ENGINEERING
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
COCHIN-682022
APRIL 2014
DIVISION OF COMPUTER ENGINEERING
SCHOOL OF ENGINEERING
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
COCHIN-682022
CERTIFICATE
RESHMI RADHAKRISHNAN(12120072)
RINSHA P.A(12120073)
ROOPASREE R(12120099)
Of the VIth semester, Computer Science and Engineering in the year 2014 in
partial fulfillment of the requirements to the award of Degree Bachelor of
Technology in Computer Science and Engineering of Cochin University of
Science and Technology.
Place:Thrikkakara
Date:31/03/14
ACKNOWLEDGEMENT
Submitted by
RESHMI RADHAKRISHNAN
RINSHA P.A
ROOPASREE R
ABSTRACT
[i]
LIST OF FIGURES
[ii]
LIST OF TABLES
[iii]
TABLE OF CONTENTS
ABSTRACT i
LIST OF TABLES ii
LIST OF FIGURES iii
LIST OF SYMBOLS iii
1. INTRODUCTION 07
1.1 PROJECT OVERVIEW 07
1.2 PROJECT OBJECTIVES 08
2. SYSTEM ANALYSIS 09
2.1 EXISTING SYSTEM 09
2.1PROPOSED SYSTEM 10
3. FEASIBILITY STUDY 11
3.1 TECHNICAL FEASIBILITY 11
3.2 ECONOMIC FEASIBILITY 11
3.3 OPERATIONAL FEASIBILITY 12
4. REQUIREMENT ANALYSIS AND SPECIFICATION 13
4.1 HARDWARE CONFIGURATION 13
4.2 SOFTWARE CONFIGURATION 14
5. SYSTEM DESIGN 14
5.1APPLICATION OVERVIEW 15
5.1 DATAFLOW DIAGRAM 15
5.2 DATABASE DESIGN (TABLE STRUCTURE) 20
6. SYSTEM IMPLEMENTATION STRUCTURE 23
6.1 SYSTEM IMPLEMENTATION 23
6.2 SYSTEM TESTING 24
7. CONCLUSION 26
REFERENCES 27
APPENDIX 28
1 SOURCE CODE 28
2 SAMPLE SCREEN SHOT 44
CHAPTER 1
INTRODUCTION
PROJECT OVERVIEW
The online hostel management system is web based software to provide college
students accommodation to the university hostel more efficiently. This project
also keeps details of the hostellers and applied students. It is headed by Warden.
He will be the administrator. For accommodate a large number of students into
hostel.
This document is intended to minimize human works and make hostel allocation is
an easier job for cusat students and hostel authorities by providing online
application for hostel, automatically select the students from the waiting list and
mess calculation, complaint registration, notice board etc. etc. Students will get
approval notification in their mails. Hostellers can view notice board, hostel fee,
mess menu by login into the online system.
PROJECT OBJECTIVES
SYSTEM ANALYSIS
EXISTING SYSTEM
The existing system is manual based and need lot of efforts and
consume enough time. In the existing system we can apply for the hostels online
but the allotment processes are done manually. It may lead to corruptions in the
allocation process as well as hostel fee calculation. The existing system does not
deals with mess calculation and complaint registration.
DISADVANTAGES:
PROPOSED SYSYTEM
The proposed system is having many advantages over the existing system. It
require less overhead and very efficient. The proposed system deals with the
mess calculation and allotment process efficiently.
CHAPTER 3
FEASIBILITY STUDY
TECHNICAL FEASIBILITY
The technical feasibility in the proposed system deals with the technology
used in the system. It deals with the hardware and software used in the system
whether they are of latest technology or not. It happens that after a system is
prepared a new technology arises and the user wants the system based on that
technology. This system use windows platform, .net as front end technology and
sql server as backend technology. Thus ONLINE HOSTEL MANAGEMENT
SYSTEM is technically feasible.
ECONOMICAL FEASIBILITY
Economic analysis is the most frequently used method for
evaluating the effectiveness of a new system. More commonly known as
cost/benefit analysis. .net using visual C# and sql datdabase easily available in
internet
OPERATIONAL FEASIBILITY
The project has been developed in such a way that it becomes very easy even
for a person with little computer knowledge to operate it. This software is very user
friendly and does not require any technical person to operate .Thus the project is
even operationally feasible.
REQUIREMENT ANALYSIS AND SPECIFICATION
Administrator module:
In administrator module administrator manages the master data’s like server details and
student details. Accept the application of students, view the application forms, reject the fake
applications, view the complaints of the students in the hostel, accept the vacating form and
delete from the database, edit the notice boards and view complaints.
Student Module:
In student module, they can Submit application form, change password, can check status,
view notice board, view monthly hostel fee and submit the vacating form.
Secretary Module
In secretary module, the secretary can calculate the mess bill, and edit the mess menu, view the
notice board and also change the password.
HARDWARE CONFIGURATION
The section of hardware configuration is an important task related to the
software development insufficient random access memory may affect adversely on the
speed and efficiency of the entire system. The process should be powerful to handle the
entire operations. The hard disk should have sufficient capacity to store the file and
application.
SOFTWARE CONFIGURATION
A major element in building a system is the section of compatible software since the
software in the market is experiencing in geometric progression. Selected software should
be acceptable by the firm and one user as well as it should be feasible for the system.
This document gives a detailed description of the software requirement specification. The
study of requirement specification is focused specially on the functioning of the system. It
allow the developer or analyst to understand the system, function to be carried out the
performance level to be obtained and corresponding interfaces to be established.
CHAPTER 4
SYSTEM DESIGN
The system design is divided in to three portions. The Administrator section ,hostel
secretary section and student section
1 Administrator
1. The Administrator can allot different students to the different hostels.
2. He can vacate the students for the hostels.
3. He can control the status of the fee payment.
4. He can edit the details of the students. He can change their rooms, edit and delete the student
records.
5.He can edit the news board
6.He can check the complaints
DATAFLOW DIADRAMS
Fig 3.4 DFD for Admin module
DATABASE DESIGN (TABLE STRUCTURE)
NAME TYPE
NAME VARCHAR
GENDER VARCHAR
DOB DATE
ADDRESS NCHAR
PINCODE INT
DISTRICT VARCHAR
LANDLINE NUMBER INT
MOBILE NUMBER INT
NAME &ADDRESS OF NCHAR
PARENT OR GUARDIAN
PARENT’S PHONE NUMBER INT
EMAIL ID NCHAR
RELIGION VARCHAR
CAST VARCHAR
DISTANCE IN KILOMETER FLOAT
COMMUNAL RESERVATION CHAR
PHYSICALLY CHAR
HANDICAPPED
FOREIGN STUDENT CHAR
COURSE OF STUDY CHAR
NATURE OF STUDY NCHAR
DEPARTMENT NCHAR
DATE OF ADMISSION TO DATE
COURSE
EXPECTED DATE OF DATE
COMPLETION OF COURSE
DATE FROM ADMISSION DATE
REQUIRES
FELLOWSHIPS ANY CHAR
RECIEVED
FELLOWSHIP DETAILS VARCHAR
PHOTO IMAGE
SIGN IMAGE
THUMP IMPRESSION IMAGE
USERNAME NCHAR
PASSWORD NCHAR
CONFORM PASSWORD NCHAR
NAME TYPE
DEPARTMENT VARCHAR
STUDENTNAME VARCHAR
COST PER DAY FLOAT Table
NO OF DAYS INT 3.2
RENT FLOAT Databas
HOSTELFEE FLOAT e table
for mess fee calculation
PAYMENT STATUS
NAME TYPE
DEPARTMENT VARCHAR
STUDENT NAME VARCHAR
STATUS CHAR
Vacation
NAME TYPE
NAME VARCHAR
DEPARTMENT VARCHAR
YEAR VARCHAR
CS_STUDY VARCHAR
DATESUB CHAR
DATEREL CHAR
REASON VARCHAR
USERNAME VARCHAR
SYSTEM IMPLEMENTATION
Implementation is the stage in the project where the theoretical design is turned into a
working system and is giving confidence on the new system for the users that it will work
efficiently and effectively. It involves careful planning, investigation of the current
system and its constraints on implementation, design of methods to achieve the change
over, an evaluation of change over methods. Apart from planning major task of preparing
the implementation are education and training of users. The implementation process
begins with preparing a plan for the implementation of the system. According to this
plan, the activities are to be carried out, discussions made regarding the equipment and
resources and the additional equipment has to be acquired to implement the new system.
In network backup system no additional resources are needed. Implementation is the final
and the most important phase. The most critical stage in achieving a successful new
system is giving the users confidence that the new system will work and be effective. The
system can be implemented only after thorough testing is done and if it is found to be
working according to the specification. This method also offers the greatest security since
the old system can take over if the errors are found or inability to handle certain type of
transactions while using the new system.
CHAPTER 6
SYSTEM TESTING
As the part of system testing we execute the program with the intent of finding errors and missing
operations and also a complete verification to determine whether the objectives are met and the
user requirements are satisfied. The ultimate aim is quality assurance.
Tests are carried out and the results are compared with the expected document. In the case of
erroneous results, debugging is done. Using detailed testing strategies a test plan is carried out on
each module. The various tests performed are unit testing, integration testing and user acceptance
testing.
Unit Testing
The software units in the system is are modules and routines that are assembled and
integrated to perform a specific function. As a part of unit testing we executed the program for
individual modules independently. This enables, to detect errors in coding and logic that are
contained within each of the three module. This testing includes entering data that is filling forms
and ascertaining if the value matches to the type and entered into the database. The various
controls are tested to ensure that each performs its action as required.
Integration Testing
Data can be lost across any interface, one module can have an adverse effect on another, sub
functions when combined, may not produce the desired major functions. Integration testing is a
systematic testing to discover errors associated within the interface. The objective is to take unit
tested modules and build a program structure. All the modules are combined and tested as a
whole. Here the admin module, sec module and student module options are integrated and tested.
This testing provides the assurance that the application is well integrated functional unit with
smooth transition of data.
User Acceptance Testing
User acceptance of a system is the key factor for the success of any system. The system
under consideration is tested for user acceptance by constantly keep the records of applicants and
making changes to the details and password whenever required.
CONCLUSION
To conclude the description about the project The project, developed using ASP.net with c#
and SQL SERVER is based on the requirement specification of the user and the analysis of the
existing system, with flexibility for future enhancement.
ONLINE HOSTEL MANAGEMENT SYSTEM is very useful for hostel allotment and
mess fee calculation . This hostel management software is designed for people who want to
manage various activities in the hostel. For the past few years the numbers of educational
institutions are increasing rapidly. Thereby the numbers of hostels are also increasing for the
accommodation of the students studying in this institution. And hence there is a lot of strain on
the person who are running the hostel and software’s are not usually used in this context. This
particular project deals with the problems on managing a hostel and avoids the problems which
occur when carried manually.
Identification of the drawbacks of the existing system leads to the designing of
computerized system that will be compatible to the existing system with the system which is
more user friendly and more GUI oriented.
REFERENCE
[2] Agnes Molnar and Adam Granicz , “ .Net with Visual C# 2010”. [3]
http//w3 school.com/css_file
http//cusat.ac.in/hostel_form
http://www.en.wikipedia.org/wiki/Wireless_security.
APPENDIX
SOURCE CODE:
1.Admin module- allotment process
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "approve")
{
try
{
SqlConnection con1 = new SqlConnection("Data Source=USER-
PC\\SQLSERVER1;Initial Catalog=hostelms;Persist Security Info=True;User
ID=sa;Password=cusat");
con1.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con1;
string d = "APPROVED";
string s = e.CommandArgument.ToString();
cmd.CommandText = "update Tb_Detail SET STATUS='" + d + "'WHERE
username='" + s + "'";
cmd.ExecuteNonQuery();
con1.Close();
string sl = "select EMAIL_ID from Tb_Detail where username='" + s
+ "'";
SqlDataAdapter sq = new SqlDataAdapter(sl, con1);
DataTable dts = new DataTable();
sq.Fill(dts);
/*
ADD NAME SPACE
* using System.NET.Mail;
MailMessage mail = new MailMessage();
string el = "To ADDRESS";
mail.To.Add(el);
mail.From = new MailAddress("FROM ADDRESS");
mail.Subject = "MAIL SUBJECT";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential("FROM ADDRESS",
"PASSWORD");
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.Send(mail);
*/
}
catch (Exception x)
{
Response.Write(x.Message);
}
}
else if(e.CommandName=="del")
{
try
{
SqlConnection con2 = new SqlConnection("Data Source=USER-
PC\\SQLSERVER1;Initial Catalog=hostelms;Persist Security Info=True;User
ID=sa;Password=cusat");
con2.Open();
SqlCommand cmd1 = new SqlCommand();
cmd1.Connection = con2;
string s1 = e.CommandArgument.ToString();
cmd1.CommandText = "DELETE FROM Tb_Detail WHERE username='" + s1 +
"'";
cmd1.ExecuteNonQuery();
con2.Close();
}
catch (Exception del)
{
Response.Write(del.Message);
}
}
else if(e.CommandName=="view")
{
SqlConnection con3 = new SqlConnection("Data Source=USER-
PC\\SQLSERVER1;Initial Catalog=hostelms;Persist Security Info=True;User
ID=sa;Password=cusat");
con3.Open();
string s2 = e.CommandArgument.ToString();
string sel1 = "select * from Tb_Detail where username='" + s2 + "'";
SqlDataAdapter sqdt1 = new SqlDataAdapter(sel1, con3);
DataTable dt1 = new DataTable();
sqdt1.Fill(dt1);
if(dt1.Rows.Count>0)
{
Panel1.Visible=true;
Label2.Text = dt1.Rows[0][0].ToString();
Label3.Text = dt1.Rows[0][1].ToString();
Label4.Text = dt1.Rows[0][2].ToString();
Label5.Text = dt1.Rows[0][3].ToString();
Label6.Text = dt1.Rows[0][4].ToString();
Label7.Text = dt1.Rows[0][5].ToString();
Label8.Text = dt1.Rows[0][6].ToString();
Label9.Text = dt1.Rows[0][7].ToString();
Label10.Text = dt1.Rows[0][8].ToString();
Label11.Text = dt1.Rows[0][9].ToString();
Label12.Text = dt1.Rows[0][10].ToString();
Label13.Text = dt1.Rows[0][11].ToString();
Label14.Text = dt1.Rows[0][12].ToString();
Label15.Text = dt1.Rows[0][13].ToString();
Label16.Text = dt1.Rows[0][14].ToString();
Label17.Text = dt1.Rows[0][15].ToString();
Label18.Text = dt1.Rows[0][16].ToString();
Label19.Text = dt1.Rows[0][17].ToString();
Label20.Text = dt1.Rows[0][18].ToString();
Label21.Text = dt1.Rows[0][19].ToString();
Label22.Text = dt1.Rows[0][20].ToString();
Label23.Text = dt1.Rows[0][21].ToString();
Label24.Text = dt1.Rows[0][22].ToString();
Label25.Text = dt1.Rows[0][23].ToString();
Label26.Text = dt1.Rows[0][24].ToString();
Label27.Text = dt1.Rows[0][25].ToString();
Label28.Text = dt1.Rows[0][26].ToString();
Image1.ImageUrl = dt1.Rows[0][27].ToString();
Image2.ImageUrl = dt1.Rows[0][28].ToString();
Image3.ImageUrl = dt1.Rows[0][29].ToString();
Label29.Text = dt1.Rows[0][30].ToString();
Label30.Text = dt1.Rows[0][31].ToString(); }
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
}
}
2)ADMIN MODULE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
// SqlConnection con = new SqlConnection("Data Source=ups5d40;Initial
Catalog=hostelms;Persist Security Info=True;User ID=sa;Password=cusat");
SqlDataAdapter sqdt = new SqlDataAdapter("select * from Tb_Hostel", con);
DataTable dt = new DataTable();
sqdt.Fill(dt);
string d = dt.Rows[0][0].ToString();
int l;
int de = Convert.ToInt16(d);
l=de;
de = de + Convert.ToInt16(TextBox1.Text.ToString());
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "update Tb_Hostel set rooms='" + de + "'where
rooms='" + l + "'";
//cmd.CommandText = "insert into Tb_Hostel values('"
+TextBox1.Text.ToString()+ "')";
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception x)
{
Response.Write(x.Message);
}
}
}
3) using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
// SqlConnection con = new SqlConnection("Data Source=ups5d40;Initial
Catalog=hostelms;Persist Security Info=True;User ID=sa;Password=cusat");
SqlDataAdapter sqdt = new SqlDataAdapter("select * from Tb_Hostel", con);
DataTable dt = new DataTable();
sqdt.Fill(dt);
string d = dt.Rows[0][0].ToString();
int l;
int de = Convert.ToInt16(d);
l=de;
de = de + Convert.ToInt16(TextBox1.Text.ToString());
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "update Tb_Hostel set rooms='" + de + "'where
rooms='" + l + "'";
//cmd.CommandText = "insert into Tb_Hostel values('"
+TextBox1.Text.ToString()+ "')";
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception x)
{
Response.Write(x.Message);
}
}
}
4) using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class warden_vacate : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection("Data Source=USER-
PC\\SQLSERVER1;Initial Catalog=hostelms;Persist Security Info=True;User
ID=sa;Password=cusat");
con.Open();
string sel = "SELECT
username,NAME,DEPARTMENT,YEAR,CS_STUDY,DATESUB,DATEREL,REASON FROM Tb_Vaccate";
SqlDataAdapter sqdt = new SqlDataAdapter(sel, con);
DataTable dt = new DataTable();
sqdt.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
catch (Exception gr)
{
Response.Write(gr.Message);
}
}
}
5) using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
sqdt1.Fill(dt1);
if (dt1.Rows.Count > 0)
{
Panel1.Visible = true;
Label2.Text = dt1.Rows[0][0].ToString();
Label3.Text = dt1.Rows[0][1].ToString();
Label4.Text = dt1.Rows[0][2].ToString();
Label5.Text = dt1.Rows[0][3].ToString();
Label6.Text = dt1.Rows[0][4].ToString();
Label7.Text = dt1.Rows[0][5].ToString();
Label8.Text = dt1.Rows[0][6].ToString();
Label9.Text = dt1.Rows[0][7].ToString();
Label10.Text = dt1.Rows[0][8].ToString();
Label11.Text = dt1.Rows[0][9].ToString();
Label12.Text = dt1.Rows[0][10].ToString();
Label13.Text = dt1.Rows[0][11].ToString();
Label14.Text = dt1.Rows[0][12].ToString();
Label15.Text = dt1.Rows[0][13].ToString();
Label16.Text = dt1.Rows[0][14].ToString();
Label17.Text = dt1.Rows[0][15].ToString();
Label18.Text = dt1.Rows[0][16].ToString();
Label19.Text = dt1.Rows[0][17].ToString();
Label20.Text = dt1.Rows[0][18].ToString();
Label21.Text = dt1.Rows[0][19].ToString();
Label22.Text = dt1.Rows[0][20].ToString();
Label23.Text = dt1.Rows[0][21].ToString();
Label24.Text = dt1.Rows[0][22].ToString();
Label25.Text = dt1.Rows[0][23].ToString();
Label26.Text = dt1.Rows[0][24].ToString();
Label27.Text = dt1.Rows[0][25].ToString();
Label28.Text = dt1.Rows[0][26].ToString();
Image1.ImageUrl = dt1.Rows[0][27].ToString();
Image2.ImageUrl = dt1.Rows[0][28].ToString();
Image3.ImageUrl = dt1.Rows[0][29].ToString();
Label29.Text = dt1.Rows[0][30].ToString();
Label30.Text = dt1.Rows[0][31].ToString(); }
}
catch (Exception D)
{
Response.Write(D.Message);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
DropDownList2.Items.Clear();
DropDownList3.Items.Clear();
DropDownList4.Items.Clear(); }
Student Module:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
//Label1.Text = Session["login"].ToString();
try
{
string st = Session["login"].ToString();
SqlConnection con = new SqlConnection("Data Source=USER-
PC\\SQLSERVER1;Initial Catalog=hostelms;Persist Security Info=True;User
ID=sa;Password=cusat");
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "update Tb_Detail SET password='" +
TextBox3.Text.ToString() + "'WHERE username='" + st + "'";
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch ( Exception ex)
{
Response.Write(ex.Message);
}
}
}
2) using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data;
}
}
SAMPLE SCREEN FORMATS:
1.ADMIN ALLOTMENT