Vous êtes sur la page 1sur 60

SYNOPSIS

The functionality of this web tool can be expressed by considering a Company has an internet
based product called Info bar, which allows users to view useful links from different sites on
topics of his/her interest

To encourage the usage of the Info bar, the company has a reward point scheme. 10 points are
rewarded on usage of Info bar for 1 hr. When a user accumulates over 100 points, he can redeem
them for a gift of his choice.

This project aims at building a Reward Points Management System for the customer support
team of the company.

Objectives are to build

 A data store for user information

 Web site supporting functionalities like - Search/sort/add/delete/view/modify etc on user


information

 Modules for bonus point allocation

 Facility to add information on different gifts available and bonus points against them

 Facility to detect fraud/duplicate users

 Generate report on number of users using the Info bar in a month, their responses to
various schemes etc

 Communicate user via email to notify him about various incentives and bonus point
schemes, get his feedback etc
1.1 PROBLEM DESCRIPTION

Reward management is a central activity to regulate the employer-employee relationships.


Employers use a wide variety of rewards to attract and motivate the employees and retain their
interest in the job.The design of the reward system for employees is subject to internal and
external factors affecting an organizations performance. Also, the organizational objectives are
kept in mind before designing the reward structures.

Pay is an important feature of human resource management - after all, it is the main reason why
people work. It is a sensitive and controversial area that has been extensively debated at both
practical and theoretical levels. In the US the term 'compensation' is used to encompass
everything received by an employed individual in return for work.

The reward or compensation people receive for their contribution to an organization includes
monetary and non-monetary components. Remuneration does not simply compensate employees
for their efforts - it also has an impact on the recruitment and retention of talented people.

The term 'reward management' covers both the strategy and the practice of pay systems.
Traditionally, human resource or personnel sections have been concerned with levels and
schemes of payment whereas the process of paying employees - the payroll function - has been
the responsibility of finance departments. There is a trend towards integrating the two, driven by
new computerised packages offering a range of facilities. These are described later in this
chapter.

There are two basic types of pay schemes, although many organisations have systems which
include elements of both:

* Fixed levels of pay. Wages or salaries which do not vary from one period to the next
except by defined pay increases, generally on annual basis. There may be scales of
payments determined by age, responsibility or seniority. Most 'white-collar' jobs were
paid in this way until recently.

* Reward linked to performance. The link may be daily, weekly, monthly or


annualised. Payment for any one period varies from that for any other period, depending
on quantity or quality of work. Sales functions are commonly paid on the basis of
turnover; manual and production workers may be paid according to work completed or
items produced. Catering staff typically rely on direct payment from satisfied customers
in the form of service charges or tips (gratuities).

Both methods work smoothly, provided that scales are easy to understand and the methods of
measuring completed work are overt, accurate and fair. However, there has been considerable
dissatisfaction with the management of pay on both sides of the employment relationship. In
recent years, attempts have been made to remedy the situation through new systems and a greater
reliance on performance-related pay.
2.1 HARDWARE REQUIREMENT

Processor Pentium 4
RAM 1GB of minimum
Catch memory 512 of minimum
Video Adapter SVGA Color Video Display of min 32MB
VRAM
Work Space A minimum wok space of 2GB in the root
directory
Video Resolution 1024 x 768 pixels with 32 bit High color

2.2 SOFTWARE REQUIREMENT

Operating System Win XP


Application Developer Visual Studio 2005
WebServer Asp.Net Development Server
Designing Tool Visual Studio 2005
Text Editor Ms-Word
3.1 EXISTING SYSTEM:

The whole process of creating banner like info bar and tracing each and every touch that
it got from the customer side are being done by means of regular watching on the polls or
feedback that comes as reflection from the info bar. The manual means of tracing was the only
possible solution beyond the days.

Disadvantage of the Current System


• The current system is very time consuming.
• It is very difficult to analyze the exam paper manually.
• To take exam of more candidates more invigilators are required but no need of
invigilator in case of on line exam.
• Results are not precise as calculation and evaluations are done manually.
• The chances of paper leakage are more in current system as compared to proposed
system.
• Result processing takes more time as it is done manually

3.2 PROPOSED SYSTEM

The tracing of the banner bars by means of an automated manner and giving claims in an
online means gives the following features:
• In comparison to the present system the proposed system will be less time
consuming and is more efficient.
• Analysis will be very easy in proposed system as it is automated
• Result will be very precise and accurate and will be declared in very short span of
time because calculation and evaluations are done by the simulator itself.
• The proposed system is very secure as no chances of leakage of question paper as
it is dependent on the administrator only.
• The logs of appeared candidates and their marks are stored and can be backup for
future use
4.1 Microsoft Visual Studio

