You are on page 1of 99

A

MAJOR PROJECT REPORT


ON

TRUE BLOOD PUMP

JAN NAYAK CH.DEVI LAL COLLEGE OF ENGINEERING


SIRSA

In the Partial Fulfillment of the requirement for the award of


8th SEMESTER

SUBMITTED TO:Mrs. Manju Godara

H.O.D(CSE/IT)

1|Page

SUBMITTED BY:Jatin Sharma(1111252005)


Anil Paryag(1111252004)
I.T(8th Sem)

Preface
Major Project is an integral part of B.Tech and each and every student has to create
the Major Project in the final year while studying in Institute.
This is concerned about our practical Major Project during final year of B.Tech
course. We have taken our Practical Major Project in True Blood Pump(Blood
Donation Website). During this Major Project, we got to learn many new things
about the technology and its practical implementation. This Major Project proved to
be a milestone in our knowledge of present environment. Every say and every
moment was an experience in itself, an experience which theoretical study cant
provide

2|Page

Acknowledgement

We wish to express our heartiest gratitude to Col (Dr.) J S Virk, retd. (Director/
Principal) JCDMCOE, Sirsa for their constant encouragement, constructive
suggestions, thought provoking decisions and giving us full opportunity to practically
handle the system without whose supervision this could not be possible.
We also take the privilege to pay our deepest appreciation and heartiest thanks to ER.
Lekha Bhambhu (HOD CSE/IT) whose constant guidance is unbounded source of
inspiration for us. We own a great debt of gratitude towards our honorable Mrs.
Manju Godara (A.P.) whose invaluable expert suggestions at crucial junctures set our
thinking on right track.
I take this opportunity to express my sincere thanks and deep gratitude to all these
people who extended their wholehearted cooperation and have helped me in
completing this project work successfully
Finally, I would like to thank my active friends for help they did to complete this
project.

3|Page

Jan Nayak Ch. Devi Lal Memorial College of Engineering, Sirsa


Student decelaration
We, Jatin Sharma and Anil prayag , students of Bachelor of Technology (Information
Technology), in the department of Information Technology, JCDM college of
engineering, Guru Jambheswar University, Hisar, under university Roll no.
1111252005 & 1111252004 for the session 2011-2015, hereby, declare that the project
(CSE-499) entitled TRUE BLOOD PUMP has been completed by us in final year.
The matter embodied in this project has not been submitted earlier for award of any
degree or diploma to the best of knowledge and belief.
Date: 17 June, 2015
Place: Sirsa

4|Page

(Jatin Sharma)
(Anil Prayag)

Jan Nayak Ch. Devi Lal Memorial College of Engineering, Sirsa


Mrs. Manju Godara
Astt. Prof.

Date 17 June, 2015

Certificate
_______________________________________________________
It is to certified that Mr. Jatin Sharma & Anil Paryag, students of Bachelor of
Technology(Information Technology), under class roll no. 1111252005 & 1111252004
for the session 2011-2015, has completed the project entitled TRUE BLOOD
PUMP under my supervision. The project is, in my opinion, worthy for consideration
for the award of Bachelor in Information Technology in accordance with the rules and
regulations of Guru Jambheswar University,Hisar.
I wish her/him all the success in his/her all endeavors.
Mrs. Manju Godara
Assistant professor
Department of Information technology
Jan Nayak Ch. Devi Lal Memorial College of Engineering,Sirsa

5|Page

Index
SNO.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.

6|Page

TITLE
Front Page
Preface
Acknowledgement
Student Declaration
Certificate
Index
Introduction to platform
SDLC
Introduction of project
Project Detail
Modules Detail
Coding
Screenshots
Conclusion
Future Scope
References

PAGE NO.
1
2
3
4
5
6
7-17
18-25
26-27
28-39
40-42
43-78
79-95
96
97
98

Introduction to Platform
Introduction to .NET:
.NET provides a simple object-oriented model to access most of the Windows
application programming interfaces (APIs). It also provides mechanisms by which
you can use the existing native code. In addition, it significantly extends the
development platform by providing tools and technologies to develop Internet-based
distributed applications.
The .NET Platform
The Microsoft .NET platform is described as follows, consists of four components:

.NET Framework. The .NET Framework is a Multilanguage application


execution environment that transparently manages core infrastructure services.
It is a set of multiple languages/technologies used for developing and creating
components to create Web Forms, Web services, and Windows applications. It
supports the software life cycle for development, debugging, deployment, and
maintenance of applications. The version of .NET framework that ships with
Visual Studio .NET 2003 is version 1.1. The .NET Framework consists of the
following parts (also depicted in Figure 1.2):
o Common Language Runtime (CLR).
o .NET Framework base class library.
o Common Language Specification (CLS).
o .NET-compliant languages.
o Data and XML classes such as ADO.NET and XML.
o A set of class libraries for building XML Web services.
o ASP.NET Web Forms-based Web applications.
o Windows Forms-based rich client applications.
o Common Type System (CTS).
o Microsoft Visual Studio .NET 2003 integrated development
environment (IDE).
Development tools. Microsoft provides the programming model, the
development environment, and the tools necessary to build, deploy, and
operate Web services with applications such as Visual Studio .NET 2003.

.NET enterprise servers. The Microsoft .NET enterprise servers make up the
Microsoft .NET server infrastructure for deploying, managing, and operating
XML Web services and traditional applications. Examples of enterprise
servers are Microsoft SQL Server 2000 and Microsoft Commerce
Server 2000.

.NET foundation services. A core set of building block services that execute
standard tasks and act as a basis for developers to build upon. These
foundation services are known as Microsoft .NET My Services and provide
many features and functions. Most of the foundation services are hosted
(outsourced) services. An example of a currently available Web service is
Microsoft .NET Passport.

7|Page

(The .NET Framework overview)

(The .NET Framework architecture)

8|Page

Advantages of .NET
The .NET Framework provides the following advantages:
A consistent, object-oriented programming environment.
A code-execution environment that:
o Promotes safe execution of code.
o Eliminates the performance problems of scripted or interpreted
environments.
o Minimizes software deployment and versioning conflicts.
A consistent experience for both developers and users across various types of
Windows-based and Web-based applications on multiple devices.
Communication built on the industry standards to ensure that code based on
the .NET Framework can integrate with any other code.
.NET is based on open Internet standards, which include Hypertext Transfer Protocol
(HTTP), Extensible Markup Language (XML), and Simple Object Access Protocol
(SOAP).

9|Page

Various Features of .NET


1. Common Language Runtime:
Explains the features and benefits of the common
language runtime, a run-time environment that manages the execution of code and
provides services that simplify the development process.
2. Assemblies:
Defines the concept of assemblies, which are collections of
types and resources that form logical units of functionality. Assemblies are the
fundamental units of deployment, version control, reuse, activation scoping,
and security permissions.
3. Applications Domains:
Explains how to use application domains to provide isolation
between applications.
4. Runtime Hosts:
Describes the runtime hosts supported by the .NET Framework,
including ASP.NET, Internet Explorer, and shell executables.

5. Common Type System:


Identifies the types supported by the common language runtime.

6. Cross Language interoperability:


Explains how managed objects created in different programming
languages can interact with one another.

7. .NET Framework Security:


Describes mechanisms for protecting resources and code from unauthorized code and
unauthorized users.
8. .NET Framework Class Library
Introduces the library of types provided by the .NET Framework,
which expedites and optimizes the development process and gives you access to
system functionality.

10 | P a g e

(CLR components)

11 | P a g e

Introduction to ASP.NET:
ASP.Net is a web development platform, which provides a programming model, a
comprehensive software infrastructure and various services required to build up
robust web application for PC, as well as mobile devices.
ASP.Net works on top of the HTTP protocol and uses the HTTP commands and
policies to set a browser-to-server two-way communication and cooperation.
ASP.Net is a part of Microsoft .Net platform. ASP.Net applications are complied
codes, written using the extensible and reusable components or objects present in .Net
framework. These codes can use the entire hierarchy of classes in .Net framework.
The ASP.Net application codes could be written in either of the following languages:

C#

Visual Basic .Net

Jscript

J#
ASP.Net is used to produce interactive, data-driven web applications over the internet.
It consists of a large number of controls like text boxes, buttons and labels for
assembling, configuring and manipulating code to create HTML pages.
ASP.Net Web Forms Model:
ASP.Net web forms extend the event-driven model of interaction to the web
applications. The browser submits a web form to the web server and the server returns
a full markup page or HTML page in response.
All client side user activities are forwarded to the server for stateful processing. The
server processes the output of the client actions and triggers the reactions.
Now, HTTP is a stateless protocol. ASP.Net framework helps in storing the
information regarding the state of the application, which consists of:

