You are on page 1of 42

ACKNOWLEDGEMENT

I thank the Almighty, The Power that guided me throughout the steps that I
take in the future. I thank him once again for giving such a wonderful life full of
color and brightness.

I extended my deepest gratitude to our esteemed Principal DR.Mrs.Ridling


Margaret Waller,M.sc.,Ph.D,for providing the means of attaining our most
cherished goal by giving me permission to do the project work.

I’m proud and privileged to express my sincere gratitude to thank and praise
Mrs.Sylvia Mary, MCA.,M.Phil, Head of the Department, Department of
Computer Application, for his consent and had shared the fruit of knowledge by
constant guidance and support.

I sincerely thank my project guide Mrs.Sylvia Mary, MCA.,M.Phil, for his


sustained support and valuable guidance

I’m also very thankful to our staff members for their encouragement to ward
our endeavor is making this project successful.

Last but not least ,I would like to take this opportunity to thank my family
and friends for their support and encouragement
ABSTRACT

Hostel management by manual way is tedious process, since it involves


work load and time consumption. In this system, we can easily manage the hostel
details, room details, student records, mess bill calculation, easy way of room
allocation and hostel attendance. The main feature of this project is easy to allocate
for the student and also easy to calculate mess bill. This project is carried out using
Dot NET as front end and SQL server as back end. We can improve the efficiency
of the system, thus overcome the drawbacks of the existing hostel management
system. Less human error, Strength and strain of manual labour can be reduced,
High security, Data redundancy can be avoided to some extent, Data consistency,
Easy to handle, Easy data updating, Easy record keeping, Backup data can be
easily generated.We can improve the efficiency of the system, thus overcome the
drawbacks of the existing hostel management system. Less human error, Strength
and strain of manual labour can be reduced, High security, Data redundancy can be
avoided to some extent, Data consistency, Easy to handle, Easy data updating,
Easy record keeping, Backup data can be easily generated.
TABLES OF CONTENTS

SL.NO CONTENTS PAGE NO

1. INTRODUCTION
1.1Problem Definition 1

2. SYSTEM SPECIFICATION
2.1Hardware Requirements 2
2.2Software Requirements
3
4
2.3 Technical Profile
3. SYSTEM DESIGN
3.1Database Design 13
4. PROJECT DESCRIPTION 17
5. TESTING AND IMPLEMENTATION
5.1Introduction 20
5.2Types of Testing 23
6. FUTURE ENHANCEMENT 25
7. CONCLUSION 26
8. BIBLIOGRAPHY 27
9. APPENDICES
28
9.1 Sample code
9.2 Screen Shots 33
1.INTRODUCTION

Hostel management gives on idea about how the students details, room
allocation are maintained in the particular concern. The hostel management system
also includes some special features. The administration has the unique identity for
each members as well as students details. The stock management has the mess bills
of each of the students. The modules of this project are student details, attendance
details, room details, mess modules.

Hostel management using a manual system is an onerous and time


consuming process involving heavy workload. In the proposed system, one can
easily manage the various functions of a hotel in an efficient manner. Things like,
hostel details, student records, mess bill can be calculated and allocated in an
optimized manner. The key feature of this project is to easily allocate rooms and
expenditures of a student. The front end of the project has been created using
Visual Basic and the back end using Oracle.

1.1 PROBLEM DEFINITION

We have 7 hostels in our university. All these hostels at present are managed
manually by the hostel office. The Registration form verification to the different
data processing are done manually. Thus there are a lot of repetitions which can be
easily avoided. And hence there is a lot of strain on the person who are running the
hostel. This particular project deals with the problems on managing a hostel and
avoids the problems which occur when carried manually

1
2. SYSTEM SPECIFICATION

2.1 HARDWARE REQUIREMENTS


Processor : Pentium IV

RAM : 512 MB

Hard Disk : 40GB

2.2 SOFTWARE REQUIREMENTS

Operating System : Windows 7