Microsoft Visual Studio is an Integrated Development Environment (IDE) from


Microsoft. It can be used to develop console and graphical user interface applications along with
Windows Forms applications, web sites, web applications, and web services in both native code
together with managed code for all platforms supported by Microsoft Windows, Windows
Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight.
Visual Studio includes a code editor supporting IntelliSense as well as code refactoring.
The integrated debugger works both as a source-level debugger and a machine-level debugger.
Other built-in tools include a forms designer for building GUI applications, web designer, class
designer, and database schema designer. It accepts plug-ins that enhance the functionality at
almost every level—including adding support for source control systems (like Subversion and
Visual SourceSafe) to adding new toolsets like editors and visual designers for domain-specific
languages or toolsets for other aspects of the software development lifecycle (like the Team
Foundation Server client: Team Explorer).

Visual Studio supports languages by means of language services, which allow the code
editor and debugger to support (to varying degrees) nearly any programming language, provided
a language-specific service exists. Built-in languages include C/C++ (via Visual C++), VB.NET
(via Visual Basic .NET), and C# (via Visual C#). Support for other languages such as F#, rM,
Python, and Ruby among others is available via language services installed separately. It also
supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Language-specific versions of
Visual Studio also exist which provide more limited language services to the user. These
individual packages are called Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++.

Microsoft provides "Express" editions of its Visual Studio 2008 components Visual
Basic, Visual C#, Visual C++, and Visual Web Developer at no cost. Visual Studio 2008 and
2005 Professional Editions, along with language-specific versions (Visual Basic, C++, C#, J#) of
Visual Studio 2005 are available for free to students as downloads via Microsoft's Dream Spark
program. Visual Studio 2010 is currently in Release Candidate and can be downloaded by the
general public at no cost.

Architecture

Visual Studio does not support any programming language, solution or tool intrinsically.
Instead, it allows various functionality to be plugged in. Specific functionality is coded as a
VSPackage. When installed, the functionality is available as a Service. The IDE provides three
services: SVsSolution, which provides the ability to enumerate projects and solutions;
SVsUIShell, which provides windowing and UI functionality (including tabs, toolbars and tool
windows); and SVsShell, which deals with registration of VSPackages. In addition, the IDE is
also responsible for coordinating and enabling communication between services. All editors,
designers, project types and other tools are implemented as VSPackages. Visual Studio uses
COM to access the VSPackages. The Visual Studio SDK also includes the Managed Package
Framework (MPF), which is a set of managed wrappers around the COM-interfaces that allow
the Packages to be written in .NET languages. However, MPF does not provide all the
functionality exposed by the Visual Studio COM interfaces. The services can then be consumed
for creation of other packages, which add functionality to the Visual Studio IDE.

Support for programming languages is added by using a specific VSPackage called a


Language Service. A language service defines various interfaces which the VSPackage
implementation can implement to add support for various functionality. Functionality that can be
added this way includes syntax coloring, statement completion, brace matching, parameter
information tooltips, member lists and error markers for background compilation. ] If the interface
is implemented, the functionality will be available for the language. Language services are to be
implemented on a per-language basis. The implementations can reuse code from the parser or the
compiler for the language. Language services can be implemented either in native code or
managed code. For native code, either the native COM interfaces or the Babel Framework (part
of Visual Studio SDK) can be used. For managed code, the MPF includes wrappers for writing
managed language services.

Visual Studio does not include any source control support built in but it defines the
MSSCCI (Microsoft Source Code Control Interface) by implementing which source control
systems can integrate with the IDE. MSSCCI defines a set of functions that are used to
implement various source control functionality. MSSCCI was first used to integrate Visual
SourceSafe with Visual Studio 6.0 but was later opened up via the Visual Studio SDK. Visual
Studio .NET 2002 used MSSCCI 1.1, and Visual Studio .NET 2003 used MSSCCI 1.2. Both
Visual Studio 2005 and 2008 use MSSCCI Version 1.3, which adds support for rename and
delete propagation as well as asynchronous opening.

Visual Studio supports running multiple instances of the environment (each with its own
set of VSPackages). The instances use different registry hives to store their configuration state
and are differentiated by their AppId (Application ID). The instances are launched by an AppId-
specific .exe that selects the AppId, sets the root hive and launches the IDE. VSPackages
registered for one AppId are integrated with other VSPackages for that AppId. The various
product editions of Visual Studio are created using the different AppIds. The Visual Studio
Express edition products are installed with their own AppIds, but the Standard, Professional and
Team Suite products share the same AppId. Consequently, the Express editions can be installed
side-by-side with other editions, unlike the other editions which update the same installation. The
professional edition includes a superset of the VSPackages in the standard edition and the team
suite includes a superset of the VSPackages in both other editions. The AppId system is
leveraged by the Visual Studio Shell in Visual Studio 2008.