Page state

Session state
The page state is the state of the client, i.e., the content of various input fields in the
web form. The session state is the collective obtained from various pages the user
visited and worked with, i.e., the overall session state. To clear the concept, let us take
up an example of a shopping cart as follows.
User adds items to a shopping cart. Items are selected from a page, say the items page,
and the total collected items and price are shown in a different page, say the cart page.
Only HTTP cannot keep track of all the information coming from various pages.
ASP.Net session state and server side infrastructure keeps track of the information
collected globally over a session.
12 | P a g e

The ASP.Net runtime carries the page state to and from the server across page
requests while generating the ASP.Net runtime codes and incorporates the state of the
server side components in hidden fields.
This way the server becomes aware of the overall application state and operates in a
two-tiered connected way.
ASP.Net Component Model:
The ASP.Net component model provides various building blocks of ASP.Net pages.
Basically it is an object model, which describes:

Server side counterparts of almost all HTML elements or tags, like <form>
and <input>.

Server controls, which help in developing complex user-interface for example


the Calendar control or the Gridview control.
ASP.Net is a technology, which works on the .Net framework that contains all webrelated functionalities. The .Net framework is made of an object-oriented hierarchy.
An ASP.Net web application is made of pages. When a user requests an ASP.Net page,
the IIS delegates the processing of the page to the ASP.Net runtime system.
The ASP.Net runtime transforms the .aspx page into an instance of a class, which
inherits from the base class Page of the .Net framework. Therefore, each ASP.Net
page is an object and all its components i.e., the server-side controls are also objects.

13 | P a g e

Introduction to ADO.NET:
ADO.NET is an object-oriented set of libraries that allows you to interact with data
sources. Commonly, the data source is a database, but it could also be a text file, an
Excel spreadsheet, or an XML file. For the purposes of this tutorial, we will look at
ADO.NET as a way to interact with a data base.
As you are probably aware, there are many different types of databases available. For
example, there is Microsoft SQL Server, Microsoft Access, Oracle, Borland Interbase,
and IBM DB2, just to name a few. To further refine the scope of this tutorial, all of the
examples will use SQL Server.

Data Providers
We know that ADO.NET allows us to interact with different types of data sources and
different types of databases. However, there isn't a single set of classes that allow you
to accomplish this universally. Since different data sources expose different protocols,
we need a way to communicate with the right data source using the right protocol
Some older data sources use the ODBC protocol, many newer data sources use the
OleDb protocol, and there are more data sources every day that allow you to
communicate with them directly through .NET ADO.NET class libraries.
ADO.NET provides a relatively common way to interact with data sources, but comes
in different sets of libraries for each way you can talk to a data source. These libraries
are called Data Providers and are usually named for the protocol or data source type
they allow you to interact with. Table 1 lists some well known data providers, the API
prefix they use, and the type of data source they allow you to interact with.

14 | P a g e

Table 1. ADO.NET Data Providers are class libraries that allow a common way
to interact with specific data sources or protocols. The library APIs
have prefixes that indicate which provider they support.

Provider
Name

API
prefix

Data Source Description

ODBC Data
Odbc
Provider

Data Sources with an ODBC interface. Normally older data bases.

OleDb
Data
OleDb
Provider

Data Sources that expose an OleDb interface, i.e. Access or Excel.

Oracle
Data
Oracle
Provider

For Oracle Databases.

SQL
Data
Sql
Provider

For interacting with Microsoft SQL Server.

Borland Data
Bdp
Provider

Generic access to many databases such as Interbase, SQL Server,


IBM DB2, and Oracle.

15 | P a g e

ADO.NET Objects
ADO.NET includes many objects you can use to work with data. This section
introduces some of the primary objects you will use. Over the course of this tutorial,
you'll be exposed to many more ADO.NET objects from the perspective of how they
are used in a particular lesson. The objects below are the ones you must know.
Learning about them will give you an idea of the types of things you can do with data
when using ADO.NET.
The SqlConnection Object
To interact with a database, you must have a connection to it. The connection helps
identify the database server, the database name, user name, password, and other
parameters that are required for connecting to the data base. A connection object is
used by command objects so they will know which database to execute the command
on.
The SqlCommand Object
The process of interacting with a database means that you must specify the actions
you want to occur. This is done with a command object. You use a command object to
send SQL statements to the database. A command object uses a connection object to
figure out which database to communicate with. You can use a command object
alone, to execute a command directly, or assign a reference to a command object to an
SqlDataAdapter, which holds a set of commands that work on a group of data as
described below.
The SqlDataReader Object
Many data operations require that you only get a stream of data for reading. The data
reader object allows you to obtain the results of a SELECT statement from a
command object. For performance reasons, the data returned from a data reader is a
fast forward-only stream of data. This means that you can only pull the data from the
stream in a sequential manner This is good for speed, but if you need to manipulate
data, then a DataSet is a better object to work with.
The DataSet Object
DataSet objects are in-memory representations of data. They contain multiple
Datatable objects, which contain columns and rows, just like normal database tables.
You can even define relations between tables to create parent-child relationships. The
DataSet is specifically designed to help manage data in memory and to support
disconnected operations on data, when such a scenario make sense. The DataSet is an
object that is used by all of the Data Providers, which is why it does not have a Data
Provider specific prefix.
The SqlDataAdapter Object
Sometimes the data you work with is primarily read-only and you rarely need to make
changes to the underlying data source Some situations also call for caching data in
memory to minimize the number of database calls for data that does not change. The
data adapter makes it easy for you to accomplish these things by helping to manage
data in a disconnected mode. The data adapter fills a DataSet object when reading the
data and writes in a single batch when persisting changes back to the database. A data
adapter contains a reference to the connection object and opens and closes the
connection automatically when reading from or writing to the database. Additionally,
the data adapter contains command object references for SELECT, INSERT,
UPDATE, and DELETE operations on the data. You will have a data adapter defined
16 | P a g e

for each table in a DataSet and it will take care of all communication with the
database for you. All you need to do is tell the data adapter when to load from or write
to the database.

Summary
ADO.NET is the .NET technology for interacting with data sources. You have several
Data Providers, which allow communication with different data sources, depending
on the protocols they use or what the database is. Regardless, of which Data Provider
used, you'll use a similar set of objects to interact with a data source. The
SqlConnection object lets you manage a connection to a data source. SqlCommand
objects allow you to talk to a data source and send commands to it. To have fast
forward-only read access to data, use the SqlDataReader. If you want to work with
disconnected data, use a DataSet and implement reading and writing to/from the data
source with a SqlDataAdapter.

17 | P a g e

SDLC
SDLC, Software Development Life Cycle is a process used by software industry to
design, develop and test high quality softwares. The SDLC aims to produce a high
quality software that meets or exceeds customer expectations, reaches completion
within times and cost estimates.

SDLC is the acronym of Software Development Life Cycle.

It is also called as Software development process.

The software development life cycle (SDLC) is a framework defining tasks


performed at each step in the software development process.

ISO/IEC 12207 is an international standard for software life-cycle processes.


It aims to be the standard that defines all the tasks required for developing
and maintaining software.

What is SDLC?
SDLC is a process followed for a software project, within a software organization. It
consists of a detailed plan describing how to develop, maintain, replace and alter or
enhance specific software. The life cycle defines a methodology for improving the
quality of software and the overall development process.

18 | P a g e

The following figure is a graphical representation of the various stages of a typical


SDLC.

19 | P a g e

A typical Software Development life cycle consists of the following stages:


Stage 1: Planning and Requirement Analysis
Requirement analysis is the most important and fundamental stage in SDLC. It is
performed by the senior members of the team with inputs from the customer, the
sales department, market surveys and domain experts in the industry. This
information is then used to plan the basic project approach and to conduct product
feasibility study in the economical, operational, and technical areas.
Planning for the quality assurance requirements and identification of the risks
associated with the project is also done in the planning stage. The outcome of the
technical feasibility study is to define the various technical approaches that can be
followed to implement the project successfully with minimum risks.
Stage 2: Defining Requirements
Once the requirement analysis is done the next step is to clearly define and document
the product requirements and get them approved from the customer or the market
analysts. This is done through .SRS. . Software
Requirement Specification document which consists of all the product requirements
to be designed and developed during the project life cycle.
Stage 3: Designing the product architecture
SRS is the reference for product architects to come out with the best architecture for
the product to be developed. Based on the requirements specified in SRS, usually
more than one design approach for the product architecture is proposed and
documented in a DDS - Design Document Specification.
This DDS is reviewed by all the important stakeholders and based on various
parameters as risk assessment, product robustness, design modularity , budget and
time constraints , the best design approach is selected for the product.
A design approach clearly defines all the architectural modules of the product along
with its communication and data flow representation with the external and third party
modules (if any). The internal design of all the modules of the proposed architecture
should be clearly defined with the minutest of the details in DDS.

