Sei sulla pagina 1di 58

ON

ROLL NO. 1311006722


SUBMITTING MINI PROJECT FOR THE
REQUIREMENT OF THE DEGREE IN BACHOLOR
OF COMPUTER SCIENCE INFORMATION
TECHNOLOGY

-1-

CONTENTS
1. Abstract ......................................................................................................... 3
2. Introduction .................................................................................................... 5-7
2.1.

General Introduction

2.2.

Project Description

3. System Analysis ............................................................................................. 8-11


3.1.

Objectives of System

3.2.

User Requirements

3.3.

Hardware And Software Requirements

4. Software Design ............................................................................................. 15-46


5. Database Design............................................................................................. 47-85
6. Input and Output Screens
7. Conclusion ..................................................................................................... 94
8. Bibliography .......................... ....................................................................... 95-97

-2-

ABSTRACT
Corporate address book mainly developed for an organization to store their employees
personal data. The System consists of various users like the Administrator, HR manager and
Employees. Everyone have their own responsibilities.HR manager has the privileges to
add/delete the employees. Administrator registers the employees and allocates the IDs for
the employees. Employees can login and store their personal data.

Corporate address book is a system provided to the corporate adding, deleting,


editing the important addresses. Keeping employees contact records up-to-date plays a vital
role in promoting effective communications.

Features:

Making records of addresses of the employees.

Making records of details of employees

Adding and deleting the employees.

Allocating ids to the employees

-3-

INTRODUCTION:
Corporate address book is a system which provides the addresses and details of the
employees. After registering with system, administrator allocates a personal id to the
employee. Employee can store his personal data in that account. Employee has a facility to
view an address book by category wise. Employee can modify his profile.

HR manager maintains the address book. If any person joins the organization, his details
entered in the address book. At the same time he may delete the employee from the system.
He can view the details of the total employees registered to the system.

Administrator has very important role compare to other persons are working with the
system. He can have a facility to view address book and details of all the employees and HR
managers too. Admin has a right to edit the details of the employees. He can delete
employee from a system. This is a system which provides full details and addresses of the
employees are working in the organization.
Features:

It provides the details and addresses of employees in the organization.

Registered Employee can store personal information in his account.

HR managers duty to adds / deletes the employee from the system.

Admin has a right to view / edit the details and addresses of the employees

Admin can add new category to the select category optio

-4-

SYSTEM:

Designing and implementing the new links.

Designing and implementing the users.

Arranging new links as subject wise.

SYSTEM ANALYSIS:
System analysis will be performed to determine if it is feasible to design
information based on policies and plans of the organization and on user requirements and to
eliminate the weaknesses of the present system.

The new system should be cost effective.

To augment management, improve productivity and services.

To enhance user / system interface.

To improve information quality and usability.

To upgrade systems reliability, availability, flexibility and growth potential.

Objectives of system:
The main objective of the system is to maintain a record of the addresses and details of the
employees working in the organization. They keep update the document by adding and
deleting the addresses and details. It will be available to the top to bottom of the employees.
Objectives:

1. The job has developed with convenient modules of setting and editing of address
details as per the requirements so that they can be implemented easily and
productively.

-5-

2. A comprehensive report generation technique is in place to put on screen the various


categories of reports as per requirements.
3. HR manager is only responsible for the performance of team, he doesnt have full
access. But administrator can view all records, this brings in security to the system
4. Employees can view their profiles and also they can modify their profile.
5. Employees have a facility to view address book and he will have a option to change
the password.
6.

Admin has a right to add new category to the tool and he makes available this
option to the employees.

User Requirements:
1. Setting and editing details of employees working in the different departments in the
organization
2. Employees can view his/her address book
3. Employee can change his/ her profile and password
4. The system runs on any platform
5. A Help File pertaining to different possible queries.
6. Employee can view by selecting category wise.

HARDWARE & SOFTWARE SPECIFICATIONS

3.1 HARDWARE REQUIREMENTS:

Processor

Intel P-IV system

Processor Speed

250MHz to 833MHz

RAM