Features

Code editor
The Visual Studio code editor showing IntelliSense suggestions and a docked Task List
window

Visual Studio, like any other IDE, includes a code editor that supports syntax
highlighting and code completion using IntelliSense for not only variables, functions and
methods but also language constructs like loops and queries. IntelliSense is supported for the
included languages, as well as for XML and for Cascading Style Sheets and JavaScript when
developing web sites and web applications. Auto complete suggestions are popped up in a
modeless list box, overlaid on top of the code editor. In Visual Studio 2008 onwards, it can be
made temporarily semi-transparent to see the code obstructed by it. The code editor is used for
all supported languages.

The Visual Studio code editor also supports setting bookmarks in code for quick
navigation. Other navigational aids include collapsing code blocks and incremental search, in
addition to normal text search and regret search. The code editor also includes a multi-item
clipboard and a task list. The code editor supports code snippets, which are saved templates for
repetitive code and can be inserted into code and customized for the project being worked on. A
management tool for code snippets is built in as well. These tools are surfaced as floating
windows which can be set to automatically hide when unused or docked to the side of the screen.
The Visual Studio code editor also supports code refactoring including parameter reordering,
variable and method renaming, interface extraction and encapsulation of class members inside
properties, among others. Visual Studio features background compilation (also called
incremental compilation).As code is being written, Visual Studio compiles it in the background
in order to provide feedback about syntax and compilation errors, which are flagged with a red
wavy underline. Warnings are marked with a green underline.

Designer

Visual Studio includes a host of visual designers to aid in the development of


applications. These tools include:

Windows Forms Designer


The Windows Forms designer is used to build GUI applications using Windows Forms. It
includes a palette of UI widgets and controls (including buttons, progress bars, labels, layout
containers and other controls) that can be dragged and dropped on a form surface. Layout can be
controlled by housing the controls inside other containers or locking them to the side of the form.
Controls that display data (like textbox, list box, grid view, etc.) can be data bound to data
sources like databases or queries. The UI is linked with code using an event-driven programming
model. The designer generates either C# or VB.NET code for the application.

WPF Designer
The WPF designer, codenamed Cider,[26] was introduced with Visual Studio 2008. Like
the Windows Forms designer it supports uses the drag and drop metaphor. It is used to author
user interfaces targeting Windows Presentation Foundation. It supports all WPF functionality
including databinding and automatic layout management. It generates XAML code for the UI.
The generated XAML file is compatible with Microsoft Expression Design, the designer-
oriented product. The XAML code is linked with code using a code-behind model.

Web designer/development
Visual Studio also includes a web site editor and designer that allows web pages to be
authored by dragging and dropping widgets. It is used for developing ASP.NET applications and
supports HTML, CSS and JavaScript. It uses a code-behind model to link with ASP.NET code.
From Visual Studio 2008 onwards, the layout engine used by the web designer is shared with
Microsoft Expression Web. There is also ASP.NET MVC support for MVC technology as a
separate download and Dynamic Data project available from Microsoft

Class designer
The Class Designer is used to author and edit the classes (including its members and their
access) using UML modeling. The Class Designer can generate C# and VB.NET code outlines
for the classes and methods. It can also generate class diagrams from hand-written classes.

Data designer
The data designer can be used to graphically edit database schemas, including typed
tables, primary and foreign keys and constraints. It can also be used to design queries from the
graphical view.

Mapping designer
From Visual Studio 2008 onwards, the mapping designer is used by LINQ to SQL to
design the mapping between database schemas and classes that encapsulate the data. Now the
new solution from ORM approach is ADO.NET_Entity_Framework that replace and improve the
old technology.

4.2SQLSERVER 2005

SQL Server 2005

The code base for MS SQL Server (prior to version 7.0) originated in Sybase SQL
Server, and was Microsoft's entry to the enterprise-level database market, competing against
Oracle, IBM, and, later, Sybase. Microsoft, Sybase and Ashton-Tate originally teamed up to
create and market the first version named SQL Server 1.0 for OS/2 (about 1989) which was
essentially the same as Sybase SQL Server 3.0 on Unix, VMS, etc. Microsoft SQL Server 4.2
was shipped around 1992 (available bundled with Microsoft OS/2 version 1.3). Later Microsoft
SQL Server 4.21 for Windows NT was released at the same time as Windows NT 3.1. Microsoft
SQL Server v6.0 was the first version designed for NT, and did not include any direction from
Sybase.