20 | P a g e

Stage 4: Building or Developing the Product


In this stage of SDLC the actual development starts and the product is built. The
programming code is generated as per DDS during this stage. If the design is
performed in a detailed and organized manner, code generation can be accomplished
without much hassle.
Developers have to follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers etc are used to generate
the code. Different high level programming languages such as C, C++, Pascal, Java,
and PHP are used for coding. The programming language is chosen with respect to
the type of software being developed.
Stage 5: Testing the Product
This stage is usually a subset of all the stages as in the modern SDLC models, the
testing activities are mostly involved in all the stages of SDLC. However this stage
refers to the testing only stage of the product where products defects are reported,
tracked, fixed and retested, until the product reaches the quality standards defined in
the SRS.
Stage 6: Deployment in the Market and Maintenance
Once the product is tested and ready to be deployed it is released formally in the
appropriate market. Sometime product deployment happens in stages as per the
organizations. business strategy. The product may first be released in a limited
segment and tested in the real business environment (UAT- User acceptance testing).
Then based on the feedback, the product may be released as it is or with suggested
enhancements in the targeting market segment. After the product is released in the
market, its maintenance is done for the existing customer base.

21 | P a g e

SDLC Models
There are various software development life cycle models defined and designed
which are followed during software development process. These models are also
referred as "Software Development Process Models". Each process model follows a
Series of steps unique to its type, in order to ensure success in process of software
development.
Following are the most important and popular SDLC models followed in the
industry:

Waterfall Model

Iterative Model

Spiral Model

V-Model

Big Bang Model

22 | P a g e

Waterfall Model
The Waterfall Model was first Process Model to be introduced. It is also referred to
as a linear-sequential life cycle model. It is very simple to understand and use. In a
waterfall model, each phase must be completed before the next phase can begin and
there is no overlapping in the phases.
Waterfall model is the earliest SDLC approach that was used for software
development .
The waterfall Model illustrates the software development process in a linear
sequential flow; hence it is also referred to as a linear-sequential life cycle model.
This means that any phase in the development process begins only if the previous
phase is complete. In waterfall model phases do not overlap.
Waterfall Model design
Waterfall approach was first SDLC Model to be used widely in Software
Engineering to ensure success of the project. In "The Waterfall" approach, the whole
process of software development is divided into separate phases. In Waterfall model,
typically, the outcome of one phase acts as the input for the next phase sequentially.
Following is a diagrammatic representation of different phases of waterfall model.

23 | P a g e

The sequential phases in Waterfall model are:

Requirement Gathering and analysis: All possible requirements of the


system to be developed are captured in this phase and documented in a
requirement specification doc.

System Design: The requirement specifications from first phase are studied in
this phase and system design is prepared. System Design helps in specifying
hardware and system requirements and also helps in defining overall system
architecture.

Implementation: With inputs from system design, the system is first


developed in small programs called units, which are integrated in the next
phase. Each unit is developed and tested for its functionality which is referred
to as Unit Testing.

Integration and Testing: All the units developed in the implementation


phase are integrated into a system after testing of each unit. Post integration
the entire system is tested for any faults and failures.

Deployment of system: Once the functional and non functional testing is


done, the product is deployed in the customer environment or released into
the market.

Maintenance: There are some issues which come up in the client


environment. To fix those issues patches are released. Also to enhance the
product some better versions are released. Maintenance is done to deliver
these changes in the customer environment.

All these phases are cascaded to each other in which progress is seen as flowing
steadily downwards (like a waterfall) through the phases. The next phase is started
only after the defined set of goals are achieved for previous phase and it is signed
off, so the name "Waterfall Model". In this model phases do not overlap.

24 | P a g e

Waterfall Model Application


Every software developed is different and requires a suitable SDLC approach to be
followed based on the internal and external factors. Some situations where the use of
Waterfall model is most appropriate are:

Requirements are very well documented, clear and fixed.

Product definition is stable.

Technology is understood and is not dynamic.

There are no ambiguous requirements.

Ample resources with required expertise are available to support the product.

The project is short.

Waterfall Model Pros & Cons


Advantage
The advantage of waterfall development is that it allows for departmentalization and
control. A schedule can be set with deadlines for each stage of development and a
product can proceed through the development process model phases one by one.
Development moves from concept, through design, implementation, testing,
installation, troubleshooting, and ends up at operation and maintenance. Each phase
of development proceeds in strict order.

Disadvantage
The disadvantage of waterfall development is that it does not allow for much
reflection or revision. Once an application is in the testing stage, it is very difficult to
go back and change something that was not well-documented or thought upon in the
concept stage.

25 | P a g e

Introduction of Project
TRUE BLOOD PUMP will be an information management system which helps to
manage the records of donors and patients at a blood bank. The system will allow the
authorized blood bank officer to login using a secret password and easily manage the
records of the blood donors and the patients in need of blood.
This is a web application which allows you to access the whole information about
Blood Bank Management Software, readily scalable and adaptable to meet the
complex need of Blood Banks Who are Key Facilitator for the Healthcare Sector; it
also supports all the functionalities of Blood Bank.
The key features of the system will be the following:

Centralized database architecture.

Access to the system secured by login.

Search facility for finding blood donors based of various search criteria.

Search facility for finding Patients (acceptors) based of various search.

Easy addition and updating of donor's details.

Easy addition and updating of details of acceptors.

Problem Definition:
Entering the details about the blood groups, members, addresses etc. and tracking the
database is complicated when the details are maintained manually. This makes the
maintenance of schedule erroneous. India's blood banking system has serious short
comings. The gap between demand and supply of blood is continuously widening.
India has an annual requirement of approximately, 5.0 million units of blood. The
actual collection is only approximately 3.50 million units. A study conducted by the
National AIDS Control Organization (NACO), regarding blood banking services in
India has revealed many shortcomings, including the decentralized nature of blood
services, a shortage of human, technological and financial resources and a deficit in
the availability of blood, especially from voluntary donors. Paradoxically, very few
blood banks are operating to their full efficiency. Even during an emergency, the onus
is on the patient's relatives to arrange for replacement of blood.
26 | P a g e

Existing System:
Limitations of the Manual system:
It is time consuming
It leads to error prone results
It consumes lot of manpower to better results
It lacks of data security
Retrieval of data takes lot of time
Percentage of accuracy is less
Reports take time to produce
Proposed Solution:
An efficient blood bank management system for a Blood Bank should be developed,
with the aim of ensuring that every patient has access to an adequate quantity of safe
blood. The management system should solve the issue of demand and wastage and
lead to self sufficiency in blood requirement. The centralized system allocates a
unique ID for each donor and it is possible to trace the status of all donors for a
particular region where the system is implemented. It should also be replicable in
other Blood Banks.

27 | P a g e

Project Details
Objective of Project:
TRUE BLOOD PUMP is aims serving for human welfare. We have all the
information, you will ever need. Many people are here for you, to help you, willing to
donate blood for you anytime. We have done the entire job, rest is yours. Search the
blood group you need.
You can help us by registering on TRUE BLOOD PUMP if you are willing to donate
your blood when needed. As a proud member of TRUE BLOOD PUMP and a
responsible human being, you can help someone in need. So donate blood in online.

Feasibility Study:
Preliminary investigation examine project feasibility, the likelihood the system will be
useful to the organization. The main objective of the feasibility study is to test the
Technical, Operational and Economical feasibility for adding new modules and
debugging old running system. All system is feasible if they are unlimited resources
and infinite time. There are aspects in the feasibility study portion of the preliminary
investigation:

Technical Feasibility

Operation Feasibility

Economical Feasibility

1. Technical Feasibility
The technical issue usually raised during the feasibility stage of the investigation
includes the following:

Does the necessary technology exist to do what is suggested?

Do the proposed equipments have the technical capacity to hold the data required
to use the new system?

Will the proposed system provide adequate response to inquiries, regardless of the
number or location of users?

Can the system be upgraded if developed?

28 | P a g e

Are there technical guarantees of accuracy, reliability, ease of access and data
security?

Earlier no system existed to cater to the needs of Secure Infrastructure