Front End : .net( c#)

Back End : sql server

2
2.3 TECHNICAL PROFILE

INTRODUCTION TO .NET FRAMEWORK

The Microsoft .NET Framework is a vehicle technology that is


available with several Microsoft Windows operating systems. It includes a large
library of pre-coded solutions to common programming problems and a virtual
machine that manages the execution of programs written specifically for the
framework. The .NET Framework is a key Microsoft offering and is intended to
be used by most new applications created for the Windows platform.

The pre-coded solutions that form the framework's Base Class Library cover
a large range of programming needs in a number of areas, including user
interface, data access, database connectivity, cryptography, web application
development, numeric algorithms, and network communications. The class
library is used by programmers, who combine it with their own code to produce
applications.

COMMON RUNTIME ENGINE

The Common Language Runtime (CLR) is the virtual machine component


of the .NET framework. All .NET programs execute under the supervision of the
CLR, guaranteeing certain properties and behaviors in the areas of memory
management, security, and exception handling.

SECURITY

The design is meant to address some of the vulnerabilities, such as buffer


overflows, that have been exploited by malicious vehicle. Additionally, .NET
provides a common security model for all applications.

3
COMMON LANGUAGE INFRASTRUCTURE

The core aspects of the .NET framework lie within the Common
Language Infrastructure, or CLI. The purpose of the CLI is to provide a
language-neutral platform for application development and execution, including
functions for exception handling, garbage collection, security, and
interoperability. Microsoft's implementation of the CLI is called the Common
Language Runtime or CLR.

ASSEMBLIES

The intermediate CIL code is housed in .NET assemblies. As mandated by


specification, assemblies are stored in the Portable Executable (PE) format,
common on the Windows platform for all DLL and EXE files. The assembly
consists of one or more files, one of which must contain the manifest, which
has the metadata for the assembly. The complete name of an assembly (not to
be confused with the filename on disk) contains its simple text name, version
number, culture, and public key token.

METADATA

All CLI is self-describing tvehicleough .NET metadata. The CLR checks


the metadata to ensure that the correct method is called. Metadata is usually
generated by language compilers but developers c a n c r e a t e t h e i r own
metadata t v e h i c l e o u g h c u s t o m a t t r i b u t e s . Metadata c o n t a i n s information
about the assembly, and is also used to implement the reflective programming
capabilities of .NET Framework.

4
MEMORY MANAGEMENT

The .NET Garbage Collector (GC) is a non-deterministic, compacting,


mark-and-sweep garbage collector. The GC runs only when a certain amount of
memory has been used or there is enough pressure for memory on the system.
Since it is not guaranteed when the conditions to reclaim memory are reached,
the GC runs are non-deterministic. Each .NET application has a set of roots,
which are pointers to objects on the managed heap (managed objects). These
include references to static objects and objects defined as local variables or
method parameters currently in scope, as well as objects referred to by CPU
registers.

SERVER APPLICATION DEVELOPMENT

Server-side applications in the managed world are implemented


tvehicleough runtime hosts. Unmanaged applications ho st t he co mmo n
l a ng u ag e runtime, which allows your custom managed code to control the
behavior of the server. This model provides you with all the features of the
common language runtime and class library while gaining the performance and
scalability of the host server.

SERVER-SIDE MANAGED CODE

ASP.NET is the hosting environment that enables developers to use the


.NET Framework to target Web-based applications. However, ASP.NET is more
than just a runtime host; it is a complete architecture for developing Web sites
and Internet-distributed objects using managed code

5
INTERNET

If you have used earlier versions of ASP technology, you will


immediately notice the improvements that ASP.NET and Web Forms offers. For
example, you can develop Web Forms pages in any language that supports the
.NET Framework. In addition, your code no longer needs to share the same file
with your HTTP text (although it can continue to do so if you prefer). Web Forms
pages execute in native machine language because, like any other managed
application, they take full advantage of the runtime. In contrast, unmanaged ASP
pages are always scripted and interpreted. ASP.NET pages are faster, more
functional, and easier to develop than unmanaged ASP pages because they
interact with the runtime like any managed application.

ACTIVE SERVER PAGES.NET

ASP.NET is a programming framework built on the common language


runtime that can be used on a server to build powerful Web applications.
ASP.NET offers several important advantages over previous Web development
models:

• Enhanced Performance. ASP.NET is compiled common language runtime


code running on the server. Unlike its interpreted predecessors, ASP.NET can
take advantage of early binding, just-in-time compilation, native optimization,
and caching services right out of the box. This amounts to dramatically better
performance before you ever write a line of code.

• World-Class Tool Support. The ASP.NET framework is complemented by


a rich toolbox and designer in the Visual Studio integrated development
environment. WYSIWYG editing, drag-and-drop server controls, and automatic
deployment are just a few of the features this powerful tool provides.

6
• Power and Flexibility. Because ASP.NET is based on the common
language runtime, the power and flexibility of that entire platform is available to
Web application developers. The

• Simplicity. ASP.NET makes it easy to perform common tasks, from simple


form submission and costumer authentication to deployment and site
configuration. For example, the ASP.NET page framework allows you to build
user interfaces that cleanly separate application logic from presentation code and
to handle events in a simple, Visual Basic - like forms processing model.
Additionally, the common language runtime simplifies development, with
managed code services such as automatic reference counting and garbage
collection.

• Manageability. ASP.NET employs a text-based, hierarchical configuration


system, which simplifies applying settings to your server environment and
Web applications. Because configuration information is stored as plain text, new
settings may be applied without the aid of local administration tools. This
"zero local administration" philosophy extends to deploying ASP.NET
Framework applications as well. An ASP.NET Framework application is
deployed to a server simply by copying the necessary files to the server. No
server restart is required, even to deploy or replace running compiled code.

• Scalability and Availability. ASP.NET has been designed with scalability


in mind, with features specifically tailored to improve performance in
clustered and multiprocessor environments. Further, processes are closely
monitored and managed by the ASP.NET runtime, so that if one misbehaves
(leaks, deadlocks), a new process can be created in its place, which helps keep
your application constantly available to handle requests.

7
• Customizability and Extensibility. ASP.NET delivers a well-factored
architecture that allows developers to "plug-in" their code at the appropriate
level. In fact, it is possible to extend or replace any subcomponent of the
ASP.NET runtime with your own custom-written component. Implementing
custom authentication or state services has never been easier.

• Security. With built in Windows authentication and per-application


configuration, you can be assured that your applications are secure.

LANGUAGE SUPPORT

The Microsoft .NET Platform currently offers built-in support for


languages: C#, Visual Basic, and Java Script.

ADO.NET OVERVIEW

ADO.NET is an evolution of the ADO data access model that directly


addresses user requirements for developing scalable applications. It was designed
specifically for the web with scalability, statelessness, and XML in
mind.ADO.NET uses some ADO objects, such as the Connection and
Command objects, and also introduces new objects. Key new ADO.NET
objects include the Dataset, Data Reader, and Data Adapter.The important
distinction between this evolved stage of ADO.NET and previous data
architectures is that there exists an object -- the DataSet -- that is separate and
distinct from any data stores. Because of that, the DataSet functions as a
standalone entity. You can think of the DataSet as an always disconnected
recordset that knows nothing about the source or destination of the data it
contains.

8
A DataAdapter is the object that connects to the database to fill the
DataSet. Then, it connects back to the database to update the data there, based on
operations performed while the DataSet held the data. In the past, data processing
has been primarily connection-based. Now, in an effort to make multi-tiered apps
more efficient, data processing is turning to a message-based approach that
revolves around chunks of information. At the center of this approach is the
DataAdapter, which provides a bridge to retrieve and save data between a
DataSet and its source data store. It accomplishes this by means of requests to
the appropriate SQL commands made against the data store.

The following sections will introduce you to some objects that have
evolved, and some that are new. These objects are:

• Connections. For connection to and managing transactions against a database.

• Commands. For issuing SQL commands against a database.

• DataReaders. For reading a forward-only stream of data records from a


SQL Server data source.

• DataSet. For storing, Remoting and programming against flat data, XML data
and relational data.

• DataAdapters. For pushing data into a DataSet, and reconciling data against a
database.

CONNECTIONS

Connections are used to 'talk to' databases, and are represented by


provider-specific classes such as SqlConnection. Commands travel over
connections and resultsets are returned in the form of streams which can be read by
a DataReader object, or pushed into a DataSet object.

9
COMMANDS

Commands contain the information that is submitted to a database, and are


represented by provider-specific classes such as SqlCommand. A command can
be a stored procedure call, an UPDATE statement, or a statement that returns
results. You can also use input and output parameters, and return values as part
of your command syntax. The example below shows how to issue an INSERT
statement against the Northwind database.

DATA READERS

The DataReader object is somewhat synonymous with a read-


only/forward-only cursor over data. The DataReader API supports flat as well as
hierarchical data. A DataReader object is returned after executing a command
against a database. The format of the returned DataReader object is different
from a recordset. For example, you might use the DataReader to show the results
of a search list in a web page.

SQL SERVER -2005

A database management, or DBMS, gives the user access to their data and
helps them transform the data into information. Such database management
systems include dBase, paradox, IMS, SQL Server and SQL Server. These
systems allow users to create, update and extract information from their
database.During an SQL Server Database design project, the analysis of your
business needs identifies all the fields or attributes of interest. If your business
needs change over time, you define any additional fields or change the definition
of existing fields.

10
SQL SERVER TABLES

SQL Server stores records relating to each other in a table. Different


tables are created for the various groups of information. Related tables are grouped
together to form a database.

PRIMARY KEY

Every table in SQL Server has a field or a combination of fields that


uniquely identifies each record in the table. The Unique identifier is called the
Primary Key, or simply the Key. The primary key provides the means to
distinguish one record from all other in a table. It allows the user and the
database system to identify, locate and refer to one particular record in the
database.

RELATIONAL DATABASE

Sometimes all the information of interest to a business operation can be


stored in one table. SQL Server makes it very easy to link the data in multiple
tables. Matching an employee to the department in which they work is one
example. This is what makes SQL Server a relational database management
system, or RDBMS. It stores data in two or more tables and enables you to
define relationships between the table and enables you to define relationships
between the tables.

FOREIGN KEY

When a field is one table matches the primary key of another field is
referred to as a foreign key. A foreign key is a field or a group of fields in one
table whose values match those of the primary key of another table.

11
REFERENTIAL INTEGRITY

Not only does SQL Server allow you to link multiple tables, it also
maintains consistency between them. Ensuring that the data among related tables
is correctly matched is referred to as maintaining referential integrity.

DATA ABSTRACTION

A major purpose of a database system is to provide users with an abstract


view of the data. This system hides certain details of how the data is stored and
maintained. Data abstraction is divided into tvehicleee levels.

Physical level: This is the lowest level of abstraction at which one describes
how the data are actually stored.

Conceptual Level: At this level of database abstraction all the attributed and
what data are actually stored is described and entries and relationship among them.

View level: This is the highest level of abstraction at which one describes only
part of the database.

12
3. SYSTEM DESIGN

3.1 DATABASE DESIGN

ROOM DETAILS

COLUMN NAME DATA TYPE CONSTRAINTS


Room_no varchar(50) Not null
Capacity numeric(18,0) Not null

ROOM ALLOTMENTS

COLUMN NAME DATA TYPE CONSTRAINTS


Student_Name varchar(50) Not null
Class varchar(50) Not null
Room_no varchar(50) Not null

VISITORS DETAILS

COLUMN NAME DATA TYPE CONSTRAINTS


visitors_name varchar(50) Not null
date Datetime Not null
Student_name varchar(50) Not null
Address varchar(MAX) Not null
Phone_No numeric(18, 0) Not null

13
ADMISSION

COLUMN NAME DATA TYPE CONSTRAINTS


Admission_no numeric(18, 0) Primary key
Ad_date Datetime Not null
Student_Name varchar(50) Not null
St_Class varchar(50) Not null
Father_Name varchar(50) Not null
Father_Occup varchar(50) Not null
Mother_Name varchar(50) Not null
Mother_Occup varchar(50) Not null
Address varchar(MAX) Primary key
Pincode numeric(18, 0) Not null
District varchar(50) Not null
Religion varchar(50) Not null
Caste varchar(50) Not null
Phone_no numeric(18, 0) Primary key
D_O_B Datetime Primary key

EMPLOYEE SALARY

COLUMN NAME DATA TYPE CONSTRAINTS


Employee ID Numeric(18,0) Primary key
Employee Name Varchar(50) Not null
Basic Salary Money Not null
Date Datetime Not null

14
EMPLOYEES

COLUMN NAME DATA TYPE CONSTRAINTS


Employee ID Numeric(18,0) Primary key
Employee Name Varchar(50) Not null
Qualification Varchar(50) Not null
Contact No Numeric(18,0) Primary key
Email ID Varchar(max) Primary key
Designation Varchar(50) Not null
Basic Salary Money Not null
Address Varchar(50) Primary key

OUTING REGISTER

COLUMN NAME DATA TYPE CONSTRAINTS


Student id numeric(18, 0) Primary key
StudentName varchar(50) Not null
Date Datetime Not null
out_time nvarchar(50) Not null
Reason varchar(50) Primary key
in_time nvarchar(50) Not null

15
RENTAL FEES

COLUMN NAME DATA TYPE CONSTRAINTS


Student Id numeric(18,0) Primary key
Student Name varchar(50) Not null
Date Datetime Not null
Rent fees Money Not null

LEAVE REGISTER

COLUMN NAME DATA TYPE CONSTRAINTS


Student ID numeric(18,0) Primary key
Student Name varchar(50) Not null
Date of depature Datetime Not null
Date of arrival Datetime Not null
Reason varchar(MAX) Primary key

MESS BILL

COLUMN NAME DATA TYPE CONSTRAINTS


Student Id numeric(18,0) Primary key
Student Name varchar(50) Not null
Bill No numeric(18,0) Primary key
Date Datetime Not null
No of month Varchar(50) Not null
Monthly fees Varchar(50) Not null
Total amout Money Not null

16
4. PROJECT DESCRIPTION

USER REGISTRATION

The user register Module stored user information, all input filed validation
number validation ,emailed validation, space validation get user information and
username, password, emailed, address, contact number stored in sqldatabase.

ADMIN LOGIN

In This Module admin maintained Hostel Informationof Policecomplaints


andHostel Details with several databases stored complaints and maintains student
details and staff details. this page three menu tag the first tag master the master tag
managed rooms and rooms details and visitors entry link admission .other one
settings tag managed employees year settings and employee salary’s other one exit
tag this tag home page link and exit application.

HOSTEL MANAGEMENT DASHBOARD:

The hostel management dashboard managed three menu tag the first menu
tag is student this tag is stored student outing register and leave register search
student information’s other tag rental fees mess Bill link this menu tag .thread tag
exit application and link in homepage.

ALLOTMENT OF THE HOSTELS

There will be pre-defined criteria’s for the admission to the hostels. He


checks the attested application forms of the students obtained from the internet and
verify it with the student database. If the students are found eligible then they are
allotted to the hostel. Student details verify form sql database than allotted hostel
rooms.Allot different students to the different hostels.

17
VACATING THE ROOMS

As the student’s course is over they will vacate their rooms. So it is required
for the administrator to remove their records from the database tables. This section
includes the option for the room vacation and the deletion of the particular record
from the database.

ROOM DETAILS

There will be the room no and capacity of a student can stay in a room. We
can save student details and room’s details and room information room’s settings
minted room details.

ROOM SETTINGS

In room Settingsit will display student name, class and room number which
have been specified for a particular students and stored Rooms details and show all
rooms settings.

VISITORS DETAILS

In visitors details it displays about the the visitor name and guardian for a
student with address, mobile number and date. It can be saved and view
thevisitor’s details.student name and visitors in time and out time stored sql
database.

ADMISSION FORM

Application form specifies student id no, student name, class, father name,
father occupation, mother name, mother occupation, address, religion
studentinformation stored and verify student record and fess details join month
etc.

18
OUTING REGISTER

Students id, student name, date, in time , out time, reason all these details
will be displayed. We can add ,view outing register the details out time and in time
stored sql database.

RENT FEES

Student id, student name, rent fees, date. It displays about the rent fees of
the student Hostel Rental fees information’s.

EMPLOYEES

Employee id, employee name, address, qualification, contact no, email id,
designation and basic salary. We can addemployeesdetails.

EMPLOYEE SALARY

We can set employee id, employee name, date and basic salary. We can
insert Employee monthly salary details and number of days.

There are four types of flow

REGISTRATION FLOW:

To take the membership of the hostel the students should tell the
department’s name to the hostel management system. He/she should fill his/her
personal profile on the profile page. After this the warden issued ID # to him/her.
So that the student can accessed by his/her ID # in case of any problem or other
thing.

19
ROOM PROCESS FLOW :

A room will be allocated when a student is registered in the hostel. The


allocation will be on the basis of the department, semester and the session of the
student. A room is only for the two students. The dues of the hostel are only for 1
semester and after the end of the semester the student should pay the next
semester’s dues. The student will pay the dues within 10 days after next semester.
In case of not paying the dues of the hostel at the announced date a warning is send
to the student. In case of the unavailability of a room the students will be entered in
a waiting list when the room will be free the student will be told by the
management of the hostel.

DATABASE FLOW:

When the new student is arrived then the administrator easily enters a new
entry in the database of the system. All the information about mess and other
facilities is updated easily. This database should save the record of all the current
users and the 3 years old students.

20
5. TESTING AND IMPLEMENTATION

5.1 INTRODUCTION
Testing is a process of executing a program with the intent of finding an
error. Testing is a crucial element of software quality assurance and presents
ultimate review of specification, design and coding.System Testing is an important
phase. Testing represents an interesting anomaly for the software. Thus a series of
testing are performed for the proposed system before the system is ready for user
acceptance testing. There are various types of test. Each test type addresses a
specific testing requirement.

This create two problem

1. Time delay between the cause and appearance of the problem.

2. The effect of the system errors on files and records within the system

5.2 TYPES OF TESTING

The primary objective for test case design is to derive a set of tests that has
the highest livelihood for uncovering defects in software. To accomplish this
objective two different categories of test case design techniques are used. They are

 White box testing.


 Black box testing.

WHITE-BOX TESTING:

White box testing focus on the program control structure. Test cases are
derived to ensure that all statements in the program have been executed at least
once during testing and that all logical conditions have been executed

21
BLACK-BOX TESTING:

Black box testing is designed to validate functional requirements without


regard to the internal workings of a program. Black box testing mainly focuses on
the information domain of the software, deriving test cases by partitioning input
and output in a manner that provides through test coverage. Incorrect and missing
functions, interface errors, errors in data structures, error in functional logic are the
errors falling in this category.

1) Interface errors