About the time Windows NT was released, Sybase and Microsoft parted ways and each
pursued their own design and marketing schemes. Microsoft negotiated exclusive rights to all
versions of SQL Server written for Microsoft operating systems. Later, Sybase changed the name
of its product to Adaptive Server Enterprise to avoid confusion with Microsoft SQL Server. Until
1994, Microsoft's SQL Server carried three Sybase copyright notices as an indication of its
origin.

Since parting ways, several revisions have been done independently. SQL Server 7.0 was
a rewrite from the legacy Sybase code. It was succeeded by SQL Server 2000, which was the
first edition to be launched in a variant for the IA-64 architecture.

In the eight years since release of Microsoft's previous SQL Server product (SQL Server
2000), advancements have been made in performance, the client IDE tools, and several
complementary systems that are packaged with SQL Server 2005. These include: an ETL tool
(SQL Server Integration Services or SSIS), a Reporting Server, an OLAP and data mining server
(Analysis Services), and several messaging technologies, specifically Service Broker and
Notification Services.

Architecture

Protocol layer

Protocol layer implements the external interface to SQL Server. All operations that can
be invoked on SQL Server are communicated to it via a Microsoft-defined format, called Tabular
Data Stream (TDS). TDS is an application layer protocol, used to transfer data between a
database server and a client. Initially designed and developed by Sybase Inc. for their Sybase
SQL Server relational database engine in 1984, and later by Microsoft in Microsoft SQL Server,
TDS packets can be encased in other physical transport dependent protocols, including TCP/IP,
Named pipes, and Shared memory. Consequently, access to SQL Server is available over these
protocols. In addition, the SQL Server API is also exposed over web services.

Data storage

The main unit of data storage is a database, which is a collection of tables with typed
columns. SQL Server supports different data types, including primary types such as Integer,
Float, Decimal, Char (including character strings), Varchar (variable length character strings),
binary (for unstructured blobs of data), Text (for textual data) among others. The rounding of
floats to integers uses either Symmetric Arithmetic Rounding or Symmetric Round Down (Fix)
depending on arguments: SELECT Round(2.5, 0) gives 3.

Microsoft SQL Server also allows user-defined composite types (UDTs) to be defined
and used. It also makes server statistics available as virtual tables and views (called Dynamic
Management Views or DMVs). In addition to tables, a database can also contain other objects
including views, stored procedures, indexes and constraints, along with a transaction log.

A SQL Server database can contain a maximum of 231 objects, and can span multiple
OS-level files with a maximum file size of 2 TB. The data in the database are stored in primary
data files with an extension .mdf. Secondary data files, identified with an .ndf extension, are
used to store optional metadata. Log files are identified with the .ldf extension.

Storage space allocated to a database is divided into sequentially numbered pages, each 8
KB in size. A page is the basic unit of I/O for SQL Server operations. A page is marked with a
96-byte header which stores metadata about the page including the page number, page type, free
space on the page and the ID of the object that owns it.

Page type defines the data contained in the page - data stored in the database, index,
allocation map which holds information about how pages are allocated to tables and indexes,
change map which holds information about the changes made to other pages since last backup or
logging, or contain large data types such as image or text. While page is the basic unit of an I/O
operation, space is actually managed in terms of an extent which consists of 8 pages. A database
object can either span all 8 pages in an extent ("uniform extent") or share an extent with up to 7
more objects ("mixed extent").
A row in a database table cannot span more than one page, so is limited to 8 KB in size.
However, if the data exceeds 8 KB and the row contains Varchar or Varbinary data, the data in
those columns are moved to a new page (or possibly a sequence of pages, called an Allocation
unit) and replaced with a pointer to the data.

For physical storage of a table, its rows are divided into a series of partitions (numbered 1
to n). The partition size is user defined; by default all rows are in a single partition. A table is
split into multiple partitions in order to spread a database over a cluster. Rows in each partition
are stored in either B-tree or heap structure. If the table has an associated index to allow fast
retrieval of rows, the rows are stored in-order according to their index values, with a B-tree
providing the index.

The data is in the leaf node of the leaves, and other nodes storing the index values for the
leaf data reachable from the respective nodes. If the index is non-clustered, the rows are not
sorted according to the index keys. An indexed view has the same storage structure as an indexed
table. A table without an index is stored in an unordered heap structure. Both heaps and B-trees
can span multiple allocation units.
5.1 MODULE DESCRIPTION:

Through this web portal a person should be able to

 login to the system through the first page of the application

 change the password after logging into the system

System users will be of three types

a.An administrator
b.Dean or Hospital authority

c.Manager

Depending on the roles, system will be divided into 3 main modules

 Administrative module

 Reporting module

 Customer Details Module

Administrative Module - should allow administrators to

 create other users

 View users

 provide role based access

 invoke access

 Delete user etc

Customer details module should allow to

 View details of a customer and Info bar usage history on click on customer
name/email-id,Search, sort the customer on different fields, Send email to the
customer, Check the bonus point status

 Check customer requests for bonus points. This should receive as an email, CRO
should be able to see mails from a POP3 server

 Adjust number of bonus points automatically on allocation/selection of gift.


 Store shipment details and update the delivery status

 Before allocation of gift, check if the user is a duplicate user, logging with some
other details – this would be a key functionality and involve development of
efficient search algorithm on database to detect duplicate uses. Search will be on
different criteria like user name, date of birth, address etc

 On detection of duplicate user, CRO should be able to able to block/blacklist user

 Add/delete new reward schemes, product details in reward schemes

 Send emails to user regarding reward points, queries, feedback, complains etc.

Reporting module – should allow end users to

 View different types of reports such as

 Usage of Info bar in a month over a year in graphical format

 User base for the year

 Graphs for inactive users (users who did not use the Info bar for a period of a
month and more)

 Different reward schemes over the year and user response

 Customer feedbacks
6.1 DATA FLOW DIAGRAM

Scheme Updating
Admin

Scheme Details

Admin

User Details
Insert Edit Update

Scheme

Insert Edit Update

User Updating

tblUser
Admin

InfoBarDetails

Insert Edit Update


Info Bar Updating

InfoBar
InfoBarId

SchemeId

Remove
allotment
Allot Info bar from
to scheme scheme

Info Bar To Scheme Allotment

InfoBartoscheme
6.2 Database design
7.1 SCREEN LAYOUT

1.InfoBarCreation
2.InfoBarData

3.UserCreation
4.EditInfoBarList
5.InvalidLogin
6.InfoBarURL

7.PointManagement
8.Request Management

9.SchemeAllotment
10.SchemeManagement

7.2 SOURCE CODE


Allot.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Allot.aspx.cs" Inherits="Allot"
MasterPageFile="~/MasterPage.master" %>

<asp:Content ContentPlaceHolderID="mainContent" ID="SchemeAllot"


runat="server">
<div>
<table style="width: 100%; height: 100%;">
<tr>
<td style="width: 100%; height: 50%; vertical-
align: middle">
<table id="t1" align="center" runat="server"
style="background-color: #026da5; width: 50%;
height: 80%">
<tr>
<th colspan="2">
<b>Scheme Allotment</b>
</th>
</tr>
<tr>
<td>
<asp:Label ID="Label1"
runat="server" Text="SchemeId"></asp:Label>
</td>
<td>
<asp:DropDownList
ID="DropDownList1" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2"
runat="server" Text="Alloted InfoBars"></asp:Label>
</td>
<td>
<asp:Label ID="Label3"
runat="server" Text="Available InfoBars"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:ListBox ID="AvailableBox"
runat="server"></asp:ListBox>
</td>
<td>
<asp:ListBox ID="AllottedBox"
runat="server"></asp:ListBox>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1"
runat="server" Text=">" />
<asp:Button ID="Button2"
runat="server" Text="<" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button3"
runat="server" Text="UPDATE" />
<asp:Button ID="Button4"
runat="server" Text="RESET" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</asp:Content>

BonusPointAllotment.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true"
CodeFile="BonusPointAllotment.aspx.cs"
Inherits="BonusPointAllotment" Title="Untitled Page" %>

<asp:Content ID="Content2" ContentPlaceHolderID="mainContent"