Implementation System. The current system developed is technically feasible. It is a
web based user interface for audit workflow at NIC-CSD. Thus it provides an easy
access to the users. The databases purpose is to create, establish and maintain a
workflow among various entities in order to facilitate all concerned users in their
various capacities or roles. Permission to the users would be granted based on the
roles specified. Therefore, it provides the technical guarantee of accuracy, reliability
and security. The software and hardware requirements for the development of this
project are not many and are already available in-house at NIC or are available as free
as open source. The work for the project is done with the current equipment and
existing software technology. Necessary bandwidth exists for providing a fast
feedback to the users irrespective of the number of users using the system.

2. Operational Feasibility
Proposed projects are beneficial only if they can be turned out into information
system. That will meet the organizations operating requirements. Operational
feasibility aspects of the project are to be taken as an important part of the project
implementation. Some of the important issues raised are to test the operational
feasibility of a project includes the following:

Is there sufficient support for the management from the users?

Will the system be used and work properly if it is being developed and
implemented?

Will there be any resistance from the user that will undermine the possible
application benefits?

This system is targeted to be in accordance with the above-mentioned issues.


Beforehand, the management issues and user requirements have been taken into
consideration. So there is no question of resistance from the users that can undermine
the possible application benefits
29 | P a g e

.
The well-planned design would ensure the optimal utilization of the computer
resources and would help in the improvement of performance status.
3. Economic Feasibility
A system can be developed technically and that will be used if installed must still be a
good investment for the organization. In the economical feasibility, the development
cost in creating the system is evaluated against the ultimate benefit derived from the
new systems. Financial benefits must equal or exceed the costs.
The system is economically feasible. It does not require any addition hardware or
software. Since the interface for this system is developed using the existing resources
and technologies available at NIC, There is nominal expenditure and economical
feasibility for certain.

30 | P a g e

Software Requirement Specification(SRS)


The software, Site Explorer is designed for management of web sites from a remote
location.
Introduction:
Purpose: The main purpose for preparing this document is to give a general insight
into the analysis and requirements of the existing system or situation and for
determining the operating characteristics of the system.
Scope: This Document plays a vital role in the development life cycle (SDLC) and it
describes the complete requirement of the system. It is meant for use by the
developers and will be the basic during testing phase. Any changes made to the
requirements in the future will have to go through formal change approval process.
DEVELOPERS RESPONSIBILITIES OVERVIEW:
The developer is responsible for:

Developing the system, which meets the SRS and solving all the requirements of
the system?

Demonstrating the system and installing the system at client's location after the
acceptance testing is successful.

Submitting the required user manual describing the system interfaces to work on it
and also the documents of the system.

Conducting any user training that might be needed for using the system.

Maintaining the system for a period of one year after installation.

31 | P a g e

Hardware & Software Requirements

Hardware Requirements:

Intel Dual Core 1.8 GHz or above


1 GB RAM
80GB HDD Minimum

Software Requirements:

Operating System
IDE
Front End
Language
Database

32 | P a g e

: Windows XP/7/8
: Microsoft Visual Studio 2010
: ASP.NET
: C#.NET
: SQL Server 2008

33 | P a g e

Data Flow Diagrams(DFD)


A data flow diagram is graphical tool used to describe and analyze movement of data
through a system. These are the central tool and the basis from which the other
components are developed. The transformation of data from input to output, through
processed, may be described logically and independently of physical components
associated with the system. These are known as the logical data flow diagrams. The
physical data flow diagrams show the actual implements and movement of data
between people, departments and workstations. A full description of a system actually
consists of a set of data flow diagrams. Using two familiar notations Yourdon, Gane
and Sarson notation develops the data flow diagrams. Each component in a DFD is
labeled with a descriptive name. Process is further identified with a number that will
be used for identification purpose. The development of DFDS is done in several
levels. Each process in lower level diagrams can be broken down into a more detailed
DFD in the next level. The lop-level diagram is often called context diagram. It
consists a single process bit, which plays vital role in studying the current system.
The process in the context level diagram is exploded into other process at the first
level DFD.
The idea behind the explosion of a process into more process is that understanding at
one level of detail is exploded into greater detail at the next level. This is done until
further explosion is necessary and an adequate amount of detail is described for
analyst to understand the process.
Larry Constantine first developed the DFD as a way of expressing system
requirements in a graphical from, this lead to the modular design.
A DFD is also known as a bubble Chart has the purpose of clarifying system
requirements and identifying major transformations that will become programs in
system design. So it is the starting point of the design to the lowest level of detail. A
DFD consists of a series of bubbles joined by data flows in the system.
DFD Symbols
In the DFD, there are four symbols
1. A square defines a source(originator) or destination of system data
2. An arrow identifies data flow. It is the pipeline through which the information
flows

34 | P a g e

3. A circle or a bubble represents a process that transforms incoming data flow into
outgoing data flows.
4. An open rectangle is a data store, data at rest or a temporary repository of data

Process that transforms data flow.

Source or Destination of data


Data flow
Data Store

Constructing a DFD:
Several rules of thumb are used in drawing DFDS:
1. Process should be named and numbered for an easy reference. Each name should
be representative of the process.
2. The direction of flow is from top to bottom and from left to right.

Data

traditionally flow from source to the destination although they may flow back to
the source. One way to indicate this is to draw long flow line back to a source.
An alternative way is to repeat the source symbol as a destination. Since it is used
more than once in the DFD it is marked with a short diagonal.
3. When a process is exploded into lower level details, they are numbered.
4. The names of data stores and destinations are written in capital letters. Process and
dataflow names have the first letter of each work capitalized
A DFD typically shows the minimum contents of data store. Each data store should
contain all the data elements that flow in and out.

35 | P a g e

Questionnaires should contain all the data elements that flow in and out.
Missing interfaces redundancies and like is then accounted for often through
interviews.
Sailent features of DFDS
1. The DFD shows flow of data, not of control loops and decision are controlled
considerations do not appear on a DFD.
2. The DFD does not indicate the time factor involved in any process whether the
dataflow take place daily, weekly, monthly or yearly.
3. The sequence of events is not brought out on the DFD.
TYPES OF DATA FLOW DIAGRAMS
1. Current Physical
2. Current Logical
3. New Logical
4. New Physical
CURRENT PHYSICAL:
In Current Physical DFD process label include the name of people or their positions
or the names of computer systems that might provide some of the overall systemprocessing label includes an identification of the technology used to process the data.
Similarly data flows and data stores are often labels with the names of the actual
physical media on which data are stored such as file folders, computer files, business
forms or computer tapes.
CURRENT LOGICAL:
The physical aspects at the system are removed as much as possible so that the current
system is reduced to its essence to the data and the processors that transform them
regardless of actual physical form.

36 | P a g e

NEW LOGICAL:
This is exactly like a current logical model if the user were completely happy with the
functionality of the current system but had problems with how it was implemented
typically through the new logical model will differ from current logical model while
having additional functions, absolute function removal and inefficient flows
recognized.
NEW PHYSICAL:
The new physical represents only the physical implementation of the new system.

37 | P a g e

RULES GOVERNING THE DFDS


PROCESS
1) No process can have only outputs.
2) No process can have only inputs. If an object has only inputs than it must be a
sink.
3) A process has a verb phrase label.
DATA STORE
1) Data cannot move directly from one data store to another data store, a process
must move data.
2) Data cannot move directly from an outside source to a data store, a process, which
receives, must move data from the source and place the data into data store
3) A data store has a noun phrase label.
SOURCE OR SINK
The origin and /or destination of data.
1) Data cannot move direly from a source to sink it must be moved by a process
2) A source and /or sink has a noun phrase land
DATA FLOW
1) A Data Flow has only one direction of flow between symbols. It may flow in both
directions between a process and a data store to show a read before an update.
The later is usually indicated however by two separate arrows since these happen
at different type.
2) A join in DFD means that exactly the same data comes from any of two or more
different processes data store or sink to a common location.
3) A data flow cannot go directly back to the same process it leads. There must be at
least one other process that handles the data flow produce some other data flow
returns the original data into the beginning process.
4) A Data flow to a data store means update (delete or change).

38 | P a g e

Module wise DFD


Donor:
give Info

Donor
get blood Request

Blood
Mgmt
System

DB

Acceptor:
Search Blood donor

Acceptor
Send blood request
Request accepted

Blood
Mgmt
System

DB

Administrator:
Maintain info(Update/Del)

Administrator
Check all info

39 | P a g e

Blood
Mgmt
System

DB

Modules Detail
In this project mainly 3 modules are there.

Admin
Donors
Acceptors

Admin: This module focuses on the both donors & acceptors. Each member in a
donor & acceptor is given a user id and password, which identifies him uniquely. The
member is given a login form. He enters the login details user id and password. The
options given to