2) Performance in data structure

3) Performance errors

4) Initializing and termination errors

Testing strategies:

A strategy for software testing must accommodate low-level tests that are
necessary to verify that all small source code segments has been correctly
implemented as well as high-level tests that validate major system functions
against customer requirements.

Testing fundamentals:

Testing is a process of executing program with the intent of finding error. A


good test case is one that has high probability of finding an undiscovered error. If
testing is conducted successfully it uncovers the errors in the software. Testing
cannot show the absence of defects, it can only show that software defects present.

22
Unit Testing

Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.

Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires


significant participation by the end user. It also ensures that the system meets the
functional requirements.

Test case

Condition Message Reason Pass/Fail


Login Login successful Authorized person pass
Login Invalid user Unauthorized person pass
Registration Registered All the inputs are in pass
successfully correct format
Registration Invalid data Some of the inputs are pass
not in correct format

IMPLEMENTATION:

Implementation is the stage in the project where the theoretical design is


turned into a working system. The implementation phase constructs, installs and
operates the new system. The most crucial stage in achieving a new successful
system is that it will work efficiently and effectively.

23
There are several activities involved while implementing a new project they are

 End user training


 End user Education
 Training on the application software
 System Design
 Parallel Run And To New System
 Post implementation Review

End user Training:

The successful implementation of the new system will purely upon the
involvement of the officers working in that department. The officers will be
imparted the necessary training on the new technology.

