Office Automation System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

OFFICE AUTOMATION SYSTEM

A PROJECT REPORT

Under the guidance of


Dimpi Dutta

Submitted by:
Bhargov Protim Bora
Reg.No: 1408003978

in partial fulfillment of the requirement for the award of the degree


of
Bachelor of Computer Applications
Department of Information Technology

July 2017
TABLE OF CONTENTS
Page

CHAPTER 1: INTRODUCTION 10

1.1 Background 10

1.2 Objective 10

1.3 Purpose, Scope and Applicability 10

1.3.1 Purpose 10

1.3.2 Scope 11

1.4 Achievements 11

1.5 Organization of Report 12

CHAPTER 2: SERVEY OF TECHNOLOGY 13

CHAPTER 3: REQUIREMENTS AND ANALYSIS 15

3.1 Problem Definition 15

3.2 Requirement Specification 16

3.3 Software and Hardware Requirements 53

3.3.1 Hardware Requirements 53

3.3.2 Software Requirements 53

3.4 Preliminary Product Description 54

3.5 Conceptual Models 61

3.6.1 Module Specifications 61

3.6.2 Screen Views 61

3.6.3 Data Flow Diagrams 63

CHAPTER 4: SYSTEM DESIGN 70

4.1 Basic Modules 70

4.2 Data Design 70

4.2.1 Schema Design 70


4.2.2 Data Integrity and Constraints 71

4.3 Procedural Design 72

4.3.1 Logic Diagrams 72

4.4 User Interface Design 74

4.5 Security Issues 74

CHAPTER 5: IMPLEMENTATION AND TESTING 78

5.1 Implementation Approaches 78

5.2 Coding Details and Code Efficiency 78

5.2.1 Coding 78

5.2.2 Code Efficiency 93

5.3 Testing Approach 93

5.3.1 Unit Testing 93

5.3.2 Integrated Testing 96

5.4 Modifications and Improvements 96

CHAPTER 6: RESULTS AND DISCUSSION 97

6.1 Test Reports 97

6.2 User Documentation 98

CHAPTER 7: CONCLUSION 101

7.1 Conclusion 101

7.2 Limitations of the System 101

7.3 Future scope of the Project 101

REFERENCES

GLOSSARY
1. INTRODUCTION
Today, computerized processing of transaction data is an activity of almost any
organization. In this generation, every bodys life becomes in computerized. They go
ahead with the computer. The areas of computer applications are literally too
numerous to mention. Computers have become an integral part of mans every day.
They dominate every sphere of life be it entertainment, education, banking,
insurance, medicine, design or manufacturing. Actually this generation is the era of
rapid growth of Information Technology. IT has change the working process in all
fields of human being. So they continue grow and the open new horizons of discovery
and application. One of the primary reasons for the immense popularly of computers
is the speed with which they can accomplish specific tasks. However computer
applications are not always easy to use.

I have designed a project titled Office automation system. It is a simple, small


system illustrated by the most common features of ASP.Net and C#.Net. This project
covers almost all the features needed for an office. The Office automation system can
manage all the records efficiently with this project.

The basic language used in this project are ASP.Net with C#.Net and the
database is created using Microsoft SQL Server 2005.

1.1 Background

The existing system in the office is manual, which is quite tedious and more difficulties
arise in the project management system. The Existing is not automated. The Project
Allotments or the respective documentation is maintained manually in paper, some of
the datas are only computerized. All the operations adding, modifying and deleting
the order of, system administrator by performs various user and document manually.
The project manager does not control all the management. The datas are not shared
systematically. The data sharing is done through manually.
1.2 Objective

Project Office automation system aims at creating an application which will automate
the processes in college office. Using this it is possible to keep a database of college
information like information about the students studying in various courses, employee
information in various departments, staff and non staff details etc. Transaction
involving fee and salary is also stored. Fees receipts are generated for students.
Reports are maintained for future usage. Search engine is used to search required
information.

1.3 Purpose and Scope

1.3.1 Purpose

Office automation system would have the following goals.

Provide a desktop user interface to add, view, delete records in different


areas.
Provide a user interface to generate reports.
Provide a user interface to change details of all employees and provide
option to apply leave through the system.
Provide a user interface for administrator to manage the accounts and
database.

1.3.2 Scope

The main scope and deliverables of the project would be to:

Understand and prepare detailed requirement and specifications


Prepare high level and detailed design specifications of the system
Prepare Test Plan and Test cases
Develop the system and coding
Perform unit testing, integration and system testing
Demonstrate a bug free application after suitable modification if needed.

1.4 Achievements