Maintain donor details

Maintain acceptor details

Update donor details

Update acceptor details

Logout

Whenever a user wants to change his / her password he can select the change
password option. The system displays the form, which asks him for his old password
and new password. The system then compares the old password with the existing
password in the database and if they match then the password is set to the new
password in the database. The id for retrieving the details from the database is brought
through the session, which is maintained using cookies in the form. This removes the
burden on user in typing user id again and also maintains security by not allowing one
user to change password of other accidentally.

Donor: Each member in a Donor is given a user id and password, which identifies
him uniquely. The member is given a login form. he enters the login details user id
and password. The options given to a each member in a staff are

See Blood Request

Why donate blood?

Logout

40 | P a g e

Whenever a user wants to change his / her password he can select the change
password option. The system displays the form, which asks him for his old password
and new password. The system then compares the old password with the existing
password in the database and if they match then the password is set to the new
password in the database. The employee id for retrieving the details from the database
is brought through the session, which is maintained using cookies in the form. This
removes the burden on user in typing user id again and also maintains security by not
allowing one user to change password of other accidentally.
At the end the user is able to log out from the system using the logout option.

41 | P a g e

Acceptor: In this you can store the information about Acceptors.

Find a blood group.

Who needs blood?

Logout

42 | P a g e

Coding
Home.aspx
<%@Page Title=""Language="C#"MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style1
{
width: 271px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml" onadcreated="AdRotator1_AdCreated"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:ContentID="Content4"runat="server"contentplaceholderid="ContentPlaceHol1"
>
<center style="font-style:italic; font-size:xx-large"><b><i>!!Welcome to True
Blood Pump!!</i></b></center><br /><br />
<fieldset style="border-width:thick;">
<legend style="font-size:x-large; font-weight:bolder;">Login Here</legend>
<table style="width: 430px; height: 177px" >
<tr>
<td class="style4">
<asp:Label ID="Label2" runat="server" Text="Username" placeholder="enter
username*" required="required" ></asp:Label></td>
<td class="style4"></td>
<td class="style1"><asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox></td></tr>
<tr>

43 | P a g e

<td class="style8"><asp:Label ID="Label3" runat="server" Text="Password"


placeholder="enter password*" required="required"></asp:Label></td>
<td class="style8"></td>
<td class="style1"><asp:TextBox ID="TextBox2" runat="server"
TextMode="Password"></asp:TextBox></td>
<td class="style8"><asp:ImageButton ID="ImageButton1" runat="server"
Height="55px"
ImageUrl="~/images/16225625-login-icon-Stock-Photo-button.jpg"
onclick="ImageButton1_Click" style="margin-left: 2px"
Width="99px" />&nbsp;</td></tr>
<tr>
<td><asp:Label ID="Label1" runat="server" Text="Login
as:"></asp:Label></td>
<td></td>
<td class="style1">
<asp:DropDownList ID="DropDownList1" runat="server"
Height="22px" Width="140px">
<asp:ListItem Value="-------Select Role-------">-------Select Role------</asp:ListItem>
<asp:ListItem>Donor</asp:ListItem>
<asp:ListItem>Acceptor</asp:ListItem>
<asp:ListItem>Administrator</asp:ListItem>
</asp:DropDownList>
</td>
<td><asp:Label ID="Label4" runat="server"></asp:Label></td>
</tr>
</table>
</fieldset>
<br />
<center style=" color:Green; font-size:larger; font-style:oblique; fontweight:bolder;">??Are you ready to save life??</center>
<fieldset style="border-width:thick; height: 127px; width: 560px;">
<legend style="font-size: x-large; font-weight: bolder;">Register as</legend>
<table style="width: 560px; height: 93px">
<tr>
<td class="style10">
<asp:ImageButton ID="ImageButton2" runat="server" Height="95px"
ImageUrl="~/images/41AfZ8Ox2jL.jpg" Width="190px"
onclick="ImageButton2_Click1" />
</td>
<td class="style11">
</td>
44 | P a g e

<td>
<asp:ImageButton ID="ImageButton3" runat="server" Height="95px"
ImageUrl="~/images/Capture.JPG" style="margin-left: 100px; marginbottom: 0px"
Width="190px" onclick="ImageButton3_Click" />
</td>
</tr>
</table>
</fieldset>
<br /><br />

</asp:Content>

Home.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class Home : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (DropDownList1.SelectedValue == "Donor")
{
try
{
SqlCommand cmd = new SqlCommand("select Email_id,Passwd from
donoreg where Email_id=@a and Passwd=@b", cn);
cn.Open();
cmd.Parameters.AddWithValue("@a", TextBox1.Text);
cmd.Parameters.AddWithValue("@b", TextBox2.Text);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
45 | P a g e

Label4.Text = "Login Successfuly!!!";


Session["textbox1"] = TextBox1.Text;
Response.Redirect("donor.aspx");
}
else
{
Label4.Text = "Login Failed";
}
cn.Close();
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}
else if (DropDownList1.SelectedValue == "Acceptor")
{
try
{
SqlCommand cmd = new SqlCommand("select Email_id,Passwd from
acceptoreg where Email_id=@a and Passwd=@b", cn);
cn.Open();
cmd.Parameters.AddWithValue("@a", TextBox1.Text);
cmd.Parameters.AddWithValue("@b", TextBox2.Text);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
Label4.Text = "Login Successfuly!!!";
Session["textbox1"] = TextBox1.Text;
Response.Redirect("acceptor.aspx");
}
else
{
Label4.Text = "Login Failed";
}
cn.Close();
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}
else if (TextBox1.Text == "administrator@gmail.com" || TextBox2.Text ==
"198")
{
Label4.Text = "Login Successfuly!!!";
Response.Redirect("admin.aspx");
}
46 | P a g e

else
{
Label4.Text = "Login Failed";
}
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
}
protected void ImageButton2_Click1(object sender, ImageClickEventArgs e)
{
Response.Redirect("Donorreg.aspx");
}
protected void AdRotator1_AdCreated(object sender, AdCreatedEventArgs e)
{
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Acceptorreg.aspx");
}
}

47 | P a g e

donor.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="donor.aspx.cs" Inherits="donor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml" onadcreated="AdRotator1_AdCreated"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table>
<tr>
<td style="margin-left:0px;"><asp:Label ID="Label1" runat="server"
Text="Welcome:"></asp:Label><b> <asp:Label ID="Label2" runat="server"
Text="Label"></asp:Label></b></td>
<td><h4 style="margin-left:230px; margin-top:12px;">Logged-In|<a
href="Home.aspx">Logged-Out</a></h4></td>
</tr>
</table><br />
<center><table><tr>
<td><a href="whydonateblood.aspx">>>Why donate Blood?<<</a></td>
</tr></table></center><br />
<table>
<tr>
<td><b><u>BLOOD REQUESTS:-</u></b></td>
</tr>
<tr>
<td><asp:Button ID="Button1" runat="server"
Text="Click here to see blood request" onclick="Button1_Click" /></td>
</tr></table><br />
<center><table>
<tr>
<td><asp:GridView ID="GridView1" runat="server">
</asp:GridView></td>
<td><asp:Label ID="Label3" runat="server" Text=""></asp:Label></td>
</tr>
48 | P a g e

</table></center>
</asp:Content>

donor.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class donor : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Label2.Text = Session["textbox1"].ToString();
}
}
protected void AdRotator1_AdCreated(object sender, AdCreatedEventArgs e)
{
}
string st;
protected void Button1_Click(object sender, EventArgs e)
{
string id = Label2.Text;
SqlCommand cmd = new SqlCommand("select Blood_group from donoreg
where Email_id='"+id+"'", cn);
cn.Open();
object ss = cmd.ExecuteScalar();
string stt=ss.ToString();
SqlDataAdapter daa = new SqlDataAdapter("select * from bloodreq where
Blood_group='" + stt + "'", cn);
DataTable dt = new DataTable();
daa.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
49 | P a g e

cn.Close();
}
}

50 | P a g e

acceptor.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="acceptor.aspx.cs" Inherits="acceptor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table>
<tr>
<td style="margin-left:0px;"><asp:Label ID="Label1" runat="server"
Text="Welcome:"></asp:Label><b> <asp:Label ID="Label2" runat="server"
Text="Label"></asp:Label></b></td>
<td><h4 style="margin-left:270px; margin-top:12px;">Logged-In|<a
href="Home.aspx">Log-Out</a></h4></td>
</tr>
</table>
<center><table><tr>
<td><a href="whoneedsblood.aspx">>>Who needs Blood?<<</a></td>
</tr></table></center>
<table>
<tr>
<td><b>Find a blood group:-</b></td>
</tr>
</table>
<br />
<center><table>
<tr>
<td>
<center><asp:DropDownList ID="DropDownList1" runat="server"
Height="22px"
51 | P a g e

Width="172px" >
<asp:ListItem>---------------Select-----------------</asp:ListItem>
<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:ListItem>O-</asp:ListItem>
<asp:ListItem>AB</asp:ListItem>
<asp:ListItem>AB+</asp:ListItem>
</asp:DropDownList></center>
</td>
</tr>
<tr>
<td><asp:Button ID="Button1" runat="server" Text="Search"
onclick="Button1_Click"/></td>
</tr>
</table></center> <br />
<center> <table>
<tr>
<td>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</td>
</tr>
</table></center>
<table>
<tr>
<td>
<b>Make a blood request:-</b>
</td>
</tr>
</table>
<center><br /> <table><tr>
<td>Name</td>
<td>

<asp:TextBox ID="TextBox1" runat="server"


ontextchanged="TextBox1_TextChanged"></asp:TextBox></td>
</tr>
<tr><td>Phone</td>
<td><asp:TextBox ID="TextBox2" runat="server"
ontextchanged="TextBox2_TextChanged"></asp:TextBox></td>
</tr>
<tr><td>Comment</td>
<td><asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td>
52 | P a g e

</tr>
<tr>
<td><asp:Button ID="Button2" runat="server" Text="Send"
onclick="Button2_Click" /></td><td><asp:Label
ID="Label3" runat="server" Text=""></asp:Label></td>
</tr>
</table></center>
</asp:Content>

acceptor.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class acceptor : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Label2.Text = Session["textbox1"].ToString();
//GridView1.Visible = false;
}
cn.Open();
SqlCommand cmd = new SqlCommand("select Name,Phone_no from
acceptoreg where Email_id='"+Label2.Text+"'",cn);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = dr[0].ToString();
TextBox2.Text = dr[1].ToString();
}
cn.Close();
}
String bg;
protected void Button1_Click(object sender, EventArgs e)
{
if (DropDownList1.SelectedValue == "A")
{
bg = "A";
53 | P a g e

SqlDataAdapter da = new SqlDataAdapter("select


Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "A+")
{
bg = "A+";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "B")
{
bg = "B";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "B+")
{
bg = "B+";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "O")
{
bg = "O";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
54 | P a g e

else if (DropDownList1.SelectedValue == "O+")


{
bg = "O+";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "O-")
{
bg = "O-";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else if (DropDownList1.SelectedValue == "AB+")
{
bg = "AB+";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
bg = "AB-";
SqlDataAdapter da = new SqlDataAdapter("select
Name,Gender,dob,Phone_no,Addr,Blood_group from donoreg where Blood_group='"
+ bg + "' ", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into bloodreq
values(@a,@b,@c,@d)", cn);
cn.Open();
55 | P a g e

cmd.Parameters.AddWithValue("@a", TextBox1.Text);
if (DropDownList1.SelectedValue == "A")
{
bg = "A";
}
else if (DropDownList1.SelectedValue == "A+")
{
bg = "A+";
}
else if (DropDownList1.SelectedValue == "B")
{
bg = "B";
}
else if (DropDownList1.SelectedValue == "B+")
{
bg = "B+";
}
else if (DropDownList1.SelectedValue == "O")
{
bg = "O";
}
else if (DropDownList1.SelectedValue == "O+")
{
bg = "O+";
}
else if (DropDownList1.SelectedValue == "O-")
{
bg = "O-";
}
else if (DropDownList1.SelectedValue == "AB+")
{
bg = "AB+";
}
else
{
bg = "AB-";
}
cmd.Parameters.AddWithValue("@b", bg);
cmd.Parameters.AddWithValue("@c", TextBox2.Text);
cmd.Parameters.AddWithValue("@d", TextBox3.Text)
cmd.ExecuteNonQuery();
Label3.Text = "REQUEST SENT";
cn.Close();
}
catch (Exception ex)
{
Label3.Text = ex.Message;
}
}}
56 | P a g e

admin.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="admin.aspx.cs" Inherits="admin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<center style="font-style:italic; font-size:xx-large"><b><i>!!Welcome to Admin
Page!!</i></b></center>
<table>
<tr>
<td><h4 style="margin-left:450px; margin-top:12px;">Logged-In|<a
href="Home.aspx">Log-Out</a></h4></td>
</tr>
</table>
<center><table>
<tr>
<td>
<center style="font-style:normal; font-size:x-large"><b><a
href="donordetails.aspx">>>Click here to see & Update Donor
Details<<</a></b></center>
</td>
</tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr>
<td><center style="font-style:normal; font-size:x-large"><b><a
href="acceptordetails.aspx">>>Click here to see & Update Acceptor
Details<<</a></b></center></td>
</tr>
57 | P a g e

</table></center>
</asp:Content>

admin.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class admin : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
string chk;
protected void Page_Load(object sender, EventArgs e)
{
//if (!Page.IsPostBack)
//{
// LoadGrid();
//}
}
}

58 | P a g e

acceptordetails.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master"
AutoEventWireup="true" CodeFile="acceptordetails.aspx.cs"
Inherits="acceptordetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table>
<tr>
<td><h4 style="margin-left:850px; margin-top:12px;">Logged-In|<a
href="Home.aspx">Log-Out</a></h4></td>
</tr>
</table>
<center style="font-style:italic; font-size:xx-large"><b><i><u>Acceptor
Details</u></i></b></center>
<center><table>
<tr>
<td><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CssClass="style2" DataKeyNames="Registeration_ID"
onrowdeleting="GridView1_RowDeleting"
onrowcancelingedit="GridView1_RowCancelingEdit"
onrowediting="GridView1_RowEditing"
onselectedindexchanged="GridView1_SelectedIndexChanged2"
onrowupdating="GridView1_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="Registration_ID">
<ItemTemplate>
<asp:Label runat="server" ID="lblid" Text='<%# Eval("Registeration_ID")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label runat="server" ID="name" Text='<%# Eval("Name")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtname" Text='<%# Eval("Name") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Gender">
<ItemTemplate>
<asp:Label runat="server" ID="gender" Text='<%# Eval("Gender")
%>'></asp:Label>
</ItemTemplate>
59 | P a g e

<EditItemTemplate>
<asp:TextBox ID="txtgender" Text='<%# Eval("Gender") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
<asp:Label runat="server" ID="dob" Text='<%# Eval("dob")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdob" Text='<%# Eval("dob") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Photo">
<ItemTemplate>
<asp:Image runat="server" ID="img" ImageUrl='<%# Eval("Photo") %>'
Width="90px" Height="90px"></asp:Image>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:Button ID="btnedit" runat="server" CommandName="edit"
Text="Edit" />
<asp:Button runat="server" ID="btndelete" CommandName="delete"
Text="Delete" />
</ItemTemplate>
<EditItemTemplate>
<asp:Button runat="server" ID="btnupdate" CommandName="update"
Text="Update" />
<asp:Button runat="server" ID="btncancel" CommandName="cancel"
Text="Cancel" />
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table></center>
<br /><br />
<center style="font-style:italic; font-size:xx-large"><b><i><u>Blood
Request</u></i></b></center>
<center>
<table>
<tr>
<td><asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name"
SortExpression="Name" />
<asp:BoundField DataField="Blood_group" HeaderText="Blood_group"
60 | P a g e

SortExpression="Blood_group" />
<asp:BoundField DataField="Phone_no" HeaderText="Phone_no"
SortExpression="Phone_no" />
<asp:BoundField DataField="Comment" HeaderText="Comment"
SortExpression="Comment" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:tbpConnectionString %>"
SelectCommand="SELECT [Name], [Blood_group], [Phone_no], [Comment]
FROM [bloodreq]">
</asp:SqlDataSource>
</td>
</tr>
</table>
</center>
<asp:Label ID="Label1" runat="server"></asp:Label>
</asp:Content>

acceptordetails.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class acceptordetails : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
string chk;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadGrid();
}
}
void LoadGrid()
{
SqlDataAdapter da = new SqlDataAdapter("select * from acceptoreg", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
61 | P a g e

GridView1.DataBind();
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs
e)
{
int id1 = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
SqlCommand cmd = new SqlCommand("delete from acceptoreg where
Registeration_ID='" + id1 + "'", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
LoadGrid();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
GridView1.EditIndex = e.NewEditIndex;
LoadGrid();
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}
protected void GridView1_RowCancelingEdit(object sender,
GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
LoadGrid();
}
protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
int id1 = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
TextBox name = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtname"));
TextBox gender = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtgender"));
TextBox dob = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtdob"));
SqlCommand cmd = new SqlCommand("update acceptoreg set Name='" +
name.Text + "',Gender='" + gender.Text + "' ,dob='" + dob.Text + "'where
Registeration_ID='" + id1 + "'", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
GridView1.EditIndex = -1;
LoadGrid();
}
62 | P a g e

donordetails.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master"
AutoEventWireup="true" CodeFile="donordetails.aspx.cs" Inherits="donordetails"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table>
<tr>
<td><h4 style="margin-left:850px; margin-top:12px;">Logged-In|<a
href="Home.aspx">Log-Out</a></h4></td>
</tr>
</table>
<center style="font-style:italic; font-size:xx-large"><b><i><u>Donor
Details</u></i></b></center>
<center><table>
<tr>
<td><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CssClass="style2" DataKeyNames="Registeration_ID"
onrowdeleting="GridView1_RowDeleting"
onrowcancelingedit="GridView1_RowCancelingEdit"
onrowediting="GridView1_RowEditing"
onselectedindexchanged="GridView1_SelectedIndexChanged2"
onrowupdating="GridView1_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="Registration_ID">
<ItemTemplate>
<asp:Label runat="server" ID="lblid" Text='<%# Eval("Registeration_ID")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label runat="server" ID="name" Text='<%# Eval("Name")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtname" Text='<%# Eval("Name") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Gender">
<ItemTemplate>
<asp:Label runat="server" ID="gender" Text='<%# Eval("Gender")
%>'></asp:Label>
</ItemTemplate>
63 | P a g e

<EditItemTemplate>
<asp:TextBox ID="txtgender" Text='<%# Eval("Gender") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
<asp:Label runat="server" ID="dob" Text='<%# Eval("dob")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdob" Text='<%# Eval("dob") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Blood_group">
<ItemTemplate>
<asp:Label runat="server" ID="bgp" Text='<%# Eval("Blood_group")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtbgp" Text='<%# Eval("Blood_group") %>'
runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Photo">
<ItemTemplate>
<asp:Image runat="server" ID="img" ImageUrl='<%# Eval("Photo") %>'
Width="90px" Height="90px"></asp:Image>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<asp:Button ID="btnedit" runat="server" CommandName="edit"
Text="Edit" />
<asp:Button runat="server" ID="btndelete" CommandName="delete"
Text="Delete" />
</ItemTemplate>
<EditItemTemplate>
<asp:Button runat="server" ID="btnupdate" CommandName="update"
Text="Update" />
<asp:Button runat="server" ID="btncancel" CommandName="cancel"
Text="Cancel" />
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table></center>
<asp:Label ID="Label1" runat="server"></asp:Label>

64 | P a g e

</asp:Content>

donordetails.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class donordetails : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
string chk;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadGrid();
}
}
void LoadGrid()
{
SqlDataAdapter da = new SqlDataAdapter("select * from donoreg", cn);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs
e)
{
int id1 = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
SqlCommand cmd = new SqlCommand("delete from donoreg where
Registeration_ID='" + id1 + "'", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
LoadGrid();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
GridView1.EditIndex = e.NewEditIndex;
LoadGrid();
}
catch (Exception ex)
65 | P a g e

{
Label1.Text = ex.Message;
}
}
protected void GridView1_SelectedIndexChanged2(object sender, EventArgs e)
{
}
protected void GridView1_RowCancelingEdit(object sender,
GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
LoadGrid();
}
protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
int id1 = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
TextBox name = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtname"));
TextBox gender = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtgender"));
TextBox dob = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtdob"));
TextBox bgp = (TextBox)
(GridView1.Rows[e.RowIndex].FindControl("txtbgp"));
SqlCommand cmd = new SqlCommand("update donoreg set Name='" +
name.Text + "',Gender='" + gender.Text + "'
,dob='"+dob.Text+"',Blood_group='"+bgp.Text+"'where Registeration_ID='" + id1 +
"'", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
GridView1.EditIndex = -1;
LoadGrid();
}
}