End User Education:

The education of the end user start after the implementation and testing is
over. When the system is found to be more difficult to under stand and complex,
more effort is put to educate the end used to make them aware of the system,
giving them lectures about the new system and providing them necessary
documents and materials about how the system can do this.

Training of application software:

After providing the necessary basic training on the computer awareness, the
users will have to be trained upon the new system such as the screen flows and
screen design type of help on the screen , type of errors while entering the data ,
the corresponding validation check at each entry and the way to correct the data
entered. It should then cover information needed by the specific user or group to
use the system.

24
6. FUTURE ENHANCEMENT

Further in this project Hostel Management System can be implemented with


Expenditure details, list of Employees, Online Admission for students . In
Expenditure details we can view about vegetables ,water bills and can view food
details on a particular day , etc,. List of employees namelist can also be viewed in
employee list, we can register in online for admission forms . These are the few
details were we can include in future enhancement.

25
7. CONCLUSION

Hostel Management System is a Customize and user-friendly software for


Hostel. It has been designed to automate, manage and look after the over-all
processing of even very large hostel. It is capable of managing Enquiry details,
Student Details, Payment Details etc. Hostel Management System is a Customize
and user-friendly software for Hostel which provide hostel information, hostel
room information, hostel accounts information.

Hostel Management Software System is offering a maximum of stability,