By successfully implementing the project, a substantial knowledge has been acquired


on the implementation of a database system using .net technologies. This knowledge
will be useful in the future in creating any type of desktop application or online
database systems.
2. SURVEY OF TECHNOLOGY
In a desktop application like Laboratory Management System, there is a scope for a
large number of platforms, languages and frameworks to choose from. Before
selecting from this large array of technologies, the following aspects, which are
characteristic to windows based application like this one, have been kept in mind:

Data validation
Performance
Reliability
Scalability
Security
Portability
Performance
Time constraint
Cost constraint

The various technologies available for consideration are as follows:

Operating System: Windows 7

Platform : .net Framework 4.0

Front End Tool: ASP.net with C#.net

Backend Database : SQL Server 2008

.NET Architecture:
DATABASE AN OVERVIEW
A Database is a single organized collection of structured data stored with a minimum
of duplication of data items so as to provide a consistent and controlled pool of data.
This data is common to all users of the system but is independent of programs which
use the data. The independence of database and programs using it means that they
can be changed without changing the other. The users of the database may find it
convenient to imagine that they are using integrated file system.

RDBMS:
RDBMS is an acronym for relational database management system and can be defined
as data program for general purpose data storage and retrieval that organized data
into table consisting the same set of data items (columns). The data is stored in the
Kernel to maintain data security. RDBMS is the database in which multiple tables can
be associated or related to one another based on common data items or files within
the tables. RDBMS provides a way of doing tasks in an understandable and reasonably
uncomplicated manner.

For Example, a name and address file might columns for name, street, city, state, pin
and phone number. A record can be created for each person by filling each field.
Another table consists of the name, employers name and dept. The two tables hold a
relationship where each person has an entity. One of the major features of RDBMS is
the ability to generate a new file with data from two related files.

Functions of RDBMS:
The most important functions of RDBMS are as mentioned below:

Defines database
Modifies structure of database
Queries the database
Adds and deletes the database
Controls the database
Secure Access from public users
Communicate within network
Export and import of data.

Microsoft Visual Studio .Net:


Visual Studio.Net is the tool for rapidly building enterprisescale ASP Web applications
and high performance desktop applications. Visual Studio includes componentbased
development tools, such as Visual C#, Visual Basic, Visual C++, as well as a number of
additional technologies to simplify team-based design, development and deployment
of our solutions.

Visual Studio supports .Net framework, which provides a common language runtime
and unified programming classes. The biggest facility of ASP.Net is everything is
object-oriented. All aspects of OOP are implemented in ASP.Net and we can also
create multithreaded applications in ASP.Net. Also included in it is the MSDN Library,
which contains all the documentation for these development tools.

From Visual Basic 1.0, which radically simplified writing Windows Applications, to
Visual Basic 4.0, which helped to establish COM2 as the standard Windows object
architecture, the VB language has been a cornerstone of the Windows platform for
nearly a decade.

Now, as applications are evolving from a standalone executable sitting on a users


hard drive to a distributed application delivered by the Web server across the
Internet, Microsoft is expanding away from simply providing an operating system:
Microsoft is providing XML web services as well. A key part of Microsofts thrust into
this new XML web services space is the .Net Framework, designed from the ground up
to allow developers to write and deploy complex Web applications easily.

ASP.Net is the pillar of the .Net Framework, and yet another step forward in evolution
of the language. It is a high level programming language for the .net Framework, and
provides the easiest point of entry to the Microsoft .Net platform.
THE .NET FRAMEWORK
The .Net Framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. It is design to fulfill
the following objectives:

To provide a consistent object-oriented programming environment


whether object code is stored and executed locally but Internet-
distributed or executed remotely.
To provide a code-execution environment that minimizes software
deployment and versioning conflicts.
To provide a code-execution environment that guarantees safe
execution of code, including code created by an unknown o semi-
trusted third party.
To provide a code-execution environment that eliminates the
performance problems of scripted or interpreted environments.
To make the developer experiences consistent across widely varying
types of applications, such as Windows-based applications and Web-
based application.
To build all communication on industry standards to ensure that code
based on the .Net Framework can integrate with any other code.
3. REQUIREMENTS AND ANALYSIS

3.1 Problem Definition

Problems with conventional system


1. Lack of immediate retrievals: -The information is very difficult to retrieve and to
find particular information like- E.g. - To find out the employee details, the user
has to go through various registers. This results in inconvenience and wastage of
time.
2. Lack of immediate information storage: - The information generated by various
transactions takes time and efforts to be stored at right place.
3. Lack of prompt updating: - Various changes to information are difficult to make
as paper work is involved.
4. Error prone manual calculation: - Manual calculations are error prone and take
a lot of time this may result in incorrect information.
5. Preparation of accurate and prompt reports: - This becomes a difficult task as
information is difficult to collect from various registers.