66 | P a g e

Donorreg.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Donorreg.aspx.cs" Inherits="Donorreg" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style13
{
width: 338px;
}
.style15
{
height: 70px;
width: 182px;
}
.style16
{
width: 338px;
height: 70px;
}
.style19
{
height: 27px;
width: 182px;
}
.style20
{
width: 338px;
height: 27px;
}
.style21
{
height: 30px;
width: 182px;
}
.style22
{
width: 338px;
height: 30px;
}
.style23
{
width: 182px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
67 | P a g e

<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<script type="text/javascript" language="javascript">
function Validate1(source, args) {
var s = document.getElementById('TextBox3').value;
if (s.length == 10) {
return args.IsValid = true;
}
else {
return args.IsValid = false;
}
}
</script>
<center style="font-style:italic; font-size:xx-large"><b><i><u>Donor
Registration</u></i></b></center><br />
<center><table bgcolor="#CCCCFF" border="5">
<tr>
<td><asp:Label ID="Label1" runat="server" Text="Name"></asp:Label></td>
<td><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td><asp:Label ID="Label2" runat="server" Text="Gender"></asp:Label></td>
<td>
<asp:RadioButton ID="RadioButton1" runat="server" Text="Male"
/>&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RadioButton ID="RadioButton2" runat="server" Text="Female" />
</td>
</tr>
<tr>
<td>D.O.B</td>
<td>
68 | P a g e

<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>


<asp:ImageButton ID="ImageButton1" runat="server" Height="18px"
ImageUrl="~/images/calender_alt_month.ico" Width="20px"
onclick="ImageButton1_Click" CausesValidation="false" />
<asp:Calendar ID="Calendar1" runat="server"
onselectionchanged="Calendar1_SelectionChanged"
style="margin-top: 0px; margin-right: 0px;" onload="Page_Load"
Height="16px" Width="121px">
</asp:Calendar>
</td>
</tr>
<tr>
<td>Phone-No.</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"
MaxLength="10" ></asp:TextBox>
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="*" ControlToValidate="TextBox3" ForeColor="Red"
ClientValidationFunction="Validate1" SetFocusOnError="True"
ValidateEmptyText="True" ></asp:CustomValidator>
</td>
</tr>
<tr>
<td>Address</td>
<td><asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="TextBox4"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Blood Group</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" Height="22px"
Width="172px" >
<asp:ListItem>---------------Select-----------------</asp:ListItem>
<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:ListItem>O-</asp:ListItem>
<asp:ListItem>AB</asp:ListItem>
<asp:ListItem>AB+</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ErrorMessage="*" ControlToValidate="DropDownList1"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>

69 | P a g e

</tr>
<tr>
<td>
Email-id:
</td>
<td><asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="TextBox2" ErrorMessage="Plz Enter a Valid Address"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td >Password</td>
<td>
<asp:TextBox ID="TextBox5" runat="server"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="TextBox5" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Confirm Password</td>
<td>
<asp:TextBox ID="TextBox6" runat="server"
TextMode="Password"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox5" ControlToValidate="TextBox6"
ErrorMessage="Password doesn't match "></asp:CompareValidator>
</td>
</tr>
<tr>
<td>Upload Photo</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" />
</td></tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Submit" style="marginbottom: 0px" onclick="Button1_Click" />
<asp:Button ID="Button2"
runat="server" Text="Cancel" onclick="Button2_Click"
/>
</td>
70 | P a g e

<td><asp:Label ID="Label3" runat="server"></asp:Label></td>


</tr>
</table></center>
</asp:Content>

Donorreg.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class Donorreg : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Calendar1.Visible = false;
LoadGrid();
}
}
void LoadGrid()
{
SqlDataAdapter da = new SqlDataAdapter("select * from donoreg", cn);
DataTable dt = new DataTable();
da.Fill(dt);
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox9.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
protected void CustomValidator1_ServerValidate(object source,
ServerValidateEventArgs args)
{
if (TextBox3.Text.Length < 10)
{
71 | P a g e

args.IsValid = false;
}
else
{
args.IsValid = true;
}
}
string bg;
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into donoreg
values(@a,@b,@c,@d,@e,@f,@g,@h,@i)", cn);
cn.Open();
cmd.Parameters.AddWithValue("@a", TextBox1.Text);
if (RadioButton1.Checked)
{
cmd.Parameters.AddWithValue("@b", RadioButton1.Text);
}
else
{
cmd.Parameters.AddWithValue("@b", RadioButton2.Text);
}
cmd.Parameters.AddWithValue("@c", TextBox9.Text);
cmd.Parameters.AddWithValue("@d", TextBox3.Text);
cmd.Parameters.AddWithValue("@e", TextBox4.Text);
if (DropDownList1.SelectedValue == "A")
{
bg = "A";
}
else if (DropDownList1.SelectedValue == "A+")
{
bg = "A+";
}
else if (DropDownList1.SelectedValue == "B")
{
bg = "B";
}
else if (DropDownList1.SelectedValue == "B+")
{
bg = "B+";
}
else if (DropDownList1.SelectedValue == "O")
{
bg = "O";
}
else if (DropDownList1.SelectedValue == "O+")
{
bg = "O+";
72 | P a g e

}
else if (DropDownList1.SelectedValue == "O-")
{
bg = "O-";
}
else if (DropDownList1.SelectedValue == "AB+")
{
bg = "AB+";
}
else
{
bg = "AB-";
}
cmd.Parameters.AddWithValue("@f", bg);
cmd.Parameters.AddWithValue("@g", TextBox2.Text);
cmd.Parameters.AddWithValue("@h", TextBox5.Text);
string path = FileUpload1.PostedFile.FileName;
FileUpload1.SaveAs(MapPath("~/images/" + path));
cmd.Parameters.AddWithValue("@i", "~/images/" + path);
cmd.ExecuteNonQuery();
//cn.Close();
Label3.Text = "Data Saved";
cn.Close();
}
catch (Exception ex)
{
Label3.Text = ex.Message;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = String.Empty;
RadioButton1.Checked = false;
RadioButton2.Checked = false;
TextBox9.Text = String.Empty;
TextBox3.Text = String.Empty;
TextBox4.Text = String.Empty;
DropDownList1.SelectedValue = null;
TextBox2.Text = String.Empty;
TextBox5.Text = String.Empty;
TextBox6.Text = String.Empty;
RequiredFieldValidator1.Visible = false;
RequiredFieldValidator2.Visible = false;
RequiredFieldValidator3.Visible = false;
RequiredFieldValidator5.Visible = false;
Label3.Text = String.Empty;
}
}
73 | P a g e