512MB RAM

Hard Disk

40GB

-6-

3.2 SOFTWARE REQUIREMENTS:


Operating System

Windows XP

Database

Sql Server

Server side technology :

ASP.Net

Server side scripting

ASP

Client side scripting

HTML

Web-Server

IIS

-7-

4.About UML:
Unified Modeling Language:
The Unified Modeling Language allows the software engineer to express an analysis model
using the modeling notation that is governed by a set of syntactic semantic and pragmatic
rules.

A UML system is represented using five different views that describe the system from
distinctly different perspective. Each view is defined by a set of diagram, which is as
follows.

User Model View


i. This view represents the system from the users perspective.
ii. The analysis representation describes a usage scenario from the endusers perspective.

Structural model view


i. In this model the data and functionality are arrived from inside the
system.
ii. This model view models the static structures.

Behavioral Model View


It represents the dynamic of behavioral as parts of the system, depicting the
interactions of collection between various structural elements described in
the user model and structural model view.

Implementation Model View

-8-

In this the structural and behavioral as parts of the system are


represented as they are to be built.
Environmental Model View
In this the structural and behavioral aspects of the environment in which the
system is to be implemented are represented.

UML is specifically constructed through two different domains they are:


UML Analysis modeling, this focuses on the user model and structural model views
of the system.
UML design modeling, which focuses on the behavioral modeling, implementation
modeling and environmental model views.

Use case Diagrams represent the functionality of the system from a users point of view.
Use cases are used during requirements elicitation and analysis to represent the functionality
of the system. Use cases focus on the behavior of the system from external point of view.

Actors are external entities that interact with the system. Examples of actors include users
like administrator, bank customer etc., or another system like central database.

UML DIAGRAMS
UML Diagrams
USE CASE DIAGRAM

A use case diagram is a diagram that shows a set of use cases and actors and
relationships.

Contents

Use case commonly contain


Use cases
Actors
-9-

Dependency, generalization and association relationships

Overall Use Case


<<include>>
Login

Validation

Address Book

Employee

Administrator
Category

Member

- 10 -

Administrator Use Case

Login

Permission

Employees

Address Book

Administrator

Category

Member

Logout

- 11 -

HR Manager Use Case

Login

Permission

Employees

HR Manager

Change Password

Logout

- 12 -

Employee Use Case

Login

Address Book

Category

Employee
Member

Change Password

Logout

- 13 -

Class Diagram

- 14 -

ACTIVITY DIAGRAM:
An activity diagram shows the flow from activity to activity. An activity is an ongoing nonatomic execution within a state machine.
Activities ultimately result in some action, which is made up of executable atomic
computations that result in a change in state of the system or the return of a value.
Activity diagrams commonly contain
Activity states and action states
Transitions
Objects
Like all other diagrams, activity diagrams may contain notes and constrains.

Login Process

Providing
Credentials
Retry
<<No>>
Validation

<<YES>>
Services

- 15 -

Registration Process

Provide
Services

admin validation
<<yes>>
<<NO>>
Invalidate
details

- 16 -

Providing
Credentials

Administrator Process

Login

validation

Employee

Address
Book

Category

Create/Upd
ate/Delete

Permissions

Logout

- 17 -

Member

HR Manager Process

Login

validation

Employees

Create/Upd
ate/Delete

Permission
s

Logout

- 18 -

Employee Process

Login

validation

Address
Book

Category

Member

Create/Upd
ate/Delete

Logout

SEQUENCE DIAGRAM

An interaction diagram shows an interaction, consisting of a set of objects and their


relationships, including the messages that may be dispatched among them.

A sequence diagram is an interaction diagram that emphasizes the time ordering of


messages.

Graphically, a sequence diagram is a table that shows objects arranged along x-axis
and messages, ordered in increasing time, along the y-axis.

Contents

Sequence diagrams commonly contain the following:


Objects
Links
Messages
- 19 -

Like all other diagrams, sequence diagrams may contain notes and constrains.

Administrator Sequence

:login

:permission

:employee

: Administrator
1: login request