3.2 Requirement Specification

Requirements Specification involves the basic requirements that the system to be


developed should posses. These can be broadly classified into two types.

1. Performance Requirements.
2. Functional Requirements.
Understanding the requirements specification is critical for the projects success
otherwise the system does not get developed according to the customers wishes.

Performance Requirements:

1. The system should be built in a way such that it is independent of the type of
database used (SQL Server, Oracle etc).

2. Response should be fast.

3. High throughput.

4. Security should be high such that no intruder can tamper with data.
5. The access of the system should be traceable to identify who are the users of the system
and when they last logged in to the system.

3.3 Hardware and Software Requirements

Hardware Requirement

The server on which this project is to be installed may have the following minimum
hardware requirements:

Intel Core2duo 2.2 GHz or more


1 GB RAM
At least 500MB free space
CD/DVD writer for backup purpose
Leased line internet access with a bandwidth of at least 2 Mbps since this
system is to be on internet

The client side any low end computer with internet access facility can be used.

Software Requirement
Microsoft SQL Server 2008
ASP.net with C#
.net framework 4.0
IIS
3.5 Conceptual Models

DATA FLOW DIAGRAM

What it is?

The Data Flow Diagram shows the flow of data or information. It can be
partitioned into single processes or functions. Data Flow Diagrams can be grouped
together or decomposed into multiple processes. There can be physical DFD's that
represent the physical files and transactions, or they can be business DFD's (logical, or
conceptual).

When it's used?

The DFD is an excellent communication tool for analysts to model processes


and functional requirements. One of the primary tools of the structured analysis
efforts of the 1970's it was developed and enhanced by the likes of Yourdon,
McMenamin, Palmer, Gane and Sarson. It is still considered one of the best modeling
techniques for eliciting and representing the processing requirements of a system.

Used effectively, it is a useful and easy to understand modeling tool. It has


broad application and usability across most software development projects. It is easily
integrated with data modeling, workflow modeling tools, and textual specs. Together
with these, it provides analysts and developers with solid models and specs. Alone,
however, it has limited usability. It is simple and easy to understand by users and can
be easily extended and refined with further specification into a physical version for the
design and development teams.

The different versions are Context Diagrams (Level 0), Partitioned Diagrams
(single process only -- one level), functionally decomposed, leveled sets of Data Flow
Diagrams.

Data Store

It is a repository of information. In the physical model, this represents a file,


table, etc. In the logical model, a data store is an object or entity.
DataFlows
DFDs show the flow of data from external entities into the system, showed
how the data moved from one process to another, as well as its logical storage. There
are only four symbols:

Squares representing external entities, which are sources or destinations of


data.
Rounded rectangles representing processes, which take data as input, do
something to it, and output it.
Arrows representing the data flows, which can either, be electronic data or
physical items.
Open-ended rectangles representing data stores, including electronic stores
such as databases or XML files and physical stores such as or filing cabinets or
stacks of paper.

There are several common modeling rules for creating DFDs:

All processes must have at least one data flow in and one data flow out.
All processes should modify the incoming data, producing new forms of
outgoing data.
Each data store must be involved with at least one data flow.
Each external entity must be involved with at least one data flow.
A data flow must be attached to at least one process.

DFDs are nothing more than a network of related system functions and
indicate from where information is received and to where it is sent. It is the starting
point in the system that decomposes the requirement specifications down to the
lowest level detail.

The four symbols in DFD, each of which has its meaning. They are given below:

External entities are outside to system but they either supply input data in the
system or use the system output. These are represented by square of
rectangle. External entities that supply data into a system are sometimes called
Sources. External entities that use system data are sometimes called sinks.
Dataflow models that passages of data in the system and are represented by
line by joining system components. An arrow indicates the direction of the
flow and the line is labeled by the name of the dataflow.
Process show that the systems do. Each process has one or more data inputs
and one or data outputs. Circles in DFD represent them. Each high level
process may be consisting of more than one lower level processes. Process will
be expanded in sequent level DFD. A circle or a bubble represents a process
that transforms incoming data flow into outgoing dataflow.

The high level processes in a system are:

Receivable process.
Verifiable process.
Disposal process.

File or data store is a repository of data. They contain data that is retained in
the system. Process can enter data into data store or retrieved data from the
data store. An open rectangle is a data store, data at rest.
The following diagrams illustrate the notation and the symbols used to create the DFDs.