cost-effectiveness and usability. It provides the most flexible and adaptable
standards management system software solutions for hostel.

26
8. BIBLIOGRAPHY

BOOKS:

1. Pro VB 2008 and the .NET 3.5 Platform by Andrew Troelsen (Author)
2. Beginning SQL Server 2005 for Developers: From Novice to Professional
by Robin Dewson (Author)

WEBSITES:

 http://www.ccsuhostel.com
 http://www.excelanto.com
 http://www.indoconindia.com/hostel management system.aspx

27
9.APPENDICES

9.1 SAMPLE CODE

HomePage .cs :
namespace Hostel_Management_System{
public partial class Home : Form{
SqlDataReader dr;
SqlConnection con = new SqlConnection("server=BANU-
PC\\SQLSERVER1;database=Hostel_Management;uid=sa;pwd=dotnet;");
public static string username, admin_username;
public Home(){
InitializeComponent();}
private void but_login_Click(object sender, EventArgs e){
if (textBox1.Text == "admin" && textBox2.Text == "admin123"){
AdminPage admin = new AdminPage();
admin.Show();
this.Hide();}
else{
sql();}}
public void sql(){
con.Open();
SqlCommand cmd = new SqlCommand("Select username,password From Register Where
username='" + textBox1.Text + "'", con);
dr = cmd.ExecuteReader();
try{
if (dr.HasRows){
if (dr.Read())
if (textBox2.Text == dr["password"].ToString()){
Hostel_Management_Dashboard home = new Hostel_Management_Dashboard();
home.Show();

28
this.Hide();}
else{
MessageBox.Show("your passwod is in incorrect");}}
else{
MessageBox.Show("Incorrect username");}}
catch (Exception ex){
//MessageBox.Show('" + ex + "');}
finally{
dr.Close();}
con.Close();}
private void Lnk_register_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e){
NewRegister reg = new NewRegister();
reg.Show();
this.Show();}}}

Employee.cs :
namespace Hostel_Management_System{
public partial class Employees : Form{
SqlConnection con = new SqlConnection("server=BANU-
PC\\SQLSERVER1;database=Hostel_Management;uid=sa;pwd=dotnet;");
public Employees(){
InitializeComponent();}
private void Lnkbut_Back_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e){
AdminPage admin = new AdminPage();
admin.Show();
this.Hide();}
private void but_submit_Click(object sender, EventArgs e){
if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" ||
textBox5.Text == "" || textBox6.Text == "" || textBox6.Text == "" || textBox7.Text == "" ||
textBox8.Text == "" ){
MessageBox.Show("Empty Value Is Not Valid");}

29
else{
if (con.State == ConnectionState.Closed)
con.Open();
SqlCommand cmd = new SqlCommand("insert into
Employees(Employees_ID,Employees_Name,Address,Qualification,Contact_Number,E_mail_I
D,Designation,Basic_Salary)values('" + textBox1.Text + "','" + textBox2.Text + "','" +
textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" +
textBox7.Text + "','" + textBox8.Text + "')", con);
cmd.ExecuteNonQuery();
if (con.State == ConnectionState.Open)
con.Close();
MessageBox.Show("Submit Sucessfully");}}
public void Loadvalue(){
if (con.State == ConnectionState.Closed)
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from Employees", con);
DataSet ds = new DataSet();
sda.Fill(ds, "Employees");
dataGridView1.DataSource = ds.Tables[0].DefaultView;
if (con.State == ConnectionState.Open)
con.Close();}

Roomdetails.cs :
namespace Hostel_Management_System{
public partial class Rooms_Details : Form{
SqlConnection con = new SqlConnection("server=BANU-
PC\\SQLSERVER1;database=Hostel_Management;uid=sa;pwd=dotnet;");
public Rooms_Details(){
InitializeComponent();}
private void Lnkbut_Back_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e){
AdminPage admin = new AdminPage();

30
admin.Show();
this.Hide();}
private void but_submit_Click(object sender, EventArgs e){
if (textBox1.Text == "" || textBox2.Text == ""){
MessageBox.Show("Empty Value Is Not Valid");}
else{
if (con.State == ConnectionState.Closed)
con.Open();
SqlCommand cmd = new SqlCommand("insert into
Rooms_Details(Room_No,Capacity)values('" + textBox1.Text + "','" + textBox2.Text + "')",
con);
cmd.ExecuteNonQuery();
if (con.State == ConnectionState.Open)
con.Close();
MessageBox.Show("Submit Sucessfully");}}
public void Loadvalue(){
if (con.State == ConnectionState.Closed)
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from Rooms_Details", con);
DataSet ds = new DataSet();
sda.Fill(ds, "Rooms_Details");
dataGridView1.DataSource = ds.Tables[0].DefaultView;
if (con.State == ConnectionState.Open)
con.Close();}
private void Rooms_Details_Load(object sender, EventArgs e){
Loadvalue();}}}

Admission.cs :
namespace Hostel_Management_System{
public partial class Admission : Form{

31
SqlConnection con = new SqlConnection("server=BANU-
PC\\SQLSERVER1;database=Hostel_Management;uid=sa;pwd=dotnet;");
public Admission(){
InitializeComponent();}
private void Lnkbut_Back_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e){
AdminPage admin = new AdminPage();
admin.Show();
this.Hide();}
private void but_submit_Click(object sender, EventArgs e){
if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" ||
textBox5.Text == "" || textBox6.Text == "" || textBox6.Text == "" || textBox7.Text == "" ||
textBox8.Text == "" || textBox9.Text == "" || textBox10.Text == "" || textBox11.Text == "" ||
textBox12.Text == "" || textBox13.Text == "" ){
MessageBox.Show("Empty Value Is Not Valid");}
else{
if (con.State == ConnectionState.Closed)
con.Open();
SqlCommand cmd = new SqlCommand("insert into
Admission(Student_ID,Name_Of_Student,Stu_Class,Fathers_Name,Fathers_Occupation,Mother
s_Name,Mothers_Occupation,Address,stu_Date,stu_Post,stu_Pin,Date_Of_Birth,Medium_Of_H
igh_School_Studies)values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text +
"','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "','"
+ textBox8.Text + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" +
textBox12.Text + "','" + textBox13.Text + "')", con);
cmd.ExecuteNonQuery();
if (con.State == ConnectionState.Open)
con.Close();
MessageBox.Show("Submit Sucessfully");
}
}
}}

32
9.2 SCREEN SHOTS

HOME PAGE

ADMIN PAGE

33
ROOM DETAILS

ROOM SETTINGS

34
VISITORS

ADMISSION

35
EMPLOYEES

EMPLOYEE SALARY

36
OUTING REGISTER

LEAVE REGISTER

37
VIEW STUDENT

RENTAL FEES

38
MESS BILL

39

You might also like