runat="Server">
<div>
<table style="width: 100%; height: 100%;">
<tr>
<td style="width: 100%; height: 50%; vertical-
align: middle">
<table id="t1" align="center" runat="server"
style="background-color: #026da5; width: 50%;
height: 80%">
<tr>
<th colspan="2">
<b>Scheme Allotment</b>
</th>
</tr>
<tr>
<td>
<asp:Label ID="Label1"
runat="server" Text="BonusPoints"></asp:Label>
</td>
<td>
<asp:DropDownList
ID="DropDownList1" runat="server">
<asp:ListItem Text="10"
Value="10"></asp:ListItem>
<asp:ListItem Text="20"
Value="20"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2"
runat="server" Text="Alloted Schemes"></asp:Label>
</td>
<td>
<asp:Label ID="Label3"
runat="server" Text="Available Schemes"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:ListBox ID="AvailableBox"
runat="server">
<asp:ListItem Text="Scheme1"
Value="Scheme1"></asp:ListItem>
<asp:ListItem Text="Scheme3"
Value="Scheme3"></asp:ListItem>
<asp:ListItem Text="Scheme5"
Value="Scheme5"></asp:ListItem>
</asp:ListBox>
</td>
<td>
<asp:ListBox ID="AllottedBox"
runat="server">
<asp:ListItem Text="Scheme2"
Value="Scheme2"></asp:ListItem>
<asp:ListItem Text="Scheme4"
Value="Scheme4"></asp:ListItem>
</asp:ListBox>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1"
runat="server" Text=">" />
<asp:Button ID="Button2"
runat="server" Text="<" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button3"
runat="server" Text="UPDATE" />
<asp:Button ID="Button4"
runat="server" Text="RESET" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</asp:Content>

CreateUser.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="createuser.aspx.cs"
MasterPageFile="~/MasterPage.master"
Inherits="createuser" %>

<asp:Content ContentPlaceHolderID="mainContent"
ID="userMgmtContent" runat="server">
<div>
<table style="width: 100%; height: 100%;">
<tr>
<td style="width: 100%; height: 50%; vertical-
align: middle">
<table id="t1" runat="server"
style="background-color: #026da5; width: 50%; height: 80%">
<tr>
<th colspan="2">
<b>Create User</b>
</th>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label1"
runat="server" Text="UserId" CssClass="pageLabels"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txtUserId"
runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="userIdValidator"
runat="server" ErrorMessage="?" ControlToValidate="txtuserId">
</asp:RequiredFieldValidator>
<asp:Button ID="SearchBtn"
runat="server" Text="Go" OnClick="SearchBtn_Click"
CausesValidation="False" />
<asp:Button ID="newBtn"
runat="server" Text="New" CausesValidation="False"
OnClick="newBtn_Click" />
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label2"
runat="server" Text="UserName" CssClass="pageLabels"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txtUserName"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="userIdValidator0" runat="server" ErrorMessage="?"
ControlToValidate="txtUserNa
me"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label4"
runat="server" Text="Password" CssClass="pageLabels"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txtPassword"
TextMode="Password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="userIdValidator1" runat="server" ErrorMessage="?"
ControlToValidate="txtPasswo
rd"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="left">
<asp:Label ID="Label3"
runat="server" Text="InfoBarId"
CssClass="pageLabels"></asp:Label>
</td>
<td align="left">
<asp:DropDownList ID="InfoBarLst"
runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Button1"
runat="server" Text="SAVE" CssClass="buttonStyle"
OnClick="Button1_Click" />
<asp:Button ID="Button2"
runat="server" Text="RESET" CssClass="buttonStyle"
CausesValidation="False" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</asp:Content>