: A process.

: The external entities i.e. user.

: The arrowhead shows the flow of information


Request Store
User Office
Database
Management
Response
System Access

Context Diagram

DFD LEVEL 1

Login info

User name
User LOGIN Login

Password 1.0
Login status

Data
Data
User Employee
Employee data
Info management
Info

2. 0
Leave data Leave data
Employee
User
Leaves management
Status Status
3. 0

leaves

Student data Student data


Student user
Fees management
Status Status
4.0

Fees

Status
Log Data
Employee
User
Call Log
Log Data
5.0

Call Log
Entity-Relationship Model

Simply stated the ER model is a conceptual data model that views the real
world as entities and relationships. A basic component of the model is the Entity-
Relationship diagram which is used to visually represent data objects. Since Chen
wrote his paper the model has been extended and today it is commonly used for
database.

Basic Constructs of E-R Modeling


The ER model views the real world as a construct of entities and association
between entities.

Entities
Entities are the principal data object about which information is to be collected.
Entities are classified as independent or dependent (in some methodologies, the terms
used are strong and weak, respectively). An independent entity is one that does not rely
on another for identification. A dependent entity is one that relies on another for
identification. .

Relationships
A Relationship represents an association between two or more entities.
Relationships are classified in terms of degree, connectivity, cardinality, and existence.

Attributes
Attributes describe the entity of which they are associated. A particular instance
of an attribute is a value. The domain of an attribute is the collection of all possible
values an attribute can have. The domain of Name is a character string.

Classifying Relationships
Relationships are classified by their degree, connectivity, cardinality, direction,
type, and existence. Not all modeling methodologies use all these classifications.
Degree of a Relationship
The degree of a relationship is the number of entities associated with the
relationship. The n-ary relationship is the general form for degree n. Special cases are
the binary, and ternary, where the degree is 2 and 3 respectively.

Connectivity and Cardinality

The connectivity of a relationship describes the mapping of associated entity


instances in the relationship. The values of connectivity are "one" or "many". The
cardinality of a relationship is the actual number of related occurrences for each of the
two entities. The basic types of connectivity for relations are: one-to-one, one-to-many,
and many-to-many.

Direction
The direction of a relationship indicates the originating entity of a binary
relationship. The entity from which a relationship originates is the parent entity; the
entity where the relationship terminates is the child entity.

The direction of a relationship is determined by its connectivity type .An


identifying relationship is one in which one of the child entities is also a dependent
entity. A non-identifying relationship is one in which both entities are independent.

Existence
Existence denotes whether the existence of an entity instance is dependent upon
the existence of another, related, entity instance. The existence of an entity in a
relationship is defined as either mandatory or optional.

Generalization Hierarchies
A generalization hierarchy is a form of abstraction that specifies that two or
more entities that share common attributes can be generalized into a higher level entity
type called a supertype or generic entity. The lower-level of entities become the
subtype, or categories, to the supertype. Subtypes are dependent entities.
ER Notation

The symbols used for the basic ER constructs are:

Entities are represented by labeled rectangles. The label is the name of the
entity.
Relationships are represented by a solid line connecting two entities. The
name of the relationship is written above the line. Relationship names should
be verbs.
Attributes, when included, are listed inside the entity rectangle. Attributes
which are identifiers are underlined. Attribute names should be singular nouns.
Cardinality of many is represented by a line ending in a crow's foot. If the
crow's foot is omitted, the cardinality is one.
Existence is represented by placing a circle or a perpendicular bar on the line.
Mandatory existence is shown by the bar (looks like a 1) next to the entity for
an instance is required. Optional existence is shown by placing a circle next to
the entity that is optional.
Existence is represented by placing a circle or a perpendicular bar on the line.
Mandatory existence is shown by the bar (looks like a 1) next to the entity for
an instance is required. Optional existence is shown by placing a circle next to
the entity that is optional.
3. SYSTEM DESIGN

System design is the solution to the creation of a new system. This phase is
composed of several systems. This phase focuses on the detailed implementation of
the feasible system. It puts emphasis on translating design specifications to
performance specification. System design has two phases of development logical and
physical design.

Designing a system mainly focuses on the detailed implementation of the


proposed system. It emphasizes on translating performance specifications recorded at
the time of system study into design specifications.

3.1 Basic Modules

Login
Administrator
Employees
Leave Details
Call Log

3.2 INPUT DESIGN

