Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The basic idea of this project is to make the data management process easy. In the past, it was
difficult for the organizations to maintain a complete record of details of the employees at a
single place, with their leaves account. It was very difficult to maintain the details and resulted in
the creation of different departments just to maintain these records which led to the generation of
a large number of hard copies of the records of all the employees of the organization.
With the help of computers, these hard copies of records were converted into soft copies. But
still, different details of a particular employee were maintained at the different department. The
haphazard arrangement of data resulted in many loopholes. Most of all, it consumed a lot of time
and often lacked transparency.
Nowadays, running a company has become more difficult. Demands on the time and effort of
company executives as well as the employee needs are increased day by day. We are trying to
make an application which can meet these demands efficiently.
In a nutshell, our goal is to develop a system which has a central database which would maintain
all the records of each and every employee. This will increase clarity, reduce expenses and
maintain a high level of service within and outside the organization.
An employer can use the system to combine all of that data into a single and simple employee
profile system in spite of keeping attendance record in one database program and performance
reviews of the employees in another word processing program. This is how the modern
technology can be helpful to fulfill the new needs.
THE EXISTING SYSTEM
The current system works manually. It has got a lot of intricacies within itself and needs a lot of
human effort and paper works. Also, the data needs to be maintained on ledgers and this is a
tedious and risky process.
As the usage of the system increases, data increases exponentially which makes managing it
more and more difficult. For viewing a single entry, a lot of papers need to be searched
which consumes much amount of time.
Some of the negative aspects of the current system are given below:
1) The process consumes a lot of time. All the paper records needed to be searched while a
query is brought.
2) Readability can be compromised. Since they are paper records, different people may have
written them causing various writing formats resulting in difficulty to understand.
3) Paper records are not reliable. If the paper is damaged, it can result in loss of records.
4) As many people are involved in the maintenance of records, this may lead to high
expenses for adding manpower.
5) Access by illegitimate users can lead to distortion of records. Security of the manual
system is not fully guaranteed. Inaccuracy can be expected and data can easily get
corrupted or damaged.
Data Flow Diagram
‘0’ Level
‘1’ level
Employee
Logi
n
Apply View
Statu
Leaves
s
‘2’ Level
Employee
Login view
applies Check
Application
Status
Check Update
Leave
Application
Update
View Leaves Status
Leave
Report
HR
E-R Diagram
Employee
Appli
es for
Leaves Update HR
s
Database Structure
Employee
Attributes Datatype Features
EmpId Numeric(10) Primary Key
FirstName Varchar(50)
LastName Varchar(50)
Address Varchar(300)
DateOfBirth Datetime
DateOfJoin Datetime
Status Varchar(10)
Leaves
Attributes Datatype Features
EmpId Numeric(10) Foreign Key
FromDate Datetime
ToDate Datetime
Reason Varchar(300)
ApprovalStatus Varchar(50)
Software Requirement:
Hardware Requirement:
C# .Net
C# Language
C# syntax is highly expressive, yet with less than 90 keywords, it is also simple and easy
to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C,
C++ or Java. Developers who know any of these languages are typically able to begin working
productively in C# within a very short time. C# syntax simplifies many of the complexities of C+
+ while providing powerful features such as null able value types, enumerations, delegates,
anonymous methods and direct memory access, which are not found in Java. C# also supports
generic methods and types, which provide increased type safety and performance, and iterators,
which enable implementers of collection classes to define custom iteration behaviors that are
simple to use by client code.
As an object-oriented language, C# supports the concepts of encapsulation, inheritance
and polymorphism. All variables and methods, including the Main method, the application's
entry point, are encapsulated within class definitions. A class may inherit directly from one
parent class, but it may implement any number of interfaces. Methods that override virtual
methods in a parent class require the override keyword as a way to avoid accidental redefinition.
In C#, a struct is like a lightweight class; it is a stack-allocated type that can implement interfaces
but does not support inheritance.
In addition to these basic object-oriented principles, C# facilitates the development of
software components through several innovative language constructs, including:
Encapsulated method signatures called delegates, which enable type-safe event
notifications.
Properties, which serve as accessors for private member variables.
Attributes, which provide declarative metadata about types at run time.
Inline XML documentation comments.
If you need to interact with other Windows software such as COM objects or native
Win32 DLLs, you can do this in C# through a process called "Interop." Interop enables C#
programs to do just about anything that a native C++ application can do. C# even supports
pointers and the concept of "unsafe" code for those cases in which direct memory access is
absolutely critical.
The C# build process is simple compared to C and C++ and more flexible than in Java.
There are no separate header files, and no requirement that methods and types be declared in a
particular order. A C# source file may define any number of classes, structs, interfaces, and
events.
Language interoperability is a key feature of the .NET Framework. Because the IL code
produced by the C# compiler conforms to the Common Type Specification (CTS), IL code
generated from C# can interact with code that was generated from the .NET versions of Visual
Basic, Visual C++, Visual J#, or any of more than 20 other CTS-compliant languages. A single
assembly may contain multiple modules written in different .NET languages, and the types can
reference each other just as if they were written in the same language.
In addition to the run time services, the .NET Framework also includes an extensive
library of over 4000 classes organized into namespaces that provide a wide variety of useful
functionality for everything from file input and output to string manipulation to XML parsing, to
Windows Forms controls. The typical C# application uses the .NET Framework class library
extensively to handle common "plumbing" chores.
Managed Execution
To understand how your ASP.NET applications work, and just how much the code differs
from the C# code that Dorothy wrote in Kansas, it’s important to understand managed code and
how it works. To use managed execution and get the benefits of the CLR, you must use a
language that was built for, or targets, the runtime. Fortunately for you, this includes C#.NET. In
fact, Microsoft wanted to make sure that C#.NET was a premier language on the .NET platform,
meaning that C# could no longer be accused of being a “toy” language .The runtime is a
language-neutral environment, which means that any vendor can create a language that takes
advantage of the runtime’s features. Different compiler scan expose different amounts of the
runtime to the developer, so the tool you use and the language in which you write might still
appear to work somewhat differently. The syntax of each language is different, of course, but
when the compilation process occurs, all code should be compiled into something
understandable to the runtime.
One of the more interesting aspects of .NET is that when we compile our code, we do not
compile to native code. Before you VB developers panic and fear that we are returning to the
days of interpreted code, realize that the compilation process translates our code into something
called Microsoft intermediate language, which is also called MSIL or just IL. The compiler also
creates the necessary metadata and compiles it into the component. This IL is CPU independent.
After the IL and metadata are in a file, this compiled file is called the PE, which stands for either
portable executable or physical executable, depending on whom we ask. Because the PE contains
your IL and metadata, it is therefore self-describing, eliminating the need for a type library or
interfaces specified with the Interface Definition Language (IDL).
Our code does not stay IL for long, however. It is the PE file, containing the IL that can
be distributed and placed with the CLR running on the .NET Framework on any operating
system for which the .NET Framework exists, because the IL is platform independent. When we
run the IL, however, it is compiled to native code for that platform. Therefore, you are still
running native code; you are not going back to the days of interpreted code at all. The
compilation to native code occurs via another tool of the .NET Framework: the Just-In-Time
(JIT) compiler. With the code compiled, it can run within the Framework and take advantage of
low level features such as memory management and security. The compiled code is native code
for the CPU, on which the .NET Framework is running, meaning that you are indeed running
native code instead of interpreted code. A JIT compiler will be available for each platform on
which the .NET Framework runs, so you should always begetting native code on any platform
running the .NET Framework. Remember, today this is just Windows, but this could change in
the future.
Executing Code
Interestingly, the JIT complier doesn’t compile the entire IL when the component is first
called. Instead, each method is compiled the first time it is called. This keeps us from having to
compile sections of code that are never called. After the code is compiled, of course, subsequent
calls use the compiled version of the code. This natively compiled code is stored in memory in
Beta 2. However, Microsoft has provided a PreJIT compiler that will compile all the code at once
and store the compiled version on disk, so the compilation will persist over time. This tool is
calledngen.exe and can be used to precompile the entire IL. If the CLR cannot find a
precompiled version of the code, it begins to JIT compile it on-the-fly. After the code starts
executing, it can take full advantage of the CLR, with benefits such as the security model,
memory management, debugging support, and profiling tools. Most of these benefits will be
mentioned throughout the book.
Security
If you create a VB component today, your choices for implementing security are
somewhat limited. We can use NTFS to set permissions on the file itself. We can place it in
MTS/COM+ Component Services and turn on role-based security. We can call it over DCOM
and use DCOMCNFG to set permissions. We can always just code your own security. One of the
runtime’s main benefits is that an entire security infrastructure is built right in. In fact, two major
security models are set up in the .NET Framework: code access security and role-based security.
Code Access Security (CAS)
This security does not control who can access the code; rather, it controls what the code
itself can access. This is important because it allows us to build components that can be trusted to
varying degrees. If we build a VB component today and want to perform database access, we are
free to call ADO and connect to a database (provided, of course, that we have a valid user ID and
password). With .NET, however, we can actually specify, with the tools in the .NET Framework,
what actions our component can and, more importantly, cannot perform. This has the benefit of
preventing others from using the code in ways that we did not intend. Perhaps the main benefit of
CAS is that we can now trust code that is downloaded from the Internet. Security can be set up
so that it becomes impossible for the code toper form any mischievous actions. This would
prevent most of the macro viruses that are spread via e-mail today.
Role-Based Security
Role-based security is the same type of security we get when we use MTS or COM+
Component Services. In .NET, the Framework determines the caller, called a principal, and
checks the principal’s individual and group permissions. Unlike COM/COM+ role-based
security, however, .NET cannot make an assumption that the user will have a valid NT user
account and token to pass in. Therefore, .NET allows for generic and custom principals, as well
as standard Windows principals. We can define new roles for each application if we want.
How It Works?
SQL Server is a client/server database system. The server runs the SQL Server database
software, which processes requests submitted by the database client software and sends the
results back to the client. The SQL Executive and the SQL Server Database Engine service are
examples of database services performed by SQL Server.
The SQL Server software is arranged in multiple layers. The Net-Library layer, which
accepts connections from clients, hides the network connectivity details when a client
communicates with a server running SQL Server. Net-Libraries use interprocess communication
(IPC) mechanisms such as named pipes, remote procedure calls (RPCs), and Windows Sockets.
Several Net-Libraries are included with SQL Server for both the server and the client. Net-
Libraries on the server listen for client connection attempts.
A client computer runs the database client software, which is used to connect to the server
running SQL Server, make requests, receive results, and display the results on the user’s screen.
Examples of database client software that can connect to SQL Server include SQL Server
Enterprise Manager, ISQL/w, and Microsoft Access. The database client software is also made
up of multiple layers. Users interact directly with the client application, which might present a
form such as an order entry form. When the user submits the form, the client software interacts
with the server running SQL Server using open database connectivity (ODBC) or DB-Library
application programming interfaces (APIs). The server processes the request and returns
information to the client.
.Net and Its Implementation
Select File->New Project within the Visual Studio 2005 IDE. This will bring up the New Project
dialog. Click on the “Visual C#” node in the tree-view on the left hand side of the dialog box
and choose the "ASP.NET Web Application" icon:
Choose where you want the project to be created on disk (note that there is no longer a
requirement for web projects to be created underneath the inetpub\wwwroot directory -- so
you can store the project anywhere on your filesystem). Then name it and hit ok.
Visual Studio will then create and open a new web project within the solution explorer. By
default it will have a single page (Default.aspx), an AssemblyInfo.cs file, as well as a
web.config file. All project file-meta-data is stored within a MSBuild based project file.
Opening and Editing the Page
Double click on the Default.aspx page in the solution explorer to open and edit the page. You can
do this using either the HTML source editor or the design-view. Add a "Hello world" header
to the page, along with a calendar server control and a label control (we'll use these in a later
tutorial):
Hit F5 to build and run the project in debug mode. By default, ASP.NET Web Application
projects are configured to use the built-in VS web-server (aka Cassini) when run. The
default project templates will run on a random port as a root site (for example:
http://localhost:12345/):
You can end the debug session by closing the browser window, or by choosing the Debug->Stop
Debugging (Shift-F5) menu item.
In the first Hello World Tutorial we edited the Default.aspx page that is added automatically
when we create a new VS 2005 Web Application project.
You can then program against these controls using your event-handlers within the code-behind
file. For example:
You can then set a breakpoint (press the F9 key on the line to set it on), and then hit F5 to
compile, run and debug the page:
Adding Classes to the Web Project
In this sample we'll be data-binding a GridView control on a page to a set of classes in our web
application project.
To begin, right-click on the project and select Add->Add New Item to add a new class called
"Author" to the project:
Note that classes can be added into any directory of the web project. There is no requirement that
they live under the /app_code directory.
Make the new Author class public and then add some properties and constructors to it:
Then add a new class file called "Publisher.cs" to the project and have it implement a method
called "GetAuthorsByState":
Screen Shot
Login Screen
Leave Display Screen
Employee Register Screen
Leave Application Screen
Status Check Screen
Code
LoginPage
<%@ Page Title="" Language="C#"
MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="LoginPage.aspx.cs"
Inherits="LoginPage" %>
ControlToValidate="TextBox1">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Password<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ErrorMessage="RequiredFieldValidator" ForeColor="Red"
SetFocusOnError="True"
ValidationGroup="login"
ControlToValidate="TextBox2">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
TextMode="Password"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td align="right">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server"
ControlToValidate="RadioButtonList1"
ErrorMessage="RequiredFieldValidator"
ForeColor="Red" SetFocusOnError="True"
ValidationGroup="login">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:RadioButtonList ID="RadioButtonList1"
runat="server"
RepeatDirection="Horizontal">
<asp:ListItem>HR</asp:ListItem>
<asp:ListItem>Employee</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
<asp:LinkButton ID="LinkButton1"
runat="server" onclick="LinkButton1_Click"
CausesValidation="False">New
Employee</asp:LinkButton>
</td>
<td valign="top">
<asp:Button ID="Button1" runat="server"
onclick="Button1_Click" Text="Login"
ValidationGroup="login" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [EmpReg] WHERE
(([EmpID] = @EmpID) AND ([Password] = @Password))">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1"
Name="EmpID" PropertyName="Text"
Type="Decimal" />
<asp:ControlParameter ControlID="TextBox2"
Name="Password" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Label ID="Label1" runat="server"
ForeColor="Red"></asp:Label>
</td>
<td>
</td>
</tr>
</table>
</asp:Content>
HRLogin
ControlToValidate="TextBox1">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Employee Last Name<asp:RequiredFieldValidator
ID="RequiredFieldValidator2"
runat="server" ErrorMessage="RequiredFieldValidator"
ForeColor="Red"
SetFocusOnError="True" ValidationGroup="submit"
ControlToValidate="TextBox2">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Contact No<asp:RegularExpressionValidator
ID="RegularExpressionValidator1"
runat="server"
ErrorMessage="RegularExpressionValidator" ForeColor="Red"
SetFocusOnError="True" ValidationExpression="\d{10}"
ValidationGroup="submit"
ControlToValidate="TextBox3">*</asp:RegularExpressionValidat
or>
</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"
MaxLength="10"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Blood Group</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>A+</asp:ListItem>
<asp:ListItem>A-</asp:ListItem>
<asp:ListItem>B+</asp:ListItem>
<asp:ListItem>B-</asp:ListItem>
<asp:ListItem>O+</asp:ListItem>
<asp:ListItem>O-</asp:ListItem>
</asp:DropDownList>
</td>
<td>
</td>
</tr>
<tr>
<td valign="top">
Address<asp:RequiredFieldValidator
ID="RequiredFieldValidator3" runat="server"
ErrorMessage="RequiredFieldValidator" ForeColor="Red"
SetFocusOnError="True"
ValidationGroup="submit"
ControlToValidate="TextBox4">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox4" runat="server"
TextMode="MultiLine"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Employee ID<asp:RequiredFieldValidator
ID="RequiredFieldValidator4"
runat="server" ErrorMessage="RequiredFieldValidator"
ForeColor="Red"
SetFocusOnError="True" ValidationGroup="submit"
ControlToValidate="TextBox5">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Font-Size="11px"
ForeColor="Red"></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
Password<asp:RequiredFieldValidator
ID="RequiredFieldValidator5" runat="server"
ErrorMessage="RequiredFieldValidator" ForeColor="Red"
SetFocusOnError="True"
ValidationGroup="submit"
ControlToValidate="TextBox6">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="TextBox6" runat="server"
TextMode="Password"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Submit"
onclick="Button1_Click"
ValidationGroup="submit" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [EmpReg] WHERE
[EmpID] = @EmpID"
InsertCommand="INSERT INTO [EmpReg] ([EmpID],
[Password], [EmpName], [EmpLast], [Contact], [BloodGroup],
[Address]) VALUES (@EmpID, @Password, @EmpName,
@EmpLast, @Contact, @BloodGroup, @Address)"
SelectCommand="SELECT * FROM [EmpReg] WHERE
([EmpID] = @EmpID)"
UpdateCommand="UPDATE [EmpReg] SET [Password] =
@Password, [EmpName] = @EmpName, [EmpLast] = @EmpLast,
[Contact] = @Contact, [BloodGroup] = @BloodGroup, [Address] =
@Address WHERE [EmpID] = @EmpID">
<DeleteParameters>
<asp:Parameter Name="EmpID" Type="Decimal" />
</DeleteParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox5"
Name="EmpID" PropertyName="Text"
Type="Decimal" />
<asp:ControlParameter ControlID="TextBox6"
Name="Password" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox1"
Name="EmpName" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox2"
Name="EmpLast" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox3"
Name="Contact" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="DropDownList1"
Name="BloodGroup"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="TextBox4"
Name="Address" PropertyName="Text"
Type="String" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox5"
Name="EmpID" PropertyName="Text"
Type="Decimal" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="EmpName" Type="String" />
<asp:Parameter Name="EmpLast" Type="String" />
<asp:Parameter Name="Contact" Type="String" />
<asp:Parameter Name="BloodGroup" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="EmpID" Type="Decimal" />
</UpdateParameters>
</asp:SqlDataSource>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Label ID="Label2" runat="server" Font-Size="12px"
ForeColor="Red"></asp:Label>
</td>
<td>
</td>
</tr>
</table>
</asp:Content>
LeaveEntry
<%@ Page Title="" Language="C#"
MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="LeaveEntry.aspx.cs"
Inherits="LeaveEntry" %>
StatusCheck
Strength
The strength of project is that it provides the solution for having leave managed
in an online system.
As it is developed in .NET it provides security and it is reliable.
Microsoft SQL Server has a high performance, scalable, supports complex
queries and multithreaded parallel architecture.
Weakness
The fake information related to employee cannot be detected.
Opportunity
This project will be extended in future to implement on mobile systems.
Threats
If any trouble occur in this software all the data and information of the suspect is
lost.
Conclusion
Developing this software shall be a good experience for me. During the
development of the project I had got enough to learn and got the chance to increase my
knowledge in the field of software. I am satisfied that the system meets all the
requirements.