valid

response
2: create
3: create
response

4: create
response

5: create
response

6: create
response

- 20 -

:address book

:category

:member

HR Manager Sequence

: HR Manager

1: login request

:login

:permission

valid

response

2: create
3: create
response

- 21 -

:employee

Employee Sequence

: Employee

:login

:register

:address book

:category

:member

1: submit form
verify
confirmation

2: login request

valid

response

3: create
response

4: create
response

5: create
response

C
COLLABORATION DIAGRAM
-

Collaboration is a society of classes, interfaces, and other elements that work together to

provide some cooperative behavior thats bigger than the sum of all its parts.
-

Collaboration is also the specification of how an element, such as a classifier or an

operation, is realized by a set of classifiers and associations playing specific roles used in a
specific way

Contents
Collaboration diagrams commonly contain the following:
- 22 -

Objects

Links

Messages

Like all other diagrams, sequence diagrams may contain notes and constrains.

Administrator Collaboration
2: valid

4: 2: create
:permission

:login
1: 1: login request

5: 3: create
3: response
6: response
:employee
9: 5: create

: Administrator

10: response
7: 4: create
11: 6: create
12: response

:category

8: response

:address
book
:member

- 23 -

Login Collaboration

1: valid

:login

2: 1: login request

3: response
5: 3: create
4: 2: create

: HR Manager

6: response

:employee

:permissio
n

- 24 -

Employee Collaboration

2: verify

5: valid
:register
1: 1: submit form
4: 2: login request

:login

3: confirmation
6: response
7: 3: create

: Employee

8: response
11: 5: create
:address
book

9: 4: create
12: response
10: response

:member
:category

- 25 -

COMPONENT DIAGRAM:
Address
Book

Category

Administrator

Member

Employee

HR Manager

Database
ADO.NET

DEPLOYMENT DIAGRAM
-

A deployment diagram is a diagram that shows the configuration of run time processing

nodes and the components that live on them.


-

Graphically, a deployment diagram is collection of vertices and arcs.

Contents
-

Deployment diagram commonly contain the following things:

Nodes

Dependency and association relationships

Like all other diagrams, deployment diagrams may contain notes and constraints.

Deployment diagrams may also contain components, each of which must live on some

node.
-

Deployment diagrams may also contain packages or subsystems, both of which are used

to group elements of your model into larger chunks.

- 26 -

Database Server

MSSQL Server

Application Server
VS.NET

USER
ASP.NET
Application

Web
Browser

- 27 -

ER-Diagram

- 28 -

Table Name:

Employee Details

- 29 -

Employee Registration Details

Members Details

- 30 -

New EMP Details

A Category Detail

- 31 -

Use Members Details

Use Category Details

- 32 -

Welcome.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Welcome.aspx.cs"
Inherits="Welcome" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Welcome</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table width="100%" background="BackGround.jpg">
<tr><td align="center">
<asp:Label ID="lblWelcome" runat="server"
Text="Welcome In On Line Address Book" Font-Bold="true"
Font-Size="22pt" ForeColor="#6600ff"></asp:Label>
</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td align="center">
<asp:Label ID="lblDoAddress" runat="server" Text="Do Your Address On Line" FontBold="true"
ForeColor="#33cccc" Font-Size="14pt"></asp:Label>
</td></tr>
<tr><td height="50px">&nbsp;</td></tr>
<tr><td align="center">
<asp:ImageButton ID="Imgm" ImageUrl="~/case2-a.gif" runat="server"
OnClick="StartAddress" />
</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td align="center">
<asp:Label ID="lblAddress" runat="server" Text="(Address Book)" Font-Bold="true"
ForeColor="#000099"
Font-Size="16pt"></asp:Label>
</td></tr>
<tr><td height="190px"></td></tr>
<tr><td>&nbsp;&nbsp; &nbsp;&nbsp; <asp:Button ID="btnAddressBook" runat="server"
Text="Go Inside The Address Book" BackColor="#ff9900" Height="45px"
OnClick="btnInside_Click" />
</td></tr>
</table>
<table background="BackGround.jpg" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="right">
<asp:Label ID="lblName" runat="server" Text="Rahul Saxena" Font-Bold="true" FontSize="16pt"
ForeColor="#6600ff"></asp:Label><br /><br />
<asp:Label ID="lblEmail" runat="server" Text="Email: 14rahulsaxena@gmail.com"
Font-Bold="true" Font-Size="14pt" ForeColor="#6600ff"></asp:Label>
</td><td width="5%"></td></tr>
<tr><td Height="43px"></td></tr>
</table>