Very careful attention had to be given to input design, which is a major part of
the overall system design. In order to make the data entry as easy, logical and error
free as possible, specific standards had been followed. Validation checks, provided in
the system prevented the user in entering incorrect, erroneous data. This made sure
that, only valid data had been available for data processing. If valid data was entered,
then meaningful error messages had been prompted to enter correct data. The
interactive screen formats facilitate the entry of valid data.

3.2.1 VALIDATIONS:

Some fields are having only number, as an I/P. For this key ASCII is checked. If
they entered characters, it would display the message to enter number only. Exchange
rates field will be validated for number and dot symbols.
3.2.2 INPUT DESIGN OBJECTIVES:
The numbers of clear objectives of input design are,
To produce a cost effective method of input
To achieve the highest possible level of accuracy
To ensure that the input is acceptable to and understand by the user
staff

3.3 OUTPUT DESIGN:

Output, as you probably know, generally refers to the results and information
that are generated by the system. For many end-users, output is the main reason for
developing the system and the basis on which they will evaluate the usefulness of the
application. Most end users will not actually operate the information system or enter
data through workstations, but they will use the output from the system.
When designing output, systems analysts must accomplish the following.
Determine what information to present
Decide whether to display, print, or speak the information and select the
output medium.
Arrange the presentation of information in an acceptable format.
Decide how to distribute the output to intended recipients.
That alignment of information on a display or printed document is termed as layout.
Accomplishing the general activities listed above will require specific decisions, such as
whether to use preprinted forms when preparing reports and documents, how many
lines to plan on a printed page, or whether to use graphics and color.
The output design is specified on layout performs, sheets that describe the
location characteristics, and format of the column headings and pagination. As we
indicated at the beginning of this discussion, these elements are analogous to an
architects blue print that shows the location of the each component.
3.4 DATABASE DESIGN

The general theme behind a database is to handle information as an integrated


whole. A database is a collection of inter-related data stored with minimum
redundancy to serve single users quickly and efficiently. The general objective is to
make information necessary, quick, inexpensive and flexible for the user.

Database structure
TABLE NAME: employee

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


Empid varchar 10 Primary key
Name varchar 20
Address varchar 50
Phone char 10 yes
Gender varchar 10
Dob varchar 12
Doj varchar 12
Department varchar 10
Designation varchar 20
Photo varchar max
Category varchar max
Edu qualification varchar 30
Refresher varchar 30 yes
Course
Basic varchar 20
Grade pay varchar 15
DA varchar 15
HRA varchar 15
Medical varchar 15

TABLE NAME: login

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


Empid varchar 10 Primary key
Password varchar 20
Permission varchar 20
TABLE NAME: department

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


dno varchar 20 Primary Key
dname varchar 20
yearstarted varchar 10
course varchar 15

TABLE NAME: student

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


rollno varchar 10 Primary Key
name varchar 30
course varchar 10
year varchar 10
TABLE NAME: leaveapplied

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


Leaveid varchar 10 Primary key
AppliedOn varchar 10
leavetype varchar 10
leavefrom varchar 10
Leaveto varchar 10
Nodays varchar 10
Isgranted varchar 10

TABLE NAME:serviceEngg

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


empid varchar 10 Primary key
name varchar 20
areaofspecialization varchar 20
password varchar 15

TABLE NAME: Fees

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


feesid varchar 10 Primary key
type varchar 10
amount varchar 10
datepaid varchar 15
TABLE NAME: callLog

FIELD DATATYPE SIZE ALLOW NULL CONSTRAINTS


callno varchar 10 Primary key
date varchar 12
calltype varchar 10
description varchar 30
urgency varchar 30
resolved varchar 30
remarks varchar 30
5. IMPLEMENTATION AND TESTING

5.1 Implementation approaches

The Software Design Description Document has been used as input in the
implementation process. The actual implementation has been done using VB.net.
VB.NET has been used to interact with the backend database. In this
implementation, MS SQL Server has been used as the backend RDBMS. VB.NET
processes the inputs or commands given by the user and translates them in the
commands understandable to the backend database. The output produced by the
backend database are also handled by VB.NET which then displayed on the desktop
screen.

Coding and Screenshots


Index page
Admin Page

Employee Registration Page


Create User Page

Employee Details Page


Employee Home Page

Apply Leave Page


Coding of index page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data;
using System.Data.SqlClient;

public partial class Index : System.Web.UI.Page