Createuser.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 SigmahComputers;
public partial class createuser : System.Web.UI.Page
{

public DataSet dataSet;


public DataTable dTable;
public DataRow dRow;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

dataSet = DBController.GetInfoBarIds();
dTable = new DataTable();
dTable.Columns.Add("InfoBarId");
dRow = dTable.NewRow();
dRow["InfoBarId"] = "Select";
dTable.Rows.Add(dRow);
for (int i = 0; i < dataSet.Tables[0].Rows.Count; i+
+)
{
dRow = dTable.NewRow();
dRow[0] = dataSet.Tables[0].Rows[i]
[0].ToString();
dTable.Rows.Add(dRow);

dataSet = new DataSet();


dataSet.Tables.Add(dTable);
InfoBarLst.DataSource = dataSet;
InfoBarLst.DataTextField = "InfoBarId";
InfoBarLst.DataValueField = "InfoBarId";
InfoBarLst.DataBind();

}
protected void SearchBtn_Click(object sender, EventArgs e)
{
if (txtInfoBarId.Text != String.Empty)
{

DBController.userId =
Convert.ToInt16(txtUserId.Text);
dataSet = new DataSet();
dataSet = DBController.GetUserDetails();
if (dataSet.Tables[0].Rows.Count > 0)
{
Session["isNew"] = "false";
txtUserName.Text = dataSet.Tables[0].Rows[0]
[1].ToString();
InfoBarLst.Text = dataSet.Tables[0].Rows[0]
[2].ToString();

}
else
{
string strScript = "alert('Invalid Id');";
Page.ClientScript.RegisterStartupScript(this.Get
Type(), "alertBox", strScript, true);
Session["isNew"] = "true";

}
}
else
{
string strScript = "alert('Enter Id');";
Page.ClientScript.RegisterStartupScript(this.GetType
(), "alertBox", strScript, true);

Session["isNew"] = "true";

}
protected void newBtn_Click(object sender, EventArgs e)
{
Session["isNew"] = "true";
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Session["isNew"].ToString() == "true")
{
DBController.infoBarId =
Convert.ToInt16(txtInfoBarId.Text);
DBController.infoName = txtInfoBarName.Text;
DBController.webSite = txtWebSite.Text;
DBController.InsertInfoBar();
string strScript = "alert('Data Inserted');";
Page.ClientScript.RegisterStartupScript(this.GetType
(), "alertBox", strScript, true);
}

else
{
DBController.infoBarId =
Convert.ToInt16(txtInfoBarId.Text);
DBController.infoName = txtInfoBarName.Text;
DBController.webSite = txtWebSite.Text;
DBController.UpdateInfoBar();
string strScript = "alert('Data Updated');";
Page.ClientScript.RegisterStartupScript(this.GetType
(), "alertBox", strScript, true);

//}
}
}

Login.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="login.aspx.cs" Inherits="login"
MasterPageFile="~/MasterPage.master" %>

<asp:Content ContentPlaceHolderID="mainContent" ID="LoginContent"


runat="server">
<div>
<table style="width: 100%; height: 100%;">
<tr>
<td style="width: 100%; height: 50%; vertical-
align: middle">
<table id="t1" runat="server"
style="background-color: #026da5; width: 50%; height: 80%">
<tr>
<td colspan="2">
<asp:Label ID="errLabel"
runat="server" ForeColor="Red" CssClass="errLabels"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label1"
runat="server" Text="UserName" CssClass="pageLabels"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtUserId"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="useridValidator" runat="server" ControlToValidate="txtuserId"
ErrorMessage="Input ?"></asp:
RequiredFieldValidator>
<asp:RangeValidator
ID="userIdrange" runat="server" ControlToValidate="txtuserid"
ErrorMessage="Only Nos"
MaximumValue="9" MinimumValue="0"></asp:RangeValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2"
runat="server" Text="Password" CssClass="pageLabels"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtPassword"
runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator
ID="passwordValidator" runat="server"
ControlToValidate="txtPassword"
ErrorMessage="Input ?"></asp:
RequiredFieldValidator>
<asp:RangeValidator
ID="passwordRange" runat="server" ControlToValidate="txtPassword"
ErrorMessage="Only alpha"
MaximumValue="z" MinimumValue="a"></asp:RangeValidator>
</td>
</tr>
<tr>
<td align="center">
</td>
<td align="center">
<asp:Button ID="Button1"
runat="server" Text="LOGIN" CssClass="buttonStyle"
OnClick="Button1_Click" />
<asp:Button ID="Button2"
runat="server" Text="RESET" CssClass="buttonStyle" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</asp:Content>
Login.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 SigmahComputers;

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


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

}
}
protected void Button1_Click(object sender, EventArgs e)
{

if (Page.IsValid)
{
DBController.userId =
Convert.ToInt16(txtUserId.Text);
DBController.password = txtPassword.Text;
if (DBController.LoginValidator())
Response.Redirect("admin.aspx");
else
errLabel.Text = "Invalid Credentials";

}
}
}