- 33 -

</div>
</form>
</body>
</html>
Welcome.aspx.cs is:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Welcome : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnInside_Click(object sender, EventArgs e)
{
Response.Redirect("AllRecord.aspx");
}
protected void StartAddress(object sender, ImageClickEventArgs e)
{
Response.Redirect("AllRecord.aspx");
}
}
AllRecord.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AllRecord.aspx.cs"
Inherits="AllRecord" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>All Record</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="0" cellspacing="0" width="90%" border="0" height="100%">
<tr><td width="10px"></td><td><asp:Image ID="imageContact" runat="server"
ImageUrl="~/clip1-c.gif"/> </td></tr>
<tr><td width="10px"></td><td width="90%" background="BackGround.jpg" align="left">
<asp:Button ID="btnSubmit" runat="server" Text="Add New Address"
OnClick="btnSubmit_Click" />
&nbsp; &nbsp; &nbsp; &nbsp;
<asp:Button ID="btnSearch" runat="server" Text="Search A Address"

- 34 -

OnClick="SearchRecord" />
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;
<asp:Image ID="ImgMove" runat="server" ImageUrl="~/ball1-a.gif" />
<asp:Label ID="lblSearch" Text="All Address" runat="server" Font-Bold="true"
ForeColor="#ff6600"
Font-Size="16pt"> </asp:Label>
&nbsp; &nbsp; &nbsp; &nbsp;
<asp:Image ID="ImgDate" runat="server" ImageUrl="~/hourglass-b.gif" />
<asp:Label ID="lblShowTime" runat="server" Text="Date" Font-Bold="true">
</asp:Label>
&nbsp; &nbsp;
<asp:Label ID="lbltime" runat="server"></asp:Label>
</td></tr>
<tr><td height="5px"></td></tr>
<tr><td width="10px"></td>
<td><table background="BackGround.jpg" cellpadding="0" cellspacing="0"
height="100%" border="0" width="100%">
<tr><td height="25px"></td></tr>
<tr><td width="10px"></td><td align="center" >
<asp:DataGrid ID="GridAllRecord" runat="server" AutoGenerateColumns="false"
Width="90%"
DataKeyField="ID"
PagerStyle-HorizontalAlign="Center" BorderStyle="ridge" GridLines="Both"
BorderWidth="2px" BorderColor ="white" BackColor="white"
CellPadding="3" CellSpacing="1"
OnEditCommand="EditAddress" OnDeleteCommand="AddressDelete"
OnItemCommand="Grid_ItemCommand" AllowSorting="true" PageSize=5
OnPageIndexChanged="GridAllRecord_PageIndexChanged"
AllowPaging="true">
<FooterStyle ForeColor="Black" BackColor="#C6C3C6"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFFF"
BackColor="#A53A6A"></HeaderStyle>
<FooterStyle BackColor="beige" />
<PagerStyle Font-Bold="true" Mode=NumericPages Font-Underline="true"/>
<Columns>
<asp:BoundColumn DataField=ID HeaderText="ID" Visible="false">
<ItemStyle BackColor="graytext" />
<HeaderStyle BackColor="graytext" />
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="First Name">
<ItemTemplate>
<asp:LinkButton ID="lnkName" runat="server" Text='<%#DataBinder.Eval
(Container.DataItem,"FirstName") %>' CommandName="RecordShow">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField=LastName HeaderText="Last Name">
<ItemStyle BackColor=GhostWhite />
</asp:BoundColumn>
<asp:BoundColumn DataField=PersonelEmail HeaderText="Personnel(EMail)">
<ItemStyle BackColor=GhostWhite />
</asp:BoundColumn>
<asp:BoundColumn DataField=Mobile HeaderText="Mobile">
<ItemStyle BackColor=GhostWhite />