{
SqlConnection con = new SqlConnection("server=localhost\\sqlexpress;Initial
Catalog=Office;integrated security=true;");
protected void Page_Load(object sender, EventArgs e)
{

}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
if (rbuser.Checked == true)
{
login();
}
else if (rbse.Checked == true)
{
logse();
}
else
{
Label1.Text = "Select User Type";
}

}
void login()
{
SqlDataAdapter da = new SqlDataAdapter("select * from login where
empid='" + txtuser.Text + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
{
Label1.Text = "User Not Found";
}
else
{

if (txtpass.Text ==
ds.Tables[0].Rows[0].ItemArray[1].ToString())
{
Label1.Text = "Successfull";
Session["Uname"] = txtuser.Text;
Session["Permission"] =
ds.Tables[0].Rows[0].ItemArray[2].ToString();
if (Session["Permission"].ToString() == "Admin")
{
Response.Redirect("Admin.aspx");
}
else if (Session["Permission"].ToString() == "User")
{
Response.Redirect("MHome.aspx");
}
}
else
{
Label1.Text = "Invalid Password. Try Again...";
}
}
}

void logse()
{
SqlDataAdapter da = new SqlDataAdapter("select * from serviceEngg where
empid='" + txtuser.Text + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
{
Label1.Text = "User Not Found";
}
else
{
if (txtpass.Text == ds.Tables[0].Rows[0].ItemArray[3].ToString())
{
Label1.Text = "Successfull";
Session["Uname"] = txtuser.Text;
Response.Redirect("xxxx.aspx");
}
else
{
Label1.Text = "Invalid Password. Try Again...";
}
}
}
}

Coding of Admin Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Admin : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

//if (Session["Permission"] != "Admin")


//{
// Response.Redirect("index.aspx");
//}
}
}
protected void ImageButton7_Click(object sender, ImageClickEventArgs e)
{
Session.Clear();
Response.Redirect("index.aspx");
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("employee.aspx");
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("ViewEmp.aspx");
}
protected void ImageButton6_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("department.aspx");
}
protected void ImageButton5_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("student.aspx");
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("fees.aspx");
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("serviceEngg.aspx");
}
protected void ImageButton9_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("login.aspx");
}
protected void ImageButton8_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("ViewLeaves.aspx");
}
}

Coding of Employee Registration page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class Employee : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection("server=localhost\\sqlexpress;database=Office;integrated
security=true;");
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Label1.Text = Session["uname"].ToString();
}
}
protected void ddlmedical_SelectedIndexChanged(object sender, EventArgs e)
{

}
protected void btnreset_Click(object sender, EventArgs e)
{
txtaddress.Text = "";
txtbasic.Text = "";
txtda.Text = "";
txtdoj.Text = "";
txtemployeeid.Text = "";
txtgradepay.Text = "";
txthra.Text = "";
txtmedical.Text = "";
txtname.Text = "";
txtphone.Text = "";
txtrefreshercourse.Text = "";
ddlcategory.Text = "";
ddldepartment.Text = "";
ddldesignation.Text = "";
ddleduqualification.Text = "";
ddlgender.Text = "";
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
try
{
con.Open();
SqlCommand com = new SqlCommand("insert into employee values('" +
txtemployeeid.Text + "','" + txtname.Text + "','" + txtaddress.Text + "','" +
txtphone.Text + "','" + ddlgender.Text + "','" + txtdob.Text + "','" +
txtdoj.Text + "','"+ ddldepartment.Text +"','"+ ddldesignation.Text +"','"+
ddlcategory.Text +"','"+ ddleduqualification.Text +"','"+
txtrefreshercourse.Text +"','"+ txtbasic.Text + "','"+ txtgradepay.Text +"','"+
txtda.Text +"','"+ txthra.Text + "','"+ txtmedical.Text +"','Path')", con);
com.ExecuteNonQuery();
con.Close();
Response.Redirect("employee.aspx");
}
catch (Exception ex)
{
con.Close();
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Clear();
Response.Redirect("index.aspx");
}
}

Coding of Create User Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class Login : System.Web.UI.Page