DbController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using SigmahComputers;
namespace SigmahComputers
{
//Provider=Microsoft.ACE.Sql.12.0;Data Source="C:\Documents
and Settings\Administrator\My Documents\Sigmah.accdb"
public class DBController
{
public static SqlConnection con = null;
public static SqlDataAdapter adapter = null;
public static SqlCommand command = null;
public static DataSet dataSet;

public static int userId;


public static String password;
public static int infoBarId;
public static String infoName;
public static String webSite;
public static void CreateConnection()
{
try
{
con = new SqlConnection(@"Data Source=INTEL-
PC\sqlexpress;Initial Catalog=WBRMS;Integrated Security=True");
con.Open();
}
catch (SqlException exception)
{
}

public static void CloseConnection()


{
try
{

con.Close();
}
catch (SqlException exception)
{

public static bool LoginValidator()


{

dataSet = null;
bool isFound = false;
try
{
CreateConnection();
adapter = new SqlDataAdapter("Select * from
Usertab where userid=" + userId + " and password='" + password +
"'", con);
dataSet = new DataSet();
adapter.Fill(dataSet);
CloseConnection();
if (dataSet.Tables[0].Rows.Count > 0)
isFound = true;

}
catch (SqlException exception2)
{
CloseConnection();
}

return isFound;
}

public static DataSet GetInfoBarDetails()


{

dataSet = null;

try
{
CreateConnection();
adapter = new SqlDataAdapter("Select * from
InfoBar where Infobarid=" + infoBarId, con);
dataSet = new DataSet();
adapter.Fill(dataSet);
CloseConnection();
return dataSet;
}
catch (SqlException exception2)
{
CloseConnection();
return dataSet;
}

public static DataSet GetUserDetails()


{

dataSet = null;

try
{
CreateConnection();
adapter = new SqlDataAdapter("Select * from
userTab where userid=" + userId, con);
dataSet = new DataSet();
adapter.Fill(dataSet);
CloseConnection();
return dataSet;
}
catch (SqlException exception2)
{
CloseConnection();
return dataSet;
}

public static DataSet GetInfoBarIds()


{

dataSet = null;

try
{
CreateConnection();
adapter = new SqlDataAdapter("Select * from
InfoBar", con);
dataSet = new DataSet();
adapter.Fill(dataSet);
CloseConnection();
return dataSet;
}
catch (SqlException exception2)
{
CloseConnection();
return dataSet;
}

}
public static void InsertInfoBar()
{
try
{
CreateConnection();
command = new SqlCommand("insert into Infobar
values(" + infoBarId + ",'" + infoName + "','" + webSite + "')",
con);
command.ExecuteNonQuery();
CloseConnection();

}
catch (SqlException exc)
{
CloseConnection();

public static void InsertUser()


{
try
{
CreateConnection();
command = new SqlCommand("insert into Infobar
values(" + infoBarId + ",'" + infoName + "','" + webSite + "')",
con);
command.ExecuteNonQuery();
CloseConnection();

}
catch (SqlException exc)
{
CloseConnection();

}
}

public static void UpdateInfoBar()


{
try
{
CreateConnection();
command = new SqlCommand("update Infobar set
infoBArName = '" + infoName + "',BindToWebsite='" + webSite + "'
where infobarid=" + infoBarId, con);

command.ExecuteNonQuery();
CloseConnection();

}
catch (SqlException exc)
{
CloseConnection(); } } }
}
8.SYSTEM TESTING

Various Type of Testing

The Development process involves various type of testing. Each test type address a
specific testing requirement. The most common type used in this Sundry Creditors Accruals
system are

 Unit Test
 System Test
 Acceptance Testing
 Alpha Test
 Beta Test
 Black Box testing

Unit Testing

The First Test in the development process is the unit test. The source code is
normally divided into module, which in turn divided into smaller unit called units. These
units have specific behavior. The test done on these units of code is called unit test. Unit
tests depend upon the language on which the project is developed. Unit tests ensure that
each unique path of the project performs accurately to the documented specification and
contains clearly defined input and expected result.

System Testing

Several modules constitute a project. If the project is long term project, several
developers write their module. Once the entire modules are integrated several errors may
occur. The testing done at this stage is called system test. System testing ensure that the
entire integrated software system meets requirements.

Acceptance Testing

Testing the system with the intent of confirming read lines of the product and
customer acceptance

Alpha Testing

Sometimes a select group of users are involved in testing. most often this testing
will be performed in-house or by an outside firm.

Beta Testing
Testing after product is code complete. Betas are often widely distributed or even
distributed to the public at large in hopes hat they will buy the final product when it is
released.

Black Box Testing

Testing software without any knowledge of the inner working, structure or


language of the module being tested. Black box test, as most other kinds of tests, must be
written from a definitive source document, such as a specification or requirements
document.

9.CONCLUSION

The project entitled as “Web based reward management system” has been tested and
implemented successfully.

The module can be enhanced with the following factors in future. These enhancements can be
implemented into the system as a new version after the successful launch of the current version.

Some of the enhanced features discussed during the design time are
• Using this application we can reward money on line through credit card.

• Scheme updation can be sent as a mail to the applicant

• Bonus mark hierarchy list can be generated automatically as a report


10.BIBLIOGRAPHY

Books Referred

The following books were used extensively for the project development and implementation.
1.”VB.N ET Developer’s Guide ” Syngress Publishing, Inc. Rockland,

by Cameron Wakefield
Henk-Evert Sonder
Wei Meng Lee
2. “ ASP.NET Database Programming” Hungry Minds, Inc.

By Jason Butler and Tony Caudill

Websites Referred

The following links were searched and exploited extensively for the project development
and implementation.

1 www.syngress.com/solutions

2 www.hungryminds.com

Vous aimerez peut-être aussi