- 35 -

</asp:BoundColumn>
<asp:EditCommandColumn EditText="Edit Address" HeaderText="Edit Address">
</asp:EditCommandColumn>
<asp:ButtonColumn CommandName="DeleteAddress" HeaderText="Delete
Address"
Text="Delete"></asp:ButtonColumn>
</Columns>
</asp:DataGrid>
</td>
</tr>
<tr><td height="25px"></td></tr>
</table></td></tr>
<tr><td height="15px"></td></tr>
<%-- <tr><td width="10px"></td><td><asp:Label ID="lblTotalRegisterartion" runat="server"
Text="Total Registered Address :"></asp:Label><asp:Label ID="lblRegistered"
runat="server"></asp:Label></td></tr>--%>
</table>
</div>
</form>
</body>
</html>
AllRecord.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class AllRecord : System.Web.UI.Page
{
string connect = @"Data Source=MCN0100;Initial Catalog=AddressBook; Uid=sa; Pwd=";
SqlConnection con;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da;
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
rebind();
string Time = DateTime.Now.Date.ToShortDateString();
lbltime.Text = Time;
//TotalUsers();
}
}
public void rebind()
{
con = new SqlConnection(connect);

- 36 -

cmd.CommandText = "select ID,FirstName,LastName, Mobile, PersonelEmail from record";


da = new SqlDataAdapter(cmd);
cmd.Connection = con;
da.Fill(ds);
con.Open();
cmd.ExecuteNonQuery();
GridAllRecord.DataSource = ds;
GridAllRecord.DataBind();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect("Register.aspx");
}
protected void Grid_ItemCommand(object sender, DataGridCommandEventArgs e)
{
if (e.CommandName == "RecordShow")
{
int Rep_Id = int.Parse(e.Item.Cells[0].Text);
Session["ID"] = Rep_Id;
Response.Redirect("ShowSelectedRecord.aspx");
}
if (e.CommandName == "DeleteAddress")
{
con = new SqlConnection(connect);
int UpadteAddress = int.Parse(e.Item.Cells[0].Text);
cmd.CommandText = "delete from Record where ID=" + UpadteAddress;
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridAllRecord.EditItemIndex=-1;
rebind();
}
}
protected void SearchRecord(object sender, EventArgs e)
{
Response.Redirect("Search.aspx");
}
public void GridAllRecord_PageIndexChanged(object source, DataGridPageChangedEventArgs
e)
{
GridAllRecord.CurrentPageIndex = e.NewPageIndex;
rebind();
}
public void EditAddress(object ssender, DataGridCommandEventArgs e)
{
int UpadteAddress = int.Parse(e.Item.Cells[0].Text);
Session["UpadteAddressID"] = UpadteAddress;
Response.Redirect("LoginCheck.aspx");
}
public void AddressDelete(object sender, DataGridCommandEventArgs e)
{
con = new SqlConnection(connect);

- 37 -

int UpadteAddress = int.Parse(e.Item.Cells[0].Text);


cmd.CommandText = "delete from Record where ID=" + UpadteAddress;
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
GridAllRecord.EditItemIndex=-1;
rebind();
}
UpdateRecord
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateTheRecord.aspx.cs"
Inherits="UpdateTheRecord" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Update Record</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="0" cellspacing="0" border="1" width="90%" align="center"
background="BackGround.jpg">
<tr><td align="center">
<table cellpadding="0" cellspacing="0" width="80%" border="0" align="center">
<tr><td align="center" style="border-bottom:2px solid;">
<asp:Label ID="lblName" runat="server" Text="Update Personnel Information"
Font-Bold="true"
Font-Size="14pt" ForeColor="#0099ff"></asp:Label> </td>
<td align="center" style="border-bottom:2px solid;">
<asp:Label ID="Label1" runat="server" Text="Update Professional Information"
Font-Bold="true"
Font-Size="14pt" ForeColor="#ff6600"></asp:Label></td></tr>
<tr><td align="center">
<table>
<tr><td>
<marquee><asp:Label ID="lblPersonnelInformation" runat="server"
Text="Personnel Information" Font-Bold="True"
ForeColor=ActiveCaption></asp:Label>
</marquee> </td> </tr>
<tr><td align="left"><asp:Label ID="lblFirstNmae" Text="First Name"
runat="server" Width="100px"
ForeColor=ActiveCaption></asp:Label>
<asp:TextBox ID="txtFirstName" runat="server"
Enabled=false></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblMiddleName" Text="Middle Name"
runat="server"
Width="100px" ForeColor=ActiveCaption> </asp:Label>
<asp:TextBox ID="txtMiddleName" runat="server"
Enabled=false>
</asp:TextBox>
</td></tr>