{
SqlConnection con = new SqlConnection("server=localhost\\sqlexpress;Initial
Catalog=Office;integrated security=true;");
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
SqlCommand com = new SqlCommand("Select empid from employee", con);
con.Open();
SqlDataReader reader;
reader = com.ExecuteReader();
while (reader.Read())
{
ddempid.Items.Add(reader["empid"].ToString());
}
reader.Close();
con.Close();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand com = new SqlCommand("insert into login values('" +
ddempid.Text + "','" + txtpassword.Text + "','" + ddpermission.Text + "')",
con);
com.ExecuteNonQuery();
Response.Redirect("login.aspx");
con.Close();
}
}
Coding of Employee Details Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class ViewEmp : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection("server=localhost\\sqlexpress;database=Office;integrated
security=true;");

protected void Page_Load(object sender, EventArgs e)


{
if (!IsPostBack)
{
//Label1.Text = Session["uname"].ToString();
loadRec();
}
}
void loadRec()
{
SqlDataAdapter da = new SqlDataAdapter("Select * from employee", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
protected void btngo1_Click(object sender, EventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("Select * from employee where
name='"+ txtname.Text +"'", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
protected void btngo2_Click(object sender, EventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("Select * from employee where
designation='"+ ddldesignation.Text +"'", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
protected void btnref_Click(object sender, EventArgs e)
{
loadRec();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Clear();
Response.Redirect("index.aspx");
}
}

Coding of Employee Home Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class MHome : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//lbluser.Text=Session["uname"].ToString();
}
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
Session.Clear();
Response.Redirect("index.aspx");
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("leaveapplied.aspx");
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("callLog.aspx");
}
}

Coding of Leave Apply Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class leaveapplied : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection("server=localhost\\sqlexpress;database=Office;integrated
security=true;");
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Label2.Text = Session["uname"].ToString();
loadrec();
}
}
protected void txtappliedon_TextChanged(object sender, EventArgs e)
{

}
protected void btnsubmit_Click(object sender, EventArgs e)
{
try
{
con.Open();
SqlCommand com = new SqlCommand("insert into leaveapplied values('"
+ Session["empid"].ToString() + "','" + txtappliedon.Text + "','" + ddleavetype
+ "','" + txtleavefrom.Text + "','" + TxtleaveTo.Text + "','" + txtnoofdays.Text
+ "','Pending')", con);
com.ExecuteNonQuery();
con.Close();
Response.Redirect("leaveapplied.aspx");
}
catch (Exception ex)
{
con.Close();
}
}
protected void btnreset_Click(object sender, EventArgs e)
{
txtappliedon.Text = "";
//txtisgranted.Text = "";
txtleavefrom.Text = "";
//txtleaveid.Text = "";
TxtleaveTo.Text = "";
txtnoofdays.Text = "";
//ddleavetype.Text = "";
}
void loadrec()
{
//Session["empid"] = "e1";
SqlDataAdapter da = new SqlDataAdapter("Select
employeeid,appliedon,leavefrom,leaveto,nodays,isgranted from leaveapplied where
employeeid='" + Session["empid"].ToString() + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Clear();
Response.Redirect("index.aspx");
}
}

Coding of Employee Profile Page

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 empProfile : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection("server=localhost\\sqlexpress;database=Office;integrated
security=true;");
protected void Page_Load(object sender, EventArgs e)
{
lblempid.Text = Session["uname"].ToString();
Label1.Text = Session["uname"].ToString();
loadRec();
}
void loadRec()
{
SqlDataAdapter da = new SqlDataAdapter("select
name,address,phone,gender,dob,photo from employee where empid='" + lblempid.Text
+ "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
txtname.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString();
txtaddress.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString();
txtphone.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString();
ddlgender.Text = ds.Tables[0].Rows[0].ItemArray[3].ToString();
txtdob.Text = ds.Tables[0].Rows[0].ItemArray[4].ToString();
txtpath.Text = ds.Tables[0].Rows[0].ItemArray[5].ToString();
Image1.ImageUrl = txtpath.Text;
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand com = new SqlCommand("Update employee set name='" +
txtname.Text + "',address='" + txtaddress.Text + "',phone='" + txtphone.Text +
"',gender='" + ddlgender.Text + "',dob='" + txtdob.Text + "',photo='" +
txtpath.Text + "' where empid='" + lblempid.Text + "'", con);
com.ExecuteNonQuery();
con.Close();
Response.Write("<script>alert('Profile Successfully
Updated');</script>");
Response.Redirect("empProfile.aspx");
}
}
Coding of View Leaves Page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class ViewLeaves : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection("server=localhost\\sqlexpress;database=Office;integrated
security=true;");
protected void Page_Load(object sender, EventArgs e)
{
//loadRec();
}
//void loadRec()
//{
// SqlDataAdapter da = new SqlDataAdapter("select * from leaveapplied
where isgranted='Pending'", con);
// DataSet ds = new DataSet();
// da.Fill(ds);
// GridView1.DataSource=ds.Tables[0];
// GridView1.DataBind();
//}

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)


{
txtempid.Text = GridView1.SelectedRow.Cells[1].Text;
txtlid.Text = GridView1.SelectedRow.Cells[0].Text;
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand com=new SqlCommand("Update leaveapplied set isgranted='"+
ddap.Text +"' where leaveid='"+ txtlid.Text +"'",con);
com.ExecuteNonQuery();
con.Close();
Response.Redirect("ViewLeaves.aspx");
}
}
5.2 Code efficiency

Code efficiency has been achieved through proper validation using various methods
in VB.net coding. Fist no reminder data can be added, viewed, edited and d e l e t e d
t o database w i t h o u t l o g i n o r s e s s i o n . For t h i s w e h a v e implanted session
tracking techniques through VB.net. Codings have been used to validate various
f o r m s to ensure correct data should enter in database.

5.3Testing Approach
Unit testing and integration testing have been carried out as per the
test cases designed at paragraph 4.6.

TESTING PROCEDURES

Unit Testing: A Unit corresponds to a form/class in the package. Unit testing focuses
on verification of the corresponding form or class. In this level we have tested all our
forms/classes individually. This testing includes testing of control paths, interfaces,
local data structures, logical decisions, boundary conditions, and error handling. From
this testing we were able to save, retrieve, update, delete and the search
records on a table.
Integration Testing: Integration testing is used to verify the combination of the
software modules. In this level, we have tested by combining all unit tested
forms into a subsystem. Here we found that the subsystems are performing
well.
System Testing: System testing is used to verify, whether the developed system meets
the requirements.
Acceptance Testing: Acceptance is the part of the project by which the customer
accepts the product. The system under consideration is tested for user acceptance by
constantly keeping in touch with the system users at time of developing and making
changes whenever required.

We hope that after the acceptance testing the system will perform the best result for
the organization. When modification will be made, we will use regression testing
during the maintenance of the system.
The Software System delivered to the customer may undergo changes. Changes may
be due to addition of new functional modules or performance enhancement .For this
purpose proper maintenance of the system is must.

5.3.1 Unit Testing

Test case Ref No TCT-001

Functionality : Log in to the System

Expected outcome : The user should not login to members area


. and some error message follow

Step No. Data Used Actual Outcome


1. Click on the log in button An alert message came to enter
without entering username or username
password
2. Click on the log in button An alert message came to enter
after entering some username password
leaving password field blank
3. Click on the log in button An alert message came to enter
after entering some password username
but leaving username field
blank
4. Click on the log in button A message displayed on Log in
after entering some wrong page about this
username but correct
password

Test case Ref No TCT-002

Functionality : Enter valid Data for employee registration

Expected outcome : The user should not get register any record without
filling all necessary fields and some error message
follow
The user should not get registered again with same
patient id
Step No. Data Used Actual Outcome
1. Click on the save button An alert message came to each
without entering valid details details and focused on the
respective fields
2. Click on the submit button A message displayed about
after entering a duplicate existence of such patient
patient id

6. RESULTS AND DISCUSSION

6.1 Test Reports

Test Case No Date Pass / Fail


TCT-001 11/2/2013 Pass
TCT-002 02/3/2013 Pass
TCT-003 05/3/2013 Pass
7. DOCUMENTATION

For Management
Office Automation System is primarily designed for providing information
from the data after processing them. This system is designed for supplying
information to the strategic level of management from the operational
control. It includes almost all the functional areas needed like keeping
Employee Records Student Records and Fees Records.

For User
With this electronic data processing system, the operators will able to
maintain the following task:

Information regarding Patients.


Records of Test Report with their details.
Regular Transaction Details

For data processing department


In maintenance, the data processing department needs to create
backup of the database file from time to time.
The main menu of the system provides different menus for
different purposes.
FUTURE APPLICATION

Software development is never ending process and continues the life of the software
as per the changing needs of the user from time to time. The project is no doubt has
been developed keeping in mind easy modification and enhancement that may be
required from time to time.

However, there are many scopes to modify this software. As because due to
shortage of time, we here become unable to include many things. We are trying to
cover all the existing system for student record management and all official
information details but due to shortage of time we become unable to include many
things.

This project has many future applications like it can be used in any Medical
Laboratory or Diagnostic Center.

This project was build keeping in mind all the requirements of an educational
institutes and it can be implemented in any such type of organization with very few
modification. With modifications it can be possible use this system in a network.

But incorporating all these features needs more time. It is not possible to
develop such a huge extensive project within this limited time. So the project is
designed in such a way that it can be modified in future easily. The tables are given in
such a way to make understanding of the system easy.
CONCLUSION

After implementing the application it will contain the advantages were incomparable
to the present contemporary systems used by company. The most admirable feature
founded was its simplicity in terms of application to the user but its highly beneficial
outputs cant be ignored. The users will be highly benefited after using the system.

It is hoped that this project will help the future developers to modify and implement
the system. After modifying some techniques of the programs, it will give us the best
performance as our requirements. The project will be very useful for the users.

You might also like