Acceptorreg.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Acceptorreg.aspx.cs" Inherits="Acceptor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
Runat="Server">
<div style="text-align:center; margin-top:0px;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" height="300px" width="1000px"
AdvertisementFile="advertise.xml"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="2000">
</asp:Timer>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<center style="font-style:italic; font-size:xx-large"><b><i><u>Acceptor
Registration</u></i></b></center><br />
<center><table bgcolor="#CCCCFF" border="5">
<tr>
<td><asp:Label ID="Label1" runat="server" Text="Name"></asp:Label></td>
<td><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td><asp:Label ID="Label2" runat="server" Text="Gender"></asp:Label></td>
<td>
<asp:RadioButton ID="RadioButton1" runat="server" Text="Male"
/>&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RadioButton ID="RadioButton2" runat="server" Text="Female" />
</td>
</tr>
<tr>
<td>D.O.B</td>
<td>
<asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
74 | P a g e

<asp:ImageButton ID="ImageButton1" runat="server" Height="18px"


ImageUrl="~/images/calender_alt_month.ico" Width="20px"
onclick="ImageButton1_Click" CausesValidation="false" />
<asp:Calendar ID="Calendar1" runat="server"
onselectionchanged="Calendar1_SelectionChanged"
style="margin-top: 0px; margin-right: 0px;" onload="Page_Load"
Height="16px" Width="121px">
</asp:Calendar>
</td>
</tr>
<tr>
<td>Phone-No.</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"
MaxLength="10" ></asp:TextBox>
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="*" ControlToValidate="TextBox3" ForeColor="Red"
ClientValidationFunction="Validate1" SetFocusOnError="True"
ValidateEmptyText="True" ></asp:CustomValidator>
</td>
</tr>
<tr>
<td>Address</td>
<td><asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="TextBox4"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Email-id:
</td>
<td><asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="TextBox2" ErrorMessage="Plz Enter a Valid Address"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td >Password</td>
<td>
<asp:TextBox ID="TextBox5" runat="server"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="TextBox5" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
75 | P a g e