- 38 -

<tr><td align="left"><asp:Label ID="lblLastName" Text="Last Name"


runat="server" Width="100px"
ForeColor=ActiveCaption></asp:Label>
<asp:TextBox ID="txtLastName" runat="server"
Enabled=false></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblHomePhone" Text="Home Phone"
runat="server" Width="100px"
ForeColor=ActiveCaption> </asp:Label>
<asp:TextBox ID="txtHomePhone" runat="server"></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblMobile" Text="Mobile" runat="server"
Width="100px"
ForeColor=ActiveCaption></asp:Label>
<asp:TextBox ID="txtMobile" runat="server"></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblPersonelEmail" Text="Email"
runat="server" Width="100px"
ForeColor=ActiveCaption></asp:Label>
<asp:TextBox ID="txtPersonnelEmail" runat="server"></asp:TextBox>
</td></tr>
</table></td>
<td>
<table>
<tr><td><marquee> <asp:Label ID="lblOfficeInformation" runat="server"
Text="Official Information"
Font-Bold="True" ForeColor="Chocolate"> </asp:Label>
</marquee></td></tr>
<tr><td align="left"><asp:Label ID="lblCompany" Text="Company"
runat="server" Width="100px"
ForeColor="Chocolate"></asp:Label>
<asp:TextBox ID="txtCompany" runat="server"> </asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblJobTitle" Text="Job Title" runat="server"
Width="100px"
ForeColor="Chocolate"></asp:Label>
<asp:TextBox ID="txtJobTitle" runat="server"></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblWebSite" Text="Web Site"
runat="server" Width="100px"
ForeColor="Chocolate"></asp:Label>
<asp:TextBox ID="txtWebSite" runat="server"></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblOfficePhone" Text="OfficePhone"
runat="server"
Width="100px" ForeColor="Chocolate"></asp:Label>
<asp:TextBox ID="txtOfficePhone" runat="server"></asp:TextBox>
</td></tr>
<tr><td align="left"><asp:Label ID="lblFax" Text="Fax" runat="server"
Width="100px"
ForeColor="Chocolate"> </asp:Label>
<asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
</td></tr>

- 39 -

<tr><td align="left"> <asp:Label ID="lblOfficeEmail" Text="Office Email"


runat="server"
Width="100px" ForeColor="Chocolate" ></asp:Label>
<asp:TextBox ID="txtOfficeEmail" runat="server"></asp:TextBox>
</td></tr>
</table></td>
</tr>
<tr><td><asp:Label ID="Label2" runat="server" Width="120px" Text="Address"
Font-Bold="true"
ForeColor=ActiveCaption></asp:Label>
<asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine">
</asp:TextBox>
</td></tr>
</table></td></tr>
<tr><td height="5px"></td></tr>
<tr><td align="center" height="50px"> <asp:Button ID="btnUpdateRecord" runat="server"
Text="Update The Record" Width="303px" OnClick="UpdateRecord_Click" />
<asp:ImageButton ID="ImageMain" runat="server" ImageUrl="~/5ar04a.gif"
OnClick="Main_Click"
ToolTip="Click Here To Go On All Record"/> </td></tr>
</table>
</div>
</form>
</body>
</html>
UpdateRecord.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class UpdateTheRecord : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
record4Update();
}
}
SqlConnection con;
SqlDataAdapter da;
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
string connect = @"Data Source=MCN0100;Initial Catalog=AddressBook; Uid=sa; Pwd=";

- 40 -

protected void UpdateRecord_Click(object sender, EventArgs e)


{
int IDUpdate = int.Parse(Session["UpadteAddressID"].ToString());
con = new SqlConnection(connect);
cmd.CommandText = "update Record set Jobtype='" + txtJobTitle.Text + "' , Company='" +
txtCompany.Text + "', WebSite='" + txtWebSite.Text + "', OfficePhone='" + txtOfficePhone.Text +
"', HomePhone='" + txtHomePhone.Text + "',Mobile='" + txtMobile.Text + "', Fax='" + txtFax.Text
+ "', OfficialEmail='" + txtOfficeEmail.Text + "', PersonelEmail='" + txtPersonnelEmail.Text + "',
Address='"+txtAddress.Text+"' where ID="+IDUpdate;;
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
public void record4Update()
{
int IDUpdate = int.Parse(Session["UpadteAddressID"].ToString());
con = new SqlConnection(connect);
cmd.CommandText = "select * from Record where ID=" + IDUpdate;
cmd.Connection = con;
da = new SqlDataAdapter(cmd);
da.Fill(ds);
con.Open();
cmd.ExecuteNonQuery();
txtFirstName.Text = ds.Tables[0].Rows[0][2].ToString();
txtMiddleName.Text = ds.Tables[0].Rows[0][4].ToString();
txtLastName.Text = ds.Tables[0].Rows[0][3].ToString();
txtMobile.Text = ds.Tables[0].Rows[0][10].ToString();
txtOfficeEmail.Text = ds.Tables[0].Rows[0][12].ToString();
txtOfficePhone.Text = ds.Tables[0].Rows[0][8].ToString();
txtPersonnelEmail.Text = ds.Tables[0].Rows[0][13].ToString();
txtWebSite.Text = ds.Tables[0].Rows[0][7].ToString();
txtJobTitle.Text = ds.Tables[0].Rows[0][5].ToString();
txtCompany.Text = ds.Tables[0].Rows[0][6].ToString();
txtHomePhone.Text = ds.Tables[0].Rows[0][9].ToString();
txtFax.Text = ds.Tables[0].Rows[0][11].ToString();
txtAddress.Text = ds.Tables[0].Rows[0][14].ToString();
con.Close();
}
protected void Main_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("AllRecord.aspx")

- 41 -

Home Page

- 42 -

HR Manager Login

HR Manager Role Dependent Menu Screen

- 43 -

Add New Employee

Delete Employee

- 44 -

Change Password

Logout

- 45 -

Administrator Login

Admin Role Dependent Screen

- 46 -

View Address Book

Add New Category

- 47 -

Add New Member

Edit Members

- 48 -

Delete Members

View Employee Details

- 49 -

Employee Registration

Delete Employee

- 50 -

Edit Employee

Change Password

- 51 -

Logout

Employee Login

- 52 -

Employee Role Dependent Screen

View Address Book

- 53 -

Add New Category

Add new Members

- 54 -

Edit Members

Delete Members

- 55 -

Edit Profile

Change Password

- 56 -

Logout

- 57 -

Conclusion:

The project has been appreciated by all the users in the organization.

It is easy to use, since it uses the GUI provided in the user dialog.

User friendly screens are provided.

The usage of software increases the efficiency, decreases the effort.

It has been efficiently employed as a project management mechanism.

It has been thoroughly tested and implemented.

COMPLETE HTML
Steven Holzner
UNIFIED MODELING LANGUAGE
By Grady Booch, Ranbaugh, Jacobson
SQL FOR PROFESSIONALS
By Jain
C#.NET Black Book
By Evangeleous Petereous
MSDN 2005
By Microsoft

- 58 -

Potrebbero piacerti anche