</tr>
<tr>
<td>Confirm Password</td>
<td>
<asp:TextBox ID="TextBox6" runat="server"
TextMode="Password"></asp:TextBox>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox5" ControlToValidate="TextBox6"
ErrorMessage="Password doesn't match "></asp:CompareValidator>
</td>
</tr>
<tr>
<td>Upload Photo</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" />
</td></tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Submit" style="marginbottom: 0px" onclick="Button1_Click" />
<asp:Button ID="Button2"
runat="server" Text="Cancel" onclick="Button2_Click"
/>
</td>
<td><asp:Label ID="Label3" runat="server"></asp:Label></td>
</tr>
</table></center>
</asp:Content>

Acceptorreg.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class Acceptor : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
76 | P a g e

{
if (!Page.IsPostBack)
{
Calendar1.Visible = false;
LoadGrid();
}
}
void LoadGrid()
{
SqlDataAdapter da = new SqlDataAdapter("select * from acceptoreg", cn);
DataTable dt = new DataTable();
da.Fill(dt);
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox9.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = String.Empty;
RadioButton1.Checked = false;
RadioButton2.Checked = false;
TextBox9.Text = String.Empty;
TextBox3.Text = String.Empty;
TextBox4.Text = String.Empty;
TextBox2.Text = String.Empty;
TextBox5.Text = String.Empty;
TextBox6.Text = String.Empty;
RequiredFieldValidator1.Visible = false;
RequiredFieldValidator2.Visible = false;
RequiredFieldValidator5.Visible = false;
Label3.Text = String.Empty;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into acceptoreg
values(@a,@b,@c,@d,@e,@f,@g,@h)", cn);
cn.Open();
cmd.Parameters.AddWithValue("@a", TextBox1.Text);
if (RadioButton1.Checked)
{
cmd.Parameters.AddWithValue("@b", RadioButton1.Text);
}
77 | P a g e

else
{
cmd.Parameters.AddWithValue("@b", RadioButton2.Text);
}
cmd.Parameters.AddWithValue("@c", TextBox9.Text);
cmd.Parameters.AddWithValue("@d", TextBox3.Text);
cmd.Parameters.AddWithValue("@e", TextBox4.Text);

cmd.Parameters.AddWithValue("@f", TextBox2.Text);
cmd.Parameters.AddWithValue("@g", TextBox5.Text);
string path = FileUpload1.PostedFile.FileName;
FileUpload1.SaveAs(MapPath("~/images/" + path));
cmd.Parameters.AddWithValue("@h", "~/images/" + path);
cmd.ExecuteNonQuery();
Label3.Text = "Data Saved";
cn.Close();
catch (Exception ex)
{
Label3.Text = ex.Message;
}
}
}

78 | P a g e

Modules Snapshot
Home

79 | P a g e

Why donate blood?

80 | P a g e

Who needs blood?

81 | P a g e

Tips on donating

82 | P a g e

Blood Fact

83 | P a g e

AboutUs Page

84 | P a g e

ContactUs Page

85 | P a g e

Donor Registration

86 | P a g e

Acceptor Registration

87 | P a g e

Donor Page

88 | P a g e

Acceptor Page

89 | P a g e

Admin Page

90 | P a g e

Donor Details Page(Under Admin)

91 | P a g e

Acceptor Details Page(Under Admin)

92 | P a g e

Database
Donor Registration(donoreg)

93 | P a g e

Acceptor Registration(acceptoreg)

94 | P a g e

Blood Request(bloodreq)

95 | P a g e

Conclusion
An efficient blood bank management system for a Blood Bank should be developed,
with the aim of ensuring that every patient has access to an adequate quantity of safe
blood. The management system should solve the issue of demand and wastage; and
lead to self sufficiency in blood requirement. The centralized system allocates a
unique ID for each donor and it is possible to trace the status of all donors for a
particular region where the system is implemented. It should also be replicable in
other Blood Banks.

96 | P a g e

Future Scope
Suppose in the future activities or the method associated with the Blood Donation
System. System is changed or they want some more activities to be automated, then is
such cases this project can be easily to handle and anyone can operate it. It will not
only reduce the cost of maintenance of records but it will be also improve the
efficiency of work.

97 | P a g e

Reference
BOOKS:

Professional ASP.NET in C# & VB by bill evjen


ASP.NET 3.5 by Stephen Walther

ONLINE REFERENCE:

www.wordpress.com
www.google.com
www.tutorialspoint.com

98 | P a g e

99 | P a g e

You might also like