Nothing Special   »   [go: up one dir, main page]

2online Organ and Blood Donation Management System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 122

CHAPTER 1

INTRODUCTION

The Online Organ Donation Management System is a user friendly web


application intended for general hospitals, clinics and other health centers to manage the
donor registration and user maintenance. The public can retrieve information about organ
donation in this web site without much effort. Fulfillment of all pre-requisites for organ
and blood donation is reliable. The Online Organ and Blood Donation Management
System is designed for mainly five types of users. They are administrator, medical staff,
donor, acceptor and hospital.
The application will be processed by the administrator and each donor will
receive feedback about their application status. Furthermore, the authorized user's
account will be maintained by the administrator. The donor record will be managed by
four main users such as administrator, doctor, medical assistant and management staff.
Only administrator has the authority and privileges to print organ list report and total
donation report according to district from this system.This system can be a single point of
access for the donors and acceptors.In addition, the improvement part for this system is to
help the administrators to easily retrieve the donor's details. Other than that, it also
supports the data integrity for each and every change which is done on the system.
Moreover, all kind of queried can be done within a minutes.This system also assures the
data integrity and helps the management handle the donor's registration more efficient.
The data also can be shared by other applications and also known as reusable.The system
able to calculate the total number of donors according to the district and type of organ
they want to donate.

1
CHAPTER 2
LANGUAGE CHOICE

The common language runtime (CLR) is responsible for runt-time services such
as language integration; security enforcement; and memory, process and thread
management. In addition, it has a roll at development time when features such as life
cycle management strong type naming, cross-language exception handling, dynamic
binding and so on, reduce the amount of code that a developer must write to turn the
business logic the reusable component. The runtime can be hosted by high performance,
server-side applications, such a s Microsoft Internet Information Services (IIS) for
building web applications with ASP.NE and the next release of Microsoft SQL Server.
This infrastructure enables you to use code “managed “ by the .NET framework to write
your business logic, while still enjoying the superior performance of the industry’s best
enterprises servers that support runtime hosting.

2.1 ASP.NET
Creating ASP.NET applications is much simpler. ASP.NET uses the Common
Language Runtime (CLR) provided by .NET framework. It is a programming framework
that is used to create enterprise-class web applications. The enterprise-class web
applications are accessible on a global basis, leading to efficient information
management. ASP.NET is integrated with Visual Studio.Net, which provides a GUI
designer, a rich e CLR allows objects, which are created in different languages, to
interact with each other and hence removes the language barrier.

Advantages Using ASP.NET

o ASP.NET drastically reduces the amount of code required to build large applications.
o ASP.NET makes development simpler and easier to maintain with an event-driven,
server-side programming model

2
o ASP.NET pages are easy to write and maintain because the source code and HTML
are together
o The source code is executed on the server. The pages have lots of power and
flexibility by this approach
o The source code is compiled the first time the page is requested. Execution is fast as
the Web Server compiles the page the first time it is requested. The server saves the
compiled version of the page for use next time the page is requested.
o The HTML produced by the ASP.NET page is sent back to the browser. The
application source code you write is not sent and is not easily stolen
o ASP.NET makes for easy deployment. There is no need to register components
because the configuration information is built-in
o The Web server continuously monitors the pages, components and applications
running on it. If it notices memory leaks, infinite loops, other illegal software or
activities, it seamlessly kills those activities and restarts itself
o ASP.NET validates information (validation controls) entered by the user without
writing a single line of code
o ASP.NET easily works with ADO .NET using data-binding and page formatting
features.

2.2 The .Net Platform

.NET is a “Software platform”. It is a language-neutral environment for writing


programs that can easily and securely interoperate. Rather than targeting a particular
hardware/operating system combination, programs will instead target “.NET”, and will
run wherever .NET is implemented. .NET is also the collective name given to various
bits of software built upon the .NET platform. The components that make up .NET –the
platform are called the .NET Framework.

3
The .NET framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET framework
is designed to fulfill the following objectives:
1. To provide a consistent object-oriented programming environment whether object
code is stored and executed locally, but Internet-distributed or executed remotely.
2. To provide a code-execution environment that minimizes software deployment and
versioning conflicts.
3. To provide a code-execution environment that guarantees safe execution of code
including code created by an unknown or semi-trusted third party.
4. To provide a code-execution environment that eliminates the performance problems of
scripted or interpreted environments.
5. To make the developer experience consistent across widely varying types of
applications, such as Windows-based application and web-based applications.
6. To build all communication on industry standards to ensure that code based on the .net
framework can integrate with any other.

The .NET framework has two main components:


 The Common Language Runtime
 A hierarchical set of Class Libraries

Common Language Runtime (CLR)


CLR is described as the “execution engine” of .NET. It provides the environment
within which programs run. The most important features are:

1. Conversion from a low-level assembler-style language called Intermediate Language


(IL), into code native to the platform being executed on.
2. Memory Management, notably including garbage collection.
3. Checking and enforcing security restrictions on the running code.
4. Loading and executing programs with version control and other such features.

4
Class Libraries
Class Libraries, the other main component of the .NET framework, is a
comprehensive, object-oriented collection of reusable type that you can use to develop
applications ranging from traditional command-line or Graphical User Interface (GUI)
applications to applications based on the latest innovations provided by ASP.NET such as
Web Forms and XML Web Services.

The .Net framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed
code, thereby creating a software environment that can exploit both managed and
unmanaged features.

The .Net framework not only provides several runtime hosts, but also supports
the development of third-party runtime hosts. We can use the .net framework to develop
the following types of applications and services.

1. Console applications.
2. Scripted or hosted applications
3. Windows GUI applications (Windows form)
4. ASP.NET applications
5. XML Web Services
6. Windows Services

2.3 About C#

C# is a modern, object oriented language that enables programmers to quickly and


easily build solutions for the Microsoft .NET development environment. The framework
provides allows c# components to become XML web services that are now available
across the Internet from any application running on any platform. C# brings rapid web
development to the C and C++ programmer while maintaining the power and flexibility

5
that those developers call for .Developers familiar with these languages can quickly
become productive in C#.

Features of C#
1 Emerging web programming standards
2 Eliminates Productivity and safety
3 Embraces costly programming errors
4 Reduces development costs with built in support versioning
5 Power , Expressiveness and flexibilility
6 Better mapping between business process and implementation
7 Extensive Interoperability

2.4 SQL Server 2008

Database is an integrated set of interrelate data stored in online medium with


controlled redundancy to several applications within an enterprise. A Database
Management System is a software system that manages the base of an enterprise and
provides facilities to the users to use the database within practical case.

In relational database approach, data is organized in logical mathematical sets, in


a tabular structure. The data field becomes a column in a table under relational model,
and each record becomes a row in a table. Relationship between various table area
defined through the use of mathematical function, such as JOIN and UNION. The most
important advantage of the relational model is its flexibility in describing the
relationships between the various data items.

Primary purpose behind relational model is the preservation of data integrity,


which implies that data must be stored in a format that prevents it from being accessed
from outside the DBMS that created it. The emphasis on the data integrity makes the

6
relational model ideal for traction processing systems, and thus for multi-user and
client/server database.
Microsoft SQL Server 2008 features include:

 Internet Integration.

The SQL Server 2008 database engine includes integrated XML support. It also
has the scalability, availability, and security features required to operate as the data
storage component of the largest Web sites.

 Scalability and Availability.

The same database engine can be used across platforms ranging from laptop
computers running Microsoft Windows 98 through large, multiprocessor servers running
Microsoft Windows 2000 Data Center Edition. SQL Server 2008 Enterprise Edition
supports features such as federated servers, indexed views, and large memory support
that allow it to scale to the performance levels required by the largest Web sites.

 Enterprise-Level Database Features

The SQL Server 2008 relational database engine supports the features required to
support demanding data processing environments. The database engine protects data
integrity while minimizing the overhead of managing thousands of users concurrently
modifying the database.

 Ease of installation, deployment, and use

SQL Server 2008 includes a set of administrative and development tools that
improve upon the process of installing, deploying, managing, and using SQL Server

7
across several sites. SQL Server 2008 also supports a standards-based programming
model integrated with the Windows DNA, making the use of SQL Server databases and
data warehouses a seamless part of building powerful and scalable systems.

 Data warehousing

SQL Server 2008 includes tools for extracting and analyzing summary data for
online analytical processing. SQL Server also includes tools for visually designing
databases and analyzing data using English-based questions.

8
CHAPTER 3
SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing the
problem and using the information to recommend improvements on the system. System
analysis is problem solving activity that requires intensive communication between the
system users and the system developers. This is an important phase of any system
development process. The system is studied in the minutest detail and analyzed.

The system analyst plays the role of an interrogator and dwells into the working
of the present system. The system is viewed as a whole and inputs to the system are
identified. Outputs from system are traced through various phases of the processing of the
inputs. The process of the system analysis is largely concerned with determining,
developing and agreeing users requirements perceived in business term. The system
analysis phase is the prime opportunity to communicate the users has conceived the join
understanding to determine the system features.

A detailed study of these processes must be made by the various techniques like
interviews, questionnaires etc. The data collected by these sources must be scrutinized to
arrive to a conclusion. The conclusion is an understanding of how the system functions.

Now this existing system is subjected to close study and the problem areas are
identified. The designer now functions as a problem solver and tries to sort out the
difficulties that the enterprise faces. The solutions are given as a proposal. The proposal
is the weighted with the existing system analytically and the best one is selected. The
proposal is presented to the user for an endorsement by the user. This is a repeating
process that ends as soon as the user is satisfied with this proposal.

9
FEASIBILITY STUDY
All projects are feasible when given unlimited resources and indefinite time. It is both
necessary and prudent to evaluate the feasibility of a project at the earliest possible time.
A feasible study is not warranted for system in which economic justification is observed,
technical risk is low, few legal problems are expected and no reasonable alternatives
exist. An alternative is made of whether the identified user needs may be satisfied using
our recent software and hardware technologies. The study will decide if the proposed
system will be cost effective, from the business point of view and it can be developed in
the existing budgetary constraints. The feasibility study should be relatively sharp and
quick. The gesture should inform the decision of whether to go ahead with a more
detailed analysis. Feasibility study may be documented as a separated report to higher
officials of the top-level management and can be included as appendices to the system
specification. Feasibility and risk analysis is detailed in many worries. If there is more
project risk then the feasibility of producing the quality software is reduced. The study is
done in three phases.

 Feasibility
 Operational Technical Feasibility
 Economical Feasibility

A. Operational Feasibility

Proposed projects are beneficial only if they can be turned into information
systems that will meet the organizations operating requirements. Simply stated, the test of
feasibility asks if the system will work when it is developed and installed. Are there any
major barriers to implementations? Is there sufficient support for the project from the
management? Are current business methods acceptable to the users? Have the users been
involved in the planning and development of the project? Will the proposed system cause
any harm?

10
The purpose of the operational feasibility study is to determine whether the new
system will be used if it is developed and installed and whether there will be resistance
from users that will be resistance from users that will undermine the possible application
benefit.

There was no difficulty in implemented the software and proposed system is so


effective, user friendly, functionally reliable so that the users in the company will find
that the new system reduces the hard steps.

B. Technical feasibility

A study of function, performances and constraints and improve the ability to


create a acceptable system. Technical feasibility is frequently the most difficult area to
achieve at the stage of product engineering process. Considering that are normally
associated with the technical feasibility includes

 Development risk
 Resource availability
 Technology

Technical feasibility study deals with the hardware as well as the software
requirements. The scope was whether the work for the project is done with the current
requirements and the existing software technology has to be examined in the feasibility
study. The outcome was found to be positive.

C. Economic feasibility

The cost evaluation is weighted against ultimate income or benefit derived from
the developed system or project. Economic justification is generally the "Button line"

11
consideration that includes cost benefit analysis, long term corporate income strategies,
impact on other profit centers or products, cost of resources needed for development and
potential market growth. When compared to the advantage obtained from implementing
the system its cost is affordable. Also the system is designed to meet the modification
required in the future. Therefore most of the modifications can be done without much re-
work.

REQUIREMENT ANALYSIS

The following steps that give the detailed information of the need of proposed
system are:

Performance: During past several decades, the records are supposed to be manually
handled for all activities. The manual handling of the record is time consuming and
highly prone to error. To improve the performance of the Organ and Blood donation
registration, the computerized system is to be undertaken. This project is fully
computerized and user friendly even that any of the members can see the report and
status of the registration and transplantation.

Efficiency: The basic need of this website is efficiency. The website should be efficient
so that whenever a new user submits his/her details the website is updated automatically.
This record will be useful for other users instantly.

Control: The complete control of the project is under the hands of authorized person who
has the password to access this project and illegal access is not supposed to deal with. All
the control is under the administrator and the other members have the rights to just seethe
records not to change any transaction or entry.

12
Security: Security is the main criteria for the proposed system since illegal access may
corrupt the database. So security has to be given in this project.

3.1 PRESENT SYSTEM

The existing system is purely manual and all are kept in different books. The
certificate issue is not in time mainly due to two reasons. People are unaware of the
documents presented during the certificate request. The second one is that the flaws made
by the hospital staff. On time issue is not possible. The difficulty is obvious as its time
consuming and tedious. The storage is and data maintenance is tough here.

It is also very difficult and time consuming to answer a specific query and
generation of reports. In manual system there are limits for security and redundancy made
by keeping same information in different registers are higher.

Also in the existing system the user has to approach several times the native
hospital office for the approval of certificates. This is very difficult to carry out. The
government has introduced some web application for easy organ and blood donation
registration. But the main problem with the website is that it fails to integrate all aspect of
organ donation registration and it is not complete.

LIMITATION OF EXISTING SYSTEM

The limitations of the existing system are :-

1. Poor reliability.
2. Time consuming.
3. Minimum Accuracy.

13
4. Chance for wrong entry.
5. Some data is repeated in more than one register. (Data redundancy)
6. Registers will be damaged.
7. It is very time consuming and difficult to search the details from different registers.
8. Report generation consumes lot of time.
9. No data security.

3.2 PROPOSED SYSTEM

The main aim of this project is to make organ donation registration procedures
convert to distributed environment. This is a user friendly system which reduces
workloads. It is propose to design a system which contains centralized database
containing all details of donors and acceptors. The Online Organ and Blood Donation
Management System is user-friendly software intended for issuing various certificate
sanctions from hospitals and doctors and is stored in a database. The system consumes
less time for submission of application forms for registering as organ donor or acceptor.
Instant reply and registration system makes OOBDMS different.

The applicant will be uniquely identified by matching entries in the centralised


database thus impostors can be avoided. Every approved registration pair of users are
stored in database along with a unique code for future reference. This code is strictly
confidential and informs the donor and acceptor through mails.

The main advantage of using this system is that the sanctions are issued at the
right place to right person at right time. Also this will help users to get their prerequisites
for registration done with ease. Also this helps a donor or acceptor to interact with the
doctors, administrators or hospitals from anywhere and ask the suggestions or queries.

14
This web based system is an ideal tool for computerizing the entire registration
process and it can be used in various sub-registrar offices. The time consuming
certificate issue can be made faster and simpler using this system and users can interact
with hospitals. The highlight of the system is that the user does not need a third person
for registration except the approval from the administrator.

Any queries can be answered in a split of second. Security features can be


enhanced in automated system. There by preventing malicious entry. These features
support the computerized system.

BENEFITS OF PROPOSED SYSTEM

The features of the proposed system are:-

1. New system automates the registration process


2. Ease of storage of data
3. Ease in certificate issue
4. Perfect identification of a person
5. Everything is backed up easily
6. Data consistency.
7. User friendliness.
8. Flexibility
9. No third person interface.

15
3.3 SOFTWARE REQUIREMENT SPECIFICATION
3.3.1 INTRODUCTION

A system requirements specification is a document where the requirements of a


system is planned to be developed are listed. Requirement analysis is a software
engineering task that brings the gap between the system and software designs.
Requirement analysis enables the system engineer to specify software functional
performance indicates software’s interface with other system elements and establishes
constraints that the software must meet. Finally requirement specification provides the
developer and the customer with the means to assess quality once the software is built.
Requirement specification places a great deal of responsibility on the system analyst,
because the point shows up later in the characteristics of the new system. Requirements
analysis is critical to the success of a project.

A main purpose of software requirement specification is the clear definition and


specification of functionality and of the software product. It allows the developer to be
carried out, performance level to be obtained and corresponding interface to be
established. The following Requirements are only the minimal requirements to run this
utility more successfully and efficiently. There should be sufficient memory and software
tools for efficient processing.

3.3.1.1 Purpose

The purpose of the document is to collect and analyze all assorted ideas that have
come up to define the system, its requirements with respect to users. Also, we shall
predict and sort out how we hope this product will be used in order to gain a better
understanding of the project, outline concepts that may be developed later, and document
ideas that are being considered, but may be discarded as the product develops.

16
In short, the purpose of this SRS document is to provide a detailed overview of
our software product, its parameters and goals. This document describes the project's
target audience and its user interface, hardware and software requirements. It defines how
our client, team and audience see the product and its functionality.

3.3.1.2 Scope
This SRS is also aimed at specifying requirements of software to be developed to
assist general hospitals, clinics and other health centers to manage the donor registration
and user maintenance. The SRS can be used as a model for defining a project specific
standard.

3.3.1.3 Reference
 DORSO
 NHS blood and transplant
 www.livingdonorsonline.org
 www.matchingdonors.com

3.3.1.4 Overview
The remaining sections of this document provide a general description, including
characteristics of the users of this project, the product's hardware, and the functional and
data requirements of the product.

3.3.2 GENERAL DESCRIPTION


The Online Organ and Blood Donation Management System is developed mainly
for general hospitals, clinics and other health centers to manage the donor registration and
user maintenance. The public can retrieve information about organ donation in this web
site. People who interested can register themselves through this system. The application
will be processed by the administrator and each donor will receive feedback about their

17
application status. Furthermore, the authorized user's account will be maintained by the
administrator.

3.3.2.1 Product Perspective


Current system uses the manual file system which is also known as a simple
database. Ledgers and logbooks are wisely used to record the information and events of
the donors .More over the current system is only for retrieving information about organ
donation and donor’s registration. The proposed system is the enhancement for the
current system. It can be a single point of access for donors, acceptors, medical staff and
administrators. The donor can be registered online just by clicking the mouse button in
front of their computer at home and save their time. The data can also be shared by other
applications and is also reusable.
3.3.2.2 Product function

This subsection contains the requirements for the online organ and blood donation
documents. These requirements are organized by the features discussed in the vision
document. Features from vision are then refined into use case diagrams and to sequence
diagram to best capture the functional requirements of the system. All these functional
requirements can be traced using tractability matrix.

3.3.2.2.1Provide personalized profiles


The system shall allow the user to register their profile.
The system shall allow the user to get a user id and password during registration.
The system shall allow donors/acceptors to select organs or blood for donation or
acceptance.
The system allows hospitals to register as a transplanting or non transplanting centre,
donor or acceptor.
The system shall allow user to update the profile information.

18
The system shall allow user to cancel the registration.

3.3.2.2.2Provide donor and acceptor support


The system shall provide online help, FAQ’s user support.
The system shall allow user to know about site and its operation.
The system shall display the customer support contact numbers on the screen.
The system shall display the online help upon request.
The system allows donors and acceptors to get medical support from registered doctors.

3.3.2.2.3Provide Search facility


The system shall enable user to enter the search text on the screen.
The system shall enable user search based on multiple search keys.
The system shall display all the matching donors based on the search.
The system shall enable user to navigate between the search results.
The system shall notify the acceptor when no matching donor is found on the search.

3.3.2.2.4Email confirmation
The system shall maintain acceptor and donor email information as a required part of user
profile.
The system shall send a request to the donor through email.
The system shall allow user to confirm the completion of registration through email.

3.3.2.2.5Statistics
The system shall display statistical table about recent transplantations, registrations etc.
The system shall enable the public to enter their reviews and ratings.

3.3.2.2.6Online promotions and public awareness


The system shall display all the available promotions to the public.
The system shall allow notification through social network sites.

19
3.3.2.3 User characteristics
The specific users for this system are:
 Public
They can either be donors or acceptors. Each member is given a user id
and password, which identifies him uniquely. The options given to each member are
registration, maintenance, find the organ to donate, registering in hospitals for blood
donation, opt for receiving notifications via email or sms, login and password function to
access the system, logout etc.

 Administrators
Each member in a donor & acceptor is given a user id and password,
which identifies him uniquely. The options given to administrator are to change
password, maintain donor and acceptor details, update donor and acceptor details, login
and password function to access the system, logout, alerts and feedback for the donors via
sms and email, generate statistic graph, generate report of donor's information etc.

 Doctors and medical staff


Medical staff includes doctors, nurses, management staff etc.The options
given to each member in a staff are login and password function to access the system,
give details about new organ and blood donor, search for donor or acceptor etc.

 Hospital Management
Each of the hospital is provided with a user id and password. Transplanting
and non transplanting centers can register in the system. Each of them are given with
options to register their hospital names in the system, access the donor and acceptor
details using the unique id numbers of the donor cards, register the transplantation details
along with the donor and acceptor details in case of each transplantation, inform

20
administrator regarding need for blood in case of emergency for alerting the registered
members.

3.3.2.4 General Constraints


This system provides web access for all the users and member functions. The user
interface will be intuitive enough so that no training is required by the users, members or
other personnel. All online transactions and the storage of confidential member
information will be done in a secure environment. Persistent storage for membership,
registrations and other private information will be maintained.

3.3.3 FUNCTIONAL REQUIREMENT


3.3.3.1Functional requirements for user profile creation

3.3.3.1.1Introduction
This screen provides an interface to input information specific to each user i.e.
donor, acceptor, medical staff, administrator or hospitals and the values are stored in the
central database server.

3.3.3.1.2Input
Each user can enter their personal details in the corresponding registration forms.
There are options with checkboxes, radio button list, textboxes etc for the user to enter
inputs. Selection and entries are done using simple keypad and mouse.

3.3.3.1.3Processing
When the user enter the inputs and click on the submit button provided in these
pages,the system responds by displaying a page containing predefined text along with the
allotted user id.It also respond through emails to the corresponding users.

21
3.3.3.1.4Output
A page containing a predefined text regarding the information given by the user is
displayed. Also email alerts will be sent to the user’s mailbox.

3.3.3.2Functional requirements for support to acceptors and donors

3.3.3.2.1Introduction
This screen provides an interface to the donors and acceptors for getting helps
related to the system. It also provides FAQ facilities to these users. It also helps in
providing a communication between the medical staff and the donors/acceptors.

3.3.3.2.2Input
The donors/acceptors can post their queries and doubts for which the answers can
be provided by the administrators or medical staff. The response can be provided as
comments or emails.

3.3.3.2.3Processing
The queries and doubts posted by the users are stored in the database and they are
displayed in the FAQ pages so that other users can post their answers.

3.3.3.2.4Output
A page containing a predefined text regarding the queries and doubts given by the
user is displayed. Also the replies or responses from other users can be displayed in the
corresponding FAQ pages.

3.3.3.3Functional requirements for searching

22
3.3.3.3.1Introduction
This screen provides an interface to the users for searching for the donors or
acceptors based on certain search keys. The searches can be filtered according to the
search keys provided by the users
3.3.3.3.2Input
The users can provide fields to filter the search results.

3.3.3.3.3Processing
The search is processed according to the search key by checking the matching
parameters.

3.3.3.3.4Output
The search result is displayed in a window according to the parameters specified
by the users.

3.3.3.4Functional requirements for emailing

3.3.3.4.1Introduction
This module provides with a provision to the administrators for sending email
alerts to the users.

3.3.3.4.2Input
The alerts can be sent online using this module.

3.3.3.4.3Processing
The emails are sent when the admin approves the requests from the users.

3.3.3.4.4Output

23
Emails are sent to the users mail id provided during completing the registration
forms.

3.3.3.5Functional requirements for promotions and public awareness

3.3.3.5.1Introduction
This module provides with a provision to the administrators for posting the
system activities in the social networking sites to create public awareness and for the
promotions.

3.3.3.5.2Input
The organ donation promotion page on facebook is accessed by clicking on the
facebook logo provided at the bottom of the site.

3.3.3.5.3Processing
The page is redirected to the facebook promotion page for the online organ and
blood donation system.

3.3.3.5.4Output
Facebook page for promoting organ and blood donation and for creating public
awareness is loaded.

3.3.4External Interface Requirement


The external interface requirement can be viewed as the environment used to
interact with the application. These includes

3.3.4.1 User interface

24
The user interface for the software shall be compatible to any browser such as Internet
Explorer, Mozilla or Netscape Navigator by which user can access to the system. The
user interface shall be implemented using any tool or software package like asp.net, c#,
css, JavaScript, html etc.

3.3.4.2 H/W interface

Processors : Intel Pentium Pro or Processor running at 133 MHz

RAM : Client Level – Minimum 512MB

Display Type : SVGA Color Monitor

Keyboard : Enhanced 104 Standard

Mouse : PS/2 2 Button

Since the application must run over the internet, all the hardware required to connect
internet will be hardware interface for the system. As for e.g. Modem, WAN – LAN,
Ethernet Cross-Cable etc.

3.3.4.3 Software Requirement

The software shall be designed to run on the following platform:

Microsoft Windows (Windows implementations shall be portable to all versions of

Windows up to and including Windows 8).

Programming Language : C# 2008


Operating System : Windows XP
Database Support : SQL Server 2008

25
3.3.5 Performance Requirement
Reliability
This deals with how reliable the application being built is. The application gives
accurate results and hence is highly reliable.
Efficiency
Every application consumes some resources if it is to perform and complete its
task. The application being built must consume as less memory as possible. However, in
cases when the Production Server is down, the application could take a little more time
than the usual.
Usability
This requirement ensures that the application is user friendly and any person with
or without operational knowledge must be able to use the application with ease. The
terminology used in this application is simple and easy to understand.
Maintainability
The use of applications generally spans over a large period of time and hence their
performance deteriorates as time progresses. Maintainability ensures that the application
must be maintainable delivering the same performance level whenever used.
Flexibility
As time progresses, the expectations from the application may change since user
requirements change with time. Hence, the application must be built in a way to adapt
new changes.

The product shall be based on web and has to be run from a web server. The product shall
take initial load time depending on internet connection strength which also depends on
the media from which the product is run. The performance shall depend upon hardware
components of the client/customer. The software will support simultaneous user access
only if there are multiple terminals. Only textual information will be handled by the
software. Amount of information to be handled can vary from user to user. For normal

26
conditions, 95% of the transactions should be processed in less than 5 seconds. All web
pages generated by the system shall be fully downloadable in no more than 10 seconds
over a 40KBps modem connection. The system shall display confirmation message to
user within 4 seconds after the user submits information to the system.

3.3.6 Design constraints


3.3.6.1Standard compliance

The system shall be built using a standard web page development tool that conforms to
Microsoft’s GUI standards. There are no memory requirements. The computers must be
equipped with web browsers such as Internet explorer. The product must be stored in
such a way that allows the client easy access to it. Response time for loading the product
should take no longer than five minutes. A general knowledge of basic computer skills is
required to use the product. There shall be consistency in variable names within the
system. The graphical user interface shall have a consistent look and feel.

27
CHAPTER 4
SYSTEM SPECIFICATION

To understand the nature of the software to be built, the software engineer must
understand the information domain of the software, as well as the required function,
performance, and interface. Requirement definition is the activity of translating
information gathered during analysis activity into a document that defines a set of
requirements. Requirement definition is the high abstract description of requirements.
Requirements may be functional or non-functional.

4.1 HARDWARE SPECIFICATION

The decision to acquire computer hardware or software must be handled in the


same way as any other business decision. The variety of sizes and types of computing
resources available puts a burden on the analyst who must select suitable hardware,
software or services and advice the top management accordingly.

Today, selecting a system is a serious and time-consuming business. The time


spent on the selection process is a function of the application and whether the system is a
basic microcomputer or a mainframe. In either case, planning system selection and
acquiring experienced help were necessary payoff in the long run.

The selection process should be viewed as a project and a project team should be
formed with the help of management.

Hardware Specification for Development, Implementation


Client Machine
Processor : Pentium4/AMDSemprone

28
RAM : 512 MB
Hard Disk : 20GB

Server machine
Processor : Core2duo/dual core/AMDAthelon
RAM : 1GB
Hard Disk : 120GB

Implementation Configuration
Client Machine
Processor :Pentium4/AMDSemprone
RAM : 512MB
Hard Disk :20GB
Device for Fingerprintcheck
Server machine
Processor :Core2duo/dual core/AMDAthelon
RAM : 1GB
Hard Disk :120GB

4.2 SOFTWARE SPECIFICATION

The software requirements explain the software components that we need to


develop our project. It is selected such a way that it reduces our work and easy to
implement the project anywhere.

Minimum Softwares Used


Operating System-Windows XP
Front End -ASP.Net
Back End -SQL
29
Browser -Mozilla 3.0

Project is done in ASP. NET with C# 2.0 as front end and SQL Server 2008 as
back end. Microsoft .NET is software that connects information, people, systems and
devices. It spans clients, servers and developer tools and consists of:
 The .NET Framework programming model that enables developers to build Web-
based applications which expose their functionality programmatically over a network
using standard protocols such as SOAP and HTTP.
 Developer tools such as Microsoft Visual Studio .NET, which provide a rapid
application integrated development environment for programming with the .NET
Framework.
 A set of servers including Microsoft Windows 2000, Microsoft SQL, Server and
Microsoft BizTalk Server that integrates, runs, operates and manages XML Web
services and applications.
 Client software such as Windows XP, Windows CE and Microsoft Office XP that
helps developers deliver a deep and compelling user experience across a family of
devices and existing products.
The .NET Framework is the programming model of the .NET environment for
building, deploying and running Web- based applications, smart client applications and
XML Web services. It manages much of the plumbing, enabling developers to focus on
writing the business logic code for their applications. The .NET Framework includes the
common language runtime and class libraries.

MICROSOFT VISUAL STUDIO


Microsoft Visual Studio is Microsoft’s flagship software development product
for computer programmers. It centers on an integrated distribution environment which
has programmers create stand alone, and web services that run on any platforms
supported by Microsoft’s .Net Framework (for all versions after 6). Supported platforms

30
include Microsoft windows, servers and workstations, Pocket PC, Smart Phones and
World Wide Web browsers not the Java Virtual Machine that all other java tools target.
VISUAL STUDIO 2010
The most important language added in this version was the introduction of
generics, which are similar in many aspects to C++ templates. This potentially increases
the number of bugs caught at compile- time instead of run- time by encouraging the use
of strict type checking in areas where it was not possible before, C++ also got a similar
upgrade with the addition of C++/CLI which is slated to replace the use of Managed
C++. Other new features of Visual Studio 2008 include the “Development Designer”
which allows application designs to be validated before deployments, an improved
environment for web publishing when combined with ASP.NET 2.0 and load testing to
see application performance under various sorts of user loads. Visual Studio 2010 also
added extensive 64- bit support.

While the development environment itself only available as a 32- bit


application, visual C++ 2010 supports compiling for (x64AMD64 and EM64T) as well as
IA- 64 (Itanium). The platforms SDK include 64- bit and 64-bit versions of the libraries.

.NET FRAMEWORK SDK


The .NET framework is an integral windows component that supports
building and running the next generation of applications and XML web services. The key
component of the .NET frame work are the common language run time and the .NET
frame work class library, which includes ADO.NET, ASP.NET and windows forms. The
.NET framework provides a managed execution environment simplified development and
deployment and integration with a wide variety of programming languages.
This framework is made up of the following parts:
 The common language runtime(CLR)
 The base class libraries.
 Object oriented internet development with ASP.NET

31
 Rich client user interface using windows forms
 RAD for the internet using web forms

OVERVIEW OF THE .NET FRAME WORK


The .NET framework is a new computing platform that simplifies application
development in the highly distributed environment of the internet. The .NET framework
is designed to fulfill following objectives:

 To provide a consistent object oriented programming environment whether object


code is stored and executed locally but internet- distributed or executed remotely.
 To provide a code execution environment that minimizes software deployment and
versioning conflicts.
 To provide a code execution environment that guarantees safe execution of code,
including code created by an unknown or semi trusted third party.
 To provide a code execution environment that eliminates the performance problem of
scripted or interpreted environments.
 To make the developer experience consistent across widely types of application, such
as windows based applications and web based applications.
 To build all communication on industry standards to ensure that code based on the
.NET framework can integrate with any other code.
The .NET framework has two main components: the common language
runtime and the .Net framework class library. The common language runtime is the
foundation of the .NET framework. You can think of the runtime as an agent that
manages code at execution time, and remoting while also enforcing strict type safely and
other forms of code accuracy that ensure security and robustness in fact the concept of
code management is a fundamental principle of the runtime.

Code that targets the runtime is known as managed code, while code that does
not target the runtime is known as unmanaged code. The class library, the other main

32
component of the .NET frameworks is a comprehensive, object-oriented collection
reusable types that you can use to develop applications ranging from traditional command
line or graphical user interface (FGUI) applications to application base d on the latest
innovations provided by ASP.NET, such as web forms and XML web services.

The .NET framework can be hosted by unmanaged component that load the
common language runtime into their processes and initiate the execution of managed
code.
ASP.NET works directly with the runtime to enable ASP.NET application and
XML web services, both of which are discussed later in this topic, Mozilla is an example
of unmanaged application that hosts the runtime (in the form of a MIME type extension).
Using mozilla to the host runtime enables you to embed managed components or
windows forms controls in HTML documents. Hosting the runtime in this way makes
mobile code similar to Microsoft Active Xr controls) possible, but with significant
improvement that only managed code can offer, such as semi-trusted execution and
secure isolated file storage.

The following illustration shows the relationship of the common language


runtime and the class library to your application and to the overall system. The
illustration also shows how managed code operated with in a larger architecture. We can
use the .NET framework to develop the following types of application and services:
 Console applications
 Window GUI application (Windows Forms) ASP.NET applications
 XML Web services
 Windows services

33
COMMON LANGUAGE RUNTIME (CLR)

The common language runtime (CLR) is responsible for runt-time services such
as language integration; security enforcement; and memory, process and thread
management. In addition, it has a roll at development time when features such as life
cycle management strong type naming, cross-language exception handling, dynamic
binding and so on, reduce the amount of code that a developer must write to turn the
business logic the reusable component. The runtime can be hosted by high performance,
server-side applications, such a s Microsoft Internet Information Services (IIS) for
building web applications with ASP.NET and the next release of Microsoft SQL Server.
This infrastructure enables you to use code “managed “ by the .NET framework to write
your business logic, while still enjoying the superior performance of the industry’s best
enterprises servers that support runtime hosting.

34
CHAPTER 5
SYSTEM DESIGN

This is the phase in which the details of the system selected in the study phase is
designed .Software design is the preliminary step and is also building block of software
engineering. The efficiency software is promoted through design phase. The design phase
begins when the requirement specification document for the software to be developed is
available. Design is the first step to moving from the problem domain to the solution
domain. Design is essentially the bridge between requirement specification and the final
solution for satisfying the requirements.

5.1 INPUT DESIGN


It is the part of the overall system design. The input methods an be broadly
classified into batch and online. Internal control must be established for monitoring
number of input and for ensuring that the data is valid. the basic step involved in the
system design are

Review input requirement.

Decide how the input data flow will be maintained.

Design the source document.

Prototype online input screens.

The quality of the system input determines the quality of the system output. Input
specification describes the manner in which data enter the system for processing. Input
design features can ensure the reliability of the system and produce results from the
accurate data, or they can result in production the input design also determines whether
the user can interact efficiently with the system.

35
Input design is the process of converting a user oriented description to a
computer based system. Input design is designed on estimating what the inputs are and
how often they are to be arranged on the input screen, how frequently the data are to be
collected etc.

The major inputs screens of administrator module are


 Add Organs
 Add blood groups
 Add places
 Add departments
 Add FAQS
 Approve users
 Manage profile
 Allotment of donors and doctors

The major inputs screens of donor module are


 Submit various application forms
 Manage user account
 Blood donation status updating
 Submit queries

The major inputs screens of acceptor module are


 Submit various application forms
 Manage user account
 Submit queries

The major input screens of medical staff module are


 Submit application forms

36
 Manage account
 Patients list updation

The major input screens of hospital module are


 Submit application forms
 Manage account
 Patient status updation
 Transplantation registration

The major input screens of public module are


 Login
 Statistics
 Report
 FAQ and enquiries

5.2 OUTPUT DESIGN

It is the part of overall system design. The goal of the output design is to capture
the output and get the data into format suitable for the computer. Data flow diagram
identifies the data tone captured and the output to the system. One of the important
features of an information system for users is the output it produces. Output is the
information delivered to the users through the information system. Without quality output
the entire system appears to be unnecessary that users will avoid using it. Users generally
merit the system solely by its output in order to create the most useful output possible.
One works closely with the user through an interactive process, until the result is
considered to be satisfactory.

37
CHAPTER 6
DETAILED DESIGN

Detailed design of a project deals with the entire functionality it handles.A well-
defined detailed description includes major functional components in that application
along with sub modules included and table handled. It shows actual data flow within the
system and how each function handles the data.

6.1Module
OOBDMS provides 5 major functionalities.
6.1.1 - Provide personalized profiles
The system shall allow the user to register their profile.Each user gets a user id
and password during registration.Donors/acceptors can select organs or blood for
donation or acceptance.Hospitals can register as a transplanting or non transplanting
centre, donor or acceptor.Each user can update the profile information.The system shall
allow user to cancel the registration.

Sub-modules
 Create profile:- The user can register from the public home page and when the admin
approves the request each of the users gets a profile created.
 Update profileThe user can update the details in the profile as and when required.
 Registration cancellation:-The user can cancel their registration when needed.

Tables used
 tlb_acceptor
 tbl_doctor
 tbl_donor

38
 tbl_hospital
 tbl_admin
 tbl_cancel
 tbl_acceptor_organ
 tbl_donor_organ
 tbl_bddnr_place
 tbl_transplant

6.1.2 User Support


User can view their details,post queries,read FAQs.Donors and doctors are
assigned to acceptors.Acceptors are also provided with priorities in case they have
donated any organ earlier.

Sub-modules
 Donor assignment:-Each of the acceptors are assigned with a doctor and a donor
depending upon the condition of the patient.
 Enquiry and help:-The users can post their queries and doubts and help facilities are
also provided.
 FAQ:-The users can read the frequently asked questions that are updated by the
administrator.
Tables used
 tbl_enquiry
 tbl_faq
 tbl_faqans
 tbl_earlydonate
 tbl_assign
 tbl_bld_donation
 tbl_reply

39
 tbl_acc_do

6.1.3 Search and selection facilities


The primary aim of this module is to provide search facilities for the users based
on various criteria.The admin can search for a user based on organ,place,blood group
etc.The basic data entries are stored in the database to provide the user with a drop down
option while specifying their requirements and details.

Sub-modules
 Organ/place/blood group based search:-The admin can search for a user based on
organ,place,blood group etc
 Place/blood group/organ selection:-The users are provided with a drop down list
option while specifying their requirements and details.

Tables used
 tbl_place
 tbl_organ
 tbl_bloodgroup
 tbl_donor
 tbl_bddnr_place
 tbl_dept
 tbl_organ_dept

6.1.4 Emails and public awareness


The system shall maintain acceptor and donor email information as a required part
of user profile and sends the user name and password to the users id during the approval.
The blood donors are also notified through emails during emergency. Public awareness
and promotions are made possible through facebook.

40
Sub-modules
 Approval notification:-The user id and password is sent to the users mail id.
 Alert for blood donors:-The blood donors are notified through emails during
emergency.

Tables used

 tbl_donor
 tbl_acceptor
 tbl_doctor
 tbl_hospital

6.1.5 Statistics and reports


This module aims at providing facilities for the users and public to view

Sub-modules

 Statistics: - The registration details are represented using a pie chart.


 Report –Total user registrations and individual registrations as donor, acceptor,
doctor or hospital is displayed as report.

Tables used

 tbl_donor
 tbl_acceptor
 tbl_hospital
 tbl_doctor

41
6.2 DATA FLOW DIAGRAMS
6.2.1 Level 0

Figure 6.2.1 Level 0

42
6.2.2 Level 1 DFD of Public

Figure 6.2.2 Level1 DFD of Public

43
6.2.3 Level 1 DFD of Administrator

Figure 6.2.3 Level 1 DFD of Administrator

44
6.2.4 Level 1 DFD for Donor

Figure 6.2.4 Level1 DFD for Donor

45
6.2.5 Level 1 DFD of Acceptor

Figure 6.2.5 Level 1 DFD of Acceptor

46
6.2.6 Level 1 DFD of Medical Staff

Figure 6.2.6 Level 2 DFD of Medical Staff

47
6.2.7 Level 1 DFD of Hospital

Figure 6.2.7 Level 1 DFD of Hospital

48
6.2.8 Level 2 DFD of Administrator

Figure 6.2.8 Level 2 DFD of Administrator

49
6.2.9 Level 2 DFD of Administrator

Figure 6.2.9 Level 2 DFD of Administrator

50
6.2.10 Level 2 DFD of Registration

Figure 6.2.10 Level 2 DFD of Registration

51
6.3 DATABASE DESIGN

6.3.1tbl_acc_do

6.3.2 tbl_assign

6.3.3tbl_bld_donation

6.3.4 tbl_bloodgroup

6.3.5 tbl_cancel

52
6.3.6 tbl_dept

6.3.7 tbl_doctor

6.3.8 tbl_organ

6.3.9 tbl_organ_dept

6.3.10 tbl_place

53
6.3.11 tbl_reply

6.3.12 tbl_transplant

6.3.13 tlb_acceptor

54
6.3.14 tlb_acceptor_organ

6.3.15 tlb_admin

6.3.16 tlb_bddnr_place

6.3.17 tlb_donor

55
6.3.18tlb_donor_organ

6.3.19 tlb_early_donate

6.3.20 tlb_enquiry

6.3.21tlb_faq

6.3.22tlb_faqans

56
6.2.23tlb_hospital

57
CHAPTER 7

TESTING

7.1 SYSTEM TESTING


System testing is a critical element of quality assurance and represents the
ultimate review of analysis, design and coding. Test case design focuses on a set of
techniques for the creation of test cases that meet overall testing objective. When a
system is developed it is hoped that it performs properly. The main purpose of testing an
information system is to find the errors and correct them. The scope of system testing
should include both manual and computerized operations. System testing is a
comprehensive evaluation of the programs, manual procedures, computer operations and
controls.

System testing is the process of checking whether the developed system is


working according to the objective and requirement. All testing is to be conducted in
accordance to the test conditions specified earlier. This will ensure that the test coverage
meets the requirements and that testing is done in a systematic manner.

7.2 TESTING PROCESS

The strategy for system testing integrates system test cases and design techniques
into a well – planned series of steps that result in the successful construction of software.
The testing must co-operate with test planning, test case design, test execution and
resultant data collection and re – evaluation. A strategy for software testing must
accommodate a low level test and that are necessary to verify that a small code segment
has correctly implemented as well as high level text that validate major system functions
against user requirements. Software testing is a critical element of software quality

58
assurance and represents the ultimate review specification, design and coding. A series of
testing is performed for the proposed system before the system is ready for acceptance
testing.

7.3 UNIT TESTING

In unit testing, different modules are tested against the specification produced
during the design of modules. Unit testing is essential for verification during the coding
phase. The aim is to test the internal logic of modules. The tests are carried out during the
programming stage itself.

7.4 INTEGRATION TESTING

Integration testing focuses on the design and construction of the software


architecture. The data can be lost across the interface or one module can cause an adverse
effect on another. The sub functions when combined may not produce the major function.
The integration testing is a systematic technique for the program structure, while at the
same conducting the test to uncover errors associated with the interface.

7.5 VALIDATION TESTING

At the culmination of integration testing, software is completely assembled as a


package; interfacing errors have been recovered and corrected and final series of a
software test – validation test begin. Validation testing can be defined in many ways but
simple definition is that validation succeeds when the software function in a manner that
can be reasonably expected by the customer.

7.6 SYSTEM TESTING

59
System testing is testing conducted on a complete, integrated system to evaluate
the system’s compliance with its specified requirements. System testing falls within
category of a Back Box testing and such as, should require no knowledge of the inner
design of the code or logic. Alpha testing and Beta Testing are sub- categories of system
testing. As a rule, system testing takes, as its input, all of the “integrated” software
components that have successfully passed the integration testing.

7. 7 WHITEBOX TESTING

White box testing, glass box testing or structural testing is used in computer
programming, software engineering and software testing to check that the outputs of a
program, given inputs, conform to the structural specification of the program. The term
White Box (glass box) indicates that the testing is done with the knowledge of the code
used to execute certain functionality. For this reason, a programmer is usually requires to
perform white box tests. Often multiple programmers will write based on certain code, so
as to gain perspectives in possible outcomes.

7.8 BLACK BOX TESTING

Black Box testing, concrete box or functional testing is used in computer


programming, software engineering and software testing to check that the outputs of a
program, given certain inputs, conform to the functional specification of the program.
The term black box indicates the internal implementation of the program being executed
is not examined by the tester.

USER ACCEPTANCE TESTING

User acceptance testing of the system is the key factor for the success of any
system. The system under consideration is tested for user acceptance by constantly in

60
touch with the perspective system at the time of development and making range
whenever required. This is done with regard to the input screen, design and the output
screen design.

SYSTEM IMPLEMENTATION

System implementation is the final phase that is putting the utility into action.
Implementation is the state in the project where theoretical design turned into working
system. The most crucial stages involve achieving a new successful system and giving
confidence in new system that it will work efficiently and effectively. The system is
implemented only after thorough checking is done and if it is working in accordance with
the specifications.

It involves careful planning, investigation of the current system and constraints on


implementation, design of methods to achieve. Two checking are done and if they are
found working according to the specification, major task of repairing the implementation
are educating, training the users.

IMPLEMENTATION PROCEDURES

The major implementation procedures are,

Test plans

Training

Equipment installation

Conversation

61
TEST PLANS

The implementation of a computer – based system requires that test data be


prepared and that the system and its elements be tested in a planned, structured manner.
The computer program component is a major sub system of the computer - based
information system, and particular attention should be given to the testing of the system
element as it is developed.

TRAINING

The purpose of the training is to ensure that all the personnel who are to be
associated with the computer – based administration system possess the necessary
knowledge skills. Operating, programming, and user personnel are trained using
reference manuals as training aids.

EQUIPMENT INSTALLATION

As the name suggests, it deals with installing the equipment. This part deals with
actually the hardware installation.

CONVERSATION

Conversation is the process of performing all of the operations that result directly
in the turn over of the new system to the user. Conversation has 2 parts ;

a. The creation of a conversation plan at the start of the development phase and the
implementation of this plan throughout the development phase.

b.The creation of a system change over plan the end of the development phase and the

62
implementation of the plan at the beginning of the operation phase.

REFINEMENT MADE OF FEEDBACK

Most popular methods of exchanging data in the IT world can be viewed from 2
perspectives; how companies format data they want to exchange and how they transmit
that. To accomplish these needs of today’s business, developers require a technology that
can be integrated across much different types of systems and that is exactly what web
services do.

63
CHAPTER 8
CONCLUSION

Online Organ and Blood Donation Management System is a web application,


which is based on administrative concept of organ donation registration. It can be used by
any medical organizations in our state. The best feature of this application is that, the
organization will get the overall view of progress of all transactions and requests that has
submitted to that particular organization, within a few mouse clicks. The system provides
a good description about various donors, acceptors, doctors and medical
staff.Administrator will have a good grip over managing and decision making. It
facilitates intercommunication between organization and public. Also it allows allotments
of donors, public awareness, registration processes etc. with less effort. Logging in to
OOBDMS at any time the admin can carefully examine the activities already submitted
and take proper corrective measures if anything goes against the plan. At the user level it
act as the most user friendly web application. Submission of various registration forms
and updations make OODBMS more convenient. Instant mailing system provides fast
acknowledgement service. In a few words OODBMS is a useful application at the
organizational level as well as in the user level. We can have the database record of all
recent transactions. There are immense possibilities for future expansion in this system.

64
CHAPTER 9
ANNEXURE

9.1 CODING

Code for Common Class


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public class OOBDMS
{
public static int flag = 0;
public static int reply = 0;
public static int count = 0;
SqlConnection con = new SqlConnection("Data Source=sherin-PC;Initial
Catalog=oobdms;Integrated Security=True");
public OOBDMS()
{ con.Open(); }
public void ExecuteCommand(string querystr)
{
SqlCommand cmd = new SqlCommand(querystr, con);
cmd.ExecuteNonQuery();

65
}
public DataTable GetDataTable(String querystr)
{
SqlDataAdapter ada = new SqlDataAdapter(querystr, con);
DataTable dt = new DataTable();
ada.Fill(dt);
return dt;
}
public void FillGridView(string querystr, GridView grid)
{
DataTable dt = GetDataTable(querystr);
grid.DataSource = dt;
grid.DataBind();
}
public void FillDetailsView(string querystr, DetailsView dts)
{
DataTable dt = GetDataTable(querystr);
dts.DataSource = dt;
dts.DataBind();
}
public void FillDataList(string querystr, DataList list)
{
DataTable dt = GetDataTable(querystr);
list.DataSource = dt;
list.DataBind();
}
public void FillDrop(DropDownList drop, string display, string valfield, string tbl)
{
string str = "select " + display + "," + valfield + " from " + tbl + "";

66
DataTable dt1 = GetDataTable(str);
drop.DataSource = dt1;
drop.DataTextField = display;
drop.DataValueField = valfield;
drop.DataBind();
drop.Items.Insert(0, "..Select..");
}
public void FillDrop(DropDownList dd1, string display, string valfield, string tbl,
string condition1)
{
string str = "select " + display + "," + valfield + " from " + tbl + " where " +
condition1 + "";
DataTable dt1 = new DataTable();
dt1 = GetDataTable(str);
dd1.DataSource = dt1;
dd1.DataTextField = display;
dd1.DataValueField = valfield;
dd1.DataBind();
dd1.Items.Insert(0, "..Select..");
}
public void FillCheck(CheckBoxList chk, string display, string valfield, string tbl)
{
string str = "select " + display + "," + valfield + " from " + tbl + "";
DataTable dt1 = GetDataTable(str);
chk.DataSource = dt1;
chk.DataTextField = display;
chk.DataValueField = valfield;
chk.DataBind();
}

67
public void FillCheck(CheckBoxList chk, string display, string valfield, string tbl,
string condition1)
{
string str = "select " + display + "," + valfield + " from " + tbl + " where " +
condition1 + "";
DataTable dt1 = new DataTable(str);
chk.DataSource = dt1;
chk.DataTextField = display;
chk.DataValueField = valfield;
chk.DataBind();
}}

Code for Login


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class public_Login : System.Web.UI.Page
{
OOBDMS login = new OOBDMS();
protected void btnlogin_Click(object sender, EventArgs e)
{
if (txtusername.Text.Substring(0, 2) == "AD")
{

68
string sel = "select *from tlb_admin where admin_userid='" + txtusername.Text +
"' and admin_password='" + txtpassword.Text + "'";
DataTable dt = login.GetDataTable(sel);
if (dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = dt.Rows[0]["admin_id"].ToString();
Response.Redirect("../admin/adminHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "DN")
{
string d_sel = "select *from tlb_donor where d_userid='" + txtusername.Text + "'
and d_password='" + txtpassword.Text + "'";
DataTable d_dt = login.GetDataTable(d_sel);
if (d_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = d_dt.Rows[0]["d_id"].ToString();
Response.Redirect("../donor/Donorhome.aspx");
}
else
{ lblmsg.Text = "Invalid Username or Password"; } }
else if (txtusername.Text.Substring(0, 2) == "AC")
{

69
string a_sel = "select *from tlb_acceptor where a_userid='" + txtusername.Text +
"' and a_password='" + txtpassword.Text + "'";
DataTable a_dt = login.GetDataTable(a_sel);
if (a_dt.Rows.Count > 0)
{
Session ["username"] = txtusername.Text;
Session["userid"] = a_dt.Rows[0]["a_id"].ToString();
Response.Redirect("../acceptor/AcceptorHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "HP")
{
string h_sel = "select *from tlb_hospital where h_userid='" + txtusername.Text +
"' and h_password='" + txtpassword.Text + "'";
DataTable h_dt = login.GetDataTable(h_sel);
if (h_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = h_dt.Rows[0]["h_id"].ToString();
Response.Redirect("../hospital/HospitalHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "MS")

70
{
string dr_sel = "select *from tbl_doctor where dr_userid='" + txtusername.Text +
"' and dr_password='" + txtpassword.Text + "'";
DataTable dr_dt = login.GetDataTable(dr_sel);
if (dr_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = dr_dt.Rows[0]["dr_id"].ToString();
Response.Redirect("../medical_staff/MedicalStaffHome.aspx");
}
else
{ lblmsg.Text = "Invalid Username or Password"; } } }}
Code for Chart
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI.DataVisualization.Charting;
using System.Drawing;
public partial class public_Chart : System.Web.UI.Page
{
OOBDMS stat = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ string str = "select * from tlb_donor where status=1";
DataTable dt = stat.GetDataTable(str);

71
int c = Convert.ToInt32(dt.Rows.Count);
string str1 = "select * from tlb_acceptor where status=1";
DataTable dt1 = stat.GetDataTable(str1);
int a = Convert.ToInt32(dt1.Rows.Count);
string str2 = "select * from tlb_hospital where status=1";
DataTable dt2 = stat.GetDataTable(str2);
int b = Convert.ToInt32(dt2.Rows.Count);
string str3 = "select * from tbl_doctor where status=1";
DataTable dt3 = stat.GetDataTable(str3);
int d = Convert.ToInt32(dt3.Rows.Count);
string[] xValues = { "Acceptor", "Hospital", "Donor", "Medical staff" };
int[] yValues = { a, b, c, d };
Chart1.Series["Testing"].Points.DataBindXY(xValues, yValues);
Chart1.Series["Testing"].Points[0].Color = Color.PaleGreen ;
Chart1.Series["Testing"].ChartType = SeriesChartType.Pie;
Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
Chart1.DataSource = dt;
Chart1.DataBind();
}}
Code for Registration Cancellation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class donor_Reg_cancellation : System.Web.UI.Page

72
{
OOBDMS reg = new OOBDMS();
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (txtuid.Text.Substring(0, 2) == "AC")
{
string a_sel = "select *from tlb_acceptor where a_userid='" + txtuid.Text + "' and
a_password='" + TextBox3.Text + "'";
DataTable dt = reg.GetDataTable(a_sel);
if (dt.Rows.Count > 0)
{
string ins = "insert into tbl_cancel(user_id,email,reason)values('" + txtuid.Text
+ "','" + TextBox4.Text + "','" + txtreason.Text + "')";
reg.ExecuteCommand(ins);
}
else
{
Label1.Text = "Invalid Username or Password";
} }
else if (txtuid.Text.Substring(0, 2) == "DN")
{
string d_sel = "select *from tlb_donor where d_userid='" + txtuid.Text + "' and
d_password='" + TextBox3.Text + "'";
DataTable d_dt = reg.GetDataTable(d_sel);
if (d_dt.Rows.Count > 0)
{
string ins = "insert into tbl_cancel(user_id,email,reason)values('" + txtuid.Text
+ "','" + TextBox4.Text + "','" + txtreason.Text + "')";
reg.ExecuteCommand(ins);

73
}
else
{
Label1.Text = "Invalid Username or Password";
} }}
Code for Donor Registration
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class public_Default2 : System.Web.UI.Page
{
OOBDMS donor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ donor.FillDrop(ddlbgroup, "bgroup_name", "bgroup_id", "tbl_bloodgroup");
} }
protected void btnsubmit_Click(object sender, EventArgs e)
{
string image = Path.GetFileName(fud.PostedFile.FileName.ToString());
if (fud.HasFile)
{
fud.SaveAs(MapPath("~/Uploads/donor/" + image));

74
string str = "";
str = "insert into
tlb_donor(assign_bit,d_name,d_address,d_age,d_gender,d_dob,d_contact,d_relative,d_rel
ationship,d_rel_contact,d_email,status,date_of_request,blood_dn_status,bgroup_id,d_cert
ificate)values(0,'" + txtname.Text + "','" + txtaddress.Text + "','" + txtage.Text + "','" +
rdbgender.SelectedValue + "','" + txtdob.Text + "'," + txtcno.Text + ",'" + txtrlname.Text
+ "','" + txtrelation.Text + "'," + txtrlcno.Text + ",'" + txtemail.Text + "',0,'" +
DateTime.Now.ToShortDateString() + "',0," + ddlbgroup.SelectedValue + ",'" + image +
"')";
donor.ExecuteCommand(str);
lblmsg.Text = "Data Saved";

donor.FillDrop(ddlbgroup, "bgroup_name", "bgroup_id", "tbl_bloodgroup");


} } }
Code for Admin Approval
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net.Mail;
public partial class admin_Default : System.Web.UI.Page
{
OOBDMS hpap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{

75
string str = "";
str = "select*from tlb_acceptor where status=0";
hpap.FillGridView(str, grdacceptor);
str = "select*from tlb_donor where status=0 order by d_id DESC";
hpap.FillGridView(str,grddonor);
str = "select*from tlb_hospital where status=0";
hpap.FillGridView(str,grdhospital);
str = "select * from tbl_doctor where status=0";
hpap.FillGridView(str, grdms);
}
private void Gethosp_apprlist()
{
string sel = "select*from tlb_hospital where status=0";
hpap.FillGridView(sel,grdhospital);
}
private void Getdonor_apprlist()
{
string sel = "select*from tlb_donor where status=0";
hpap.FillGridView(sel,grddonor); }
private void Getaccept_apprlist()
{
string sel = "select*from tlb_acceptor where status=0";
hpap.FillGridView(sel,grdacceptor);
}
private void getms_apprlist()
{
string str = "select * from tbl_doctor where status=0";
hpap.FillGridView(str, grdms);
}

76
protected void grddonor_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "Ap")
{
string Password = PrepareRandomPassword();
string uid = "DN" + e.CommandArgument.ToString();
string strupd = "update tlb_donor set status=1 ,d_userid ='" + uid
+"',d_password='" + Password +"' where d_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);

string selEmail = "select d_email from tlb_donor where


d_id="+e.CommandArgument.ToString()+"";
DataTable dtEmail = hpap.GetDataTable(selEmail);
string EmailID="";
if (dtEmail.Rows.Count > 0)
EmailID = dtEmail.Rows[0]["d_email"].ToString();
//Email Sendind Code
MailMessage mail = new MailMessage();
mail.To.Add(EmailID);
mail.From = new MailAddress("manjumathew90@gmail.com");
mail.Subject = "Registration Confirmation!!";
string Body = "Your registration OOBDMS is confirmed and your UserID and
Password is\r\nUser ID : "+uid.ToString()+"\r\nPassword : "+Password.ToString();
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";

77
smtp.Credentials=new
System.Net.NetworkCredential("manjumathew90@gmail.com", "va9809851860da");
smtp.EnableSsl = true;
smtp.Send(mail);
Getdonor_apprlist();
lblmsg.Text = "1 Donor Request Approved";
}
else if (e.CommandName == "Del")
{
string strupd = "delete from tlb_donor where d_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);
Getdonor_apprlist();
lblmsg.Text = "1 Donor Request Rejected";
}
else if (e.CommandName == "Vp")
{
Response.Redirect("../admin/Admin_donor_approval.aspx?donorID="+e.CommandArgu
ment.ToString()+"");
} }
protected void grdacceptor_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "Ap")
{
string Password = PrepareRandomPassword();
string uid = "AC" + e.CommandArgument.ToString();
string strupd = "update tlb_acceptor set status=1
,a_userid='"+uid+"',a_password='"+Password+"'where a_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);

78
string selEmail = "select a_email from tlb_acceptor where a_id=" +
e.CommandArgument.ToString() + "";
DataTable dtEmail = hpap.GetDataTable(selEmail);
string EmailID = "";
if (dtEmail.Rows.Count > 0)
EmailID = dtEmail.Rows[0]["a_email"].ToString();
//Email Sendind Code
MailMessage mail = new MailMessage();
mail.To.Add(EmailID);
mail.From = new MailAddress("manjumathew90@gmail.com");
mail.Subject = "Registration Confirmation!!";
string Body = "Your registration OOBDMS is confirmed and your UserID and
Password is<br>User ID : " + uid.ToString() + "<br>Password : " +
Password.ToString();
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new
System.Net.NetworkCredential("manjumathew90@gmail.com", "va9809851860da");
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.Send(mail);
Getaccept_apprlist();
lblmsg.Text = "1 Acceptor Request Approved";
}
else if (e.CommandName == "Del")
{
string strupd = "delete from tlb_acceptor where a_id=" + e.CommandArgument;

79
hpap.ExecuteCommand(strupd);
Getaccept_apprlist();
lblmsg.Text = "1 Acceptor Request Rejected";
}
else if (e.CommandName == "Vp")
{
Response.Redirect("../admin/Acceptorapproval.aspx?accID=" +
e.CommandArgument.ToString() + "")
} }
private string PrepareRandomPassword()
{
string allowedChars = "";
allowedChars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,";
allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,";
allowedChars += "1,2,3,4,5,6,7,8,9,0,!,@,#,$,%,&,?";
char[] sep = { ',' };
string[] arr = allowedChars.Split(sep);
string passwordString = "";
string temp = "";
Random rand = new Random();
for (int i = 0; i < Convert.ToInt32(7); i++)
{
temp = arr[rand.Next(0, arr.Length)];
passwordString += temp;
}
return passwordString;
}}
Code for Admin Donor Approval

80
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Default2 : System.Web.UI.Page
{
static int Did;
OOBDMS donorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!IsPostBack) {
try { Did = Convert.ToInt32(Request.QueryString["donorID"]); }
string str = "select* from tlb_donor where d_id=" + Did + "";
DataTable dt = donorap.GetDataTable(str);
lblname.Text = dt.Rows[0]["d_name"].ToString();
lbladdress.Text = dt.Rows[0]["d_address"].ToString();
lblage.Text = dt.Rows[0]["d_age"].ToString();
lblgender.Text = dt.Rows[0]["d_gender"].ToString();
lbldob.Text = dt.Rows[0]["d_dob"].ToString();
lblcno.Text = dt.Rows[0]["d_contact"].ToString();
lblemail.Text = dt.Rows[0]["d_email"].ToString();
lblrname.Text = dt.Rows[0]["d_relative"].ToString();
lblrelation.Text = dt.Rows[0]["d_relationship"].ToString();
lblrcno.Text = dt.Rows[0]["d_rel_contact"].ToString();
Image1.ImageUrl = "../Uploads/donor/" + dt.Rows[0]["d_certificate"].ToString();
}

81
}
protected void LinkButton1_Click(object sender, EventArgs e)
{Response.Redirect("viewimage.aspx?donorID=" + Request.QueryString["donorID"]
+ ""); }}
Code for Admin Allote
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Default : System.Web.UI.Page
{
int a;
static int aid,did;
OOBDMS al = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ al.FillDrop(DropDownList1, "dept_name", "dept_code", "tbl_dept"); }
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string str = "select * from tbl_dept where dept_code=" +
DropDownList1.SelectedValue;
DataTable dt = al.GetDataTable(str);
a = Convert.ToInt32(dt.Rows[0]["dept_id"]);

82
string sel = "select organ_name,o.organ_id from tbl_organ o,tbl_organ_dept od
where o.organ_id=od.organ_id and od.dept_id=" + a;
DataTable dt1 = al.GetDataTable(sel);
DropDownList2.DataSource = dt1;
DropDownList2.DataTextField = "organ_name";
DropDownList2.DataValueField = "organ_id";
DropDownList2.DataBind();
}
protected void btnlist_Click(object sender, EventArgs e)
{
string str ="select * from tbl_acc_do a,tbl_doctor b,tlb_acceptor c where
a.dr_id=b.dr_id and a.a_id=c.a_id and b.dept_code="+ DropDownList1.SelectedValue+"
and a_status!='NULL' and c.assign_bit=0" ;
al.FillGridView(str, GridView1);
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "Gd")
{
lblmsg.Text = "";
aid = Convert.ToInt32(e.CommandArgument);
string str="select * from tbl_dept where
dept_code="+DropDownList1.SelectedValue;
DataTable dt=al.GetDataTable(str);
a=Convert.ToInt32(dt.Rows[0]["dept_id"]);
string sel ="select * from tlb_donor donor,tlb_donor_organ
do,tbl_organ_dept od,tlb_acceptor_organ ao where donor.d_id=do.d_id and
do.organ_id=od.organ_id and ao.organ_id=do.organ_id and od.dept_id=" + a + " and

83
ao.a_id=" + e.CommandArgument + " and donor.assign_bit=0 and ao.organ_id=" +
DropDownList2.SelectedValue;
DataTable dt1 = al.GetDataTable(sel);
if (dt1.Rows.Count > 0)
{
GridView2.DataSource = dt1;
GridView2.DataBind();
}
else
{ lblmsg.Text = "No matching donors found"; } } }
protected void GridView2_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "As")
{
string upd1 = "update tlb_donor set assign_bit=1 where d_id=" +
e.CommandArgument;
al.ExecuteCommand(upd1);
string upd2 = "update tlb_acceptor set assign_bit=1 where a_id=" + aid;
al.ExecuteCommand(upd2);
string str = "select * from tbl_acc_do a,tbl_doctor b,tlb_acceptor c where
a.dr_id=b.dr_id and a.a_id=c.a_id and b.dept_code=" + DropDownList1.SelectedValue +
" and a_status!='NULL' and c.assign_bit!=1";
al.FillGridView(str, GridView1);
string sel = "select * from tlb_donor donor,tlb_donor_organ do,tbl_organ_dept
od,tlb_acceptor_organ ao where donor.d_id=do.d_id and do.organ_id=od.organ_id and
ao.organ_id=do.organ_id and od.dept_id=" + a + " and ao.a_id=" + aid + " and
donor.assign_bit!=1 and ao.organ_id=" + DropDownList2.SelectedValue;
al.FillGridView(sel, GridView2);

84
string ins = "insert into tbl_assign(a_id,d_id) values(" + aid + "," +
e.CommandArgument + ")";
al.ExecuteCommand(ins);
lblmsg.Text = "Donor assigned";
} }}
Code for Admin Assign Doctor
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Assign_doctor : System.Web.UI.Page
{
int Aid;
OOBDMS ad = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
Aid = Convert.ToInt32(Request.QueryString["accid"]);
string str = "";
str = "select * from tlb_acceptor_organ ao,tlb_acceptor a,tbl_organ o where
ao.a_id=a.a_id and ao.organ_id=o.organ_id and a.a_id=" + Aid + "";
ad.FillGridView(str, GridView1);
}
protected void Button1_Click(object sender, EventArgs e)
{

85
string ins = "insert into tbl_acc_do(a_id,dr_id) values(" + Aid + "," +
ddldoctors.SelectedValue + ")";
ad.ExecuteCommand(ins);
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "As")
{
string str = "select * from tbl_organ_dept od,tlb_acceptor_organ ao ,tbl_dept d
where od.dept_id=d.dept_id and od.organ_id=ao.organ_id and ao.ao_id=" +
Convert.ToInt32(e.CommandArgument) + "";
DataTable dt = ad.GetDataTable(str);
lbldept.Text = dt.Rows[0]["dept_name"].ToString();
string code=dt.Rows[0]["dept_code"].ToString();
string sel = "select * from tbl_doctor where dept_code='" + code + "'";
DataTable dt1= ad.GetDataTable(sel);
ddldoctors.DataSource = dt1;
ddldoctors.DataTextField = "dr_name";
ddldoctors.DataValueField = "dr_id";
ddldoctors.DataBind();
lblname.Text = "Doctor assigned";
}}}

Code for Admin_Organ Search


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

86
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Organ_dept : System.Web.UI.Page
{
OOBDMS od = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!Page.IsPostBack)
{
od.FillDrop(ddlorgan, "organ_name", "organ_id", "tbl_organ");
od.FillDrop(ddldept, "dept_name", "dept_id", "tbl_dept");
showgrd();
} }
protected void btnsave_Click(object sender, EventArgs e)
{
string str = "insert into tbl_organ_dept(dept_id,organ_id)values(" +
ddldept.SelectedValue + "," + ddlorgan.SelectedValue + ")";
od.ExecuteCommand(str);
showgrd();
}
protected void showgrd()
{
string str = "select * from tbl_organ_dept od,tbl_organ organ,tbl_dept dept where
od.dept_id=dept.dept_id and od.organ_id=organ.organ_id";
od.FillGridView(str, GridView1);
}}

Code for Admin_Place Insertion


using System;
using System.Collections.Generic;

87
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Default2 : System.Web.UI.Page
{
OOBDMS place = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ Getplacelist(); }
protected void btnsubmit_Click(object sender, EventArgs e)
{
string str = "";
if (txtplace.ToolTip != "")
{
str = "update tbl_place set p_name='" + txtplace.Text + "' where p_id=" +
txtplace.ToolTip;
txtplace.ToolTip = "";
}
else
{
str = "insert into tbl_place(p_name)values('" + txtplace.Text + "')";
txtplace.ToolTip = "";
}
place.ExecuteCommand(str);
lblmsg.Text = "Data Saved";
txtplace.Text = "";
Getplacelist();
}
private void Getplacelist()
{
string sel = "select*from tbl_place";
place.FillGridView(sel, grdplace);

}
protected void grdplace_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "Del")
{
string strdel = "delete from tbl_place where p_id=" + e.CommandArgument;
place.ExecuteCommand(strdel);

88
Getplacelist();
lblmsg.Text = "Data deleted";
}
else if (e.CommandName == "Ed")
{
string strupd = "select * from tbl_place where p_id=" + e.CommandArgument;
DataTable dt = place.GetDataTable(strupd);
if (dt.Rows.Count > 0)
{
txtplace.Text = dt.Rows[0][1].ToString();
txtplace.ToolTip = e.CommandArgument.ToString();
} } }

Code for Admin_Enquiry Reply


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Default : System.Web.UI.Page
{
static int useridp;
OOBDMS rep = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{ try { useridp =
Convert.ToInt32(Request.QueryString["userid"]); }
catch (Exception) { }
}

89
string sel = "select * from tlb_enquiry where en_id=" + useridp;
DataTable dt = rep.GetDataTable(sel);
lblname.Text = dt.Rows[0]["en_name"].ToString();
lblcno.Text = dt.Rows[0]["en_phone"].ToString();
lblemail.Text = dt.Rows[0]["en_email"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
string str = "insert into tbl_reply(en_id,re_ans)values(" + useridp + ",'" +
TextBox4.Text + "')";
rep.ExecuteCommand(str);
string str1 = "update tlb_enquiry set status=1 where en_id=" + useridp;
rep.ExecuteCommand(str1);
OOBDMS.reply = 1;
Response.Redirect("Enquiry.aspx");
}}
Code for Admin_View Certificate
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class admin_Default : System.Web.UI.Page
{
OOBDMS donorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
try
{
int Did;
Did = Convert.ToInt32(Request.QueryString["donorID"]);
string str = "select* from tlb_donor where d_id=" + Did + "";
DataTable dt = donorap.GetDataTable(str);

90
Image1.ImageUrl = "../Uploads/donor/" + dt.Rows[0]["d_certificate"].ToString();
}
catch (Exception) { }
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("Admin_donor_approval.aspx?donorID=" +
Request.QueryString["donorID"] + "");
}}

Code for Admin_View Profile


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Default : System.Web.UI.Page
{
OOBDMS admin = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ user(); }
private void user()
{
string sel = "select* from tlb_admin where admin_id=" + Session["userid"];
DataTable dt = admin.GetDataTable(sel);
lbluname.Text = dt.Rows[0]["admin_username"].ToString();
lblemail.Text = dt.Rows[0]["admin_email"].ToString();
lblcontact.Text = dt.Rows[0]["admin_contact"].ToString();
}

91
Code for Acceptor Registration 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class public_Acceptor_reg2 : System.Web.UI.Page
{
OOBDMS acceptor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!Page.IsPostBack)
{ acceptor.FillCheck(chkorgan, "organ_name", "organ_id", "tbl_organ");
acceptor.FillCheck(chkearlydonate, "organ_name", "organ_id", "tbl_organ");
txterlydn.Enabled = false;
chkearlydonate.Enabled = false;
} }
protected void btnsubmit_Click(object sender, EventArgs e)
{ if (rdb1.SelectedValue == "Yes")
{ string sel = "select*from tbl_transplant where d_userid='" + txterlydn.Text +
"'";
DataTable dt = acceptor.GetDataTable(sel);
if (dt.Rows.Count > 0)
{
string ins2 = "update tlb_acceptor set bit2=1 where a_id=" + Session["userid"];
acceptor.ExecuteCommand(ins2);

92
foreach (ListItem ch in chkorgan.Items)
{ if (ch.Selected == true)
{string ins = "insert into tlb_acceptor_organ(a_id,organ_id)values(" +
Session["userid"] + "," + ch.Value + ")";
acceptor.ExecuteCommand(ins);
} }
foreach (ListItem ch in chkearlydonate.Items)
{ if (ch.Selected == true) {
string ins1 = "insert into tlb_early_donate(a_id,organ_id,d_userid)values("
+ Session["userid"] + "," + chkearlydonate.SelectedValue + ",'" + txterlydn.Text + "')";
acceptor.ExecuteCommand(ins1);
} } }
else
{ lbldonormsg.Text = "Donor ID does not exist"; } }
else
{ string ins2 = "update tlb_acceptor set bit2=1 where a_id=" +
Session["userid"];
acceptor.ExecuteCommand(ins2);
foreach (ListItem ch in chkorgan.Items)
{ if (ch.Selected == true)
{ string ins = "insert into tlb_acceptor_organ(a_id,organ_id)values(" +
Session["userid"] + "," + ch.Value + ")";
acceptor.ExecuteCommand(ins);
} } }
OOBDMS.flag = 1;
Response.Redirect("AcceptorHome.aspx");

93
protected void rdb1_SelectedIndexChanged(object sender, EventArgs e)
{ if (rdb1.SelectedValue == "Yes") {
txterlydn.Enabled = true;
chkearlydonate.Enabled = true; }
else {
txterlydn.Enabled = false;
chkearlydonate.Enabled = false; } }
}

Code for Acceptor Home


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class acceptor_AcceptorHome : System.Web.UI.Page
{
OOBDMS acceptor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
string sel = "select* from tlb_acceptor where a_id=" + Session["userid"];
DataTable dt = acceptor.GetDataTable(sel);
Label2.Text = dt.Rows[0]["a_name"].ToString();
string sel1 = "select* from tlb_acceptor_organ where a_id=" + Session["userid"];
DataTable dt1 = acceptor.GetDataTable(sel1);
if (dt1.Rows.Count > 0)
{ HyperLink1.Visible = false; }

94
if (OOBDMS.flag == 1)
{
OOBDMS.flag = 0;
Label3.Text = "Registration completed successfully";
} }}

Code for Acceptor Edit Profile


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class acceptor_EditProfile : System.Web.UI.Page
{
OOBDMS acceptor=new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!Page.IsPostBack)
{ user(); }
}
private void user()
{
string sel = "select* from tlb_acceptor where a_id=" + Session["userid"];
DataTable dt = acceptor.GetDataTable(sel);
txtname.Text = dt.Rows[0]["a_name"].ToString();
txtaddress.Text = dt.Rows[0]["a_address"].ToString();
txtage.Text = dt.Rows[0]["a_age"].ToString();

95
txtage.Enabled = false;
txtdob.Text = dt.Rows[0]["a_dob"].ToString();
txtdob.Enabled = false;
txtcno.Text = dt.Rows[0]["a_contact"].ToString();
txtemail.Text = dt.Rows[0]["a_email"].ToString();
txtrname.Text= dt.Rows[0]["a_relative_name"].ToString();
txtrelation.Text= dt.Rows[0]["a_relation"].ToString();
txtraddress.Text= dt.Rows[0]["a_relative_addr"].ToString();
txtrcno.Text = dt.Rows[0]["a_relative_cn"].ToString();
}
protected void btnsave_Click(object sender, EventArgs e)
{
string upd = "update tlb_acceptor set a_name='" + txtname.Text + "', a_address='" +
txtaddress.Text + "', a_relative_name='" + txtrname.Text + "', a_relation='" +
txtrelation.Text + "', a_relative_addr='" + txtraddress.Text + "', a_contact=" + txtcno.Text
+ ", a_relative_cn=" + txtrcno.Text + " where a_id=" + Session["userid"];
acceptor.ExecuteCommand(upd);
lblmsg.Text = "PROFILE UPDATED";
}}

Code for Acceptor Status


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class acceptor_Status : System.Web.UI.Page

96
{
OOBDMS st = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ lbluid.Text = Session["username"].ToString(); }
protected void Button1_Click(object sender, EventArgs e)
{
if (chkstatus.Checked ==true)
{
string upd = "update tlb_acceptor set d_a=1 where a_userid=" +
Session["username"];
st.ExecuteCommand(upd);
} }}

Code for Donor Registration 2


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class accepter_Default : System.Web.UI.Page
{
OOBDMS acceptor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ user(); }
private void user()
{
string sel = "select* from tlb_acceptor where a_id=" + Session["userid"];

97
DataTable dt = acceptor.GetDataTable(sel);
lblname.Text = dt.Rows[0]["a_name"].ToString();
lbladdr.Text= dt.Rows[0]["a_address"].ToString();
lblage.Text= dt.Rows[0]["a_age"].ToString();
lbldob.Text = dt.Rows[0]["a_dob"].ToString();
lblcn.Text = dt.Rows[0]["a_contact"].ToString();
lblemail.Text = dt.Rows[0]["a_email"].ToString();
lblrlname.Text= dt.Rows[0]["a_relative_name"].ToString();
lblreln.Text = dt.Rows[0]["a_relation"].ToString();
lblrladdress.Text= dt.Rows[0]["a_relative_addr"].ToString();
lblrlcn.Text= dt.Rows[0]["a_relative_cn"].ToString();
lblgender.Text = dt.Rows[0]["a_gender"].ToString();
string sel1 = "select * from tbl_bloodgroup bd ,tlb_acceptor a where
a.bgroup_id=bd.bgroup_id and a.a_id=" + Session["userid"];
DataTable dt1 = acceptor.GetDataTable(sel1);
lblbgrp.Text = dt1.Rows[0]["bgroup_name"].ToString();
string sel2 = "select * from tlb_acceptor_organ a,tbl_organ o where
a.organ_id=o.organ_id and a.a_id=" + Session["userid"];
DataTable dt2 = acceptor.GetDataTable(sel2);
int cnt = dt2.Rows.Count;
if(cnt==1)
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
if (cnt == 2)
{
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
}
if (cnt == 3)
{

98
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorgan3.Text = dt2.Rows[2]["organ_name"].ToString();
}
if (cnt == 4)
{
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorgan3.Text = dt2.Rows[2]["organ_name"].ToString();
lblorgan4.Text = dt2.Rows[3]["organ_name"].ToString();
} }}

Code for Donor_Update Blood Donation Status


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class donor_Updateblood_Donation : System.Web.UI.Page
{
OOBDMS update = new OOBDMS();
protected void btnsave_Click(object sender, EventArgs e)
{ string str="select d_userid from tlb_donor where d_id="+Session["userid"];
DataTable dt=update.GetDataTable(str);
string str1="insert into tlb_bld_donation(d_id,donate_date,created_by)values(" +
Session["userid"] + ","+txtd_date.Text+","+dt.Rows[0]["d_name"]+")";
DataTable dt1=update.GetDataTable(str1);

99
}
}

Code for Hospital_Update User Status


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class hospital_Default : System.Web.UI.Page
{
OOBDMS status = new OOBDMS();
protected void Button1_Click(object sender, EventArgs e)
{
if (RadioButtonList1.SelectedValue == "Dead")
{
string upd = "update tlb_donor set dt_al=1 where d_userid='" + TextBox1.Text +
"'";
status.ExecuteCommand(upd);
}
else if (RadioButtonList1.SelectedValue == "BDead")
{
string upd = "update tlb_donor set dt_al=2 where d_userid='" + TextBox1.Text +
"'";
status.ExecuteCommand(upd);
}
grdshow();

100
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "del")
{
string de = "delete from tlb_donor_organ where organ_id=" +
e.CommandArgument;
status.ExecuteCommand(de);
grdshow();
} }
protected void grdshow()
{
string str = "select * from tlb_donor_organ a,tlb_donor b,tbl_organ c where
a.d_id=b.d_id and c.organ_id=a.organ_id and b.d_userid='" + TextBox1.Text + "'";
status.FillGridView(str, GridView1);
}}

Code for Hospital Transplantation


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class hospital_Hp_transplant : System.Web.UI.Page

101
{
OOBDMS tp = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
tp.FillDrop(DropDownList1,"organ_name","organ_id","tbl_organ");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string image = Path.GetFileName(fud.PostedFile.FileName.ToString());
if (fud.HasFile)
{
fud.SaveAs(MapPath("~/Uploads/donor/" + image));
string ins = "insert into
tbl_transplant(h_userid,dr_userid,d_userid,a_userid,organ_id,date_of_trnsplnt,fname)val
ues('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "'," + DropDownList1.SelectedValue + ",'" + TextBox5.Text + "','" +
image + "')";
tp.ExecuteCommand(ins);
Label1.Text = "Data saved";
} }}

Code for Medical Staff_View Acceptor Profile


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

102
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class admin_Acceptorapproval : System.Web.UI.Page
{
int Aid;
OOBDMS acceptorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
Aid = Convert.ToInt32(Request.QueryString["accID"]);
string str = "select* from tlb_acceptor a,tbl_place p,tbl_bloodgroup b where
a.p_id=p.p_id and b.bgroup_id=a.bgroup_id and a.a_id=" +Aid;
DataTable dt = acceptorap.GetDataTable(str);
Label1.Text=dt.Rows[0]["a_name"].ToString();
Label2.Text=dt.Rows[0]["a_address"].ToString();
lblplace.Text = dt.Rows[0]["p_name"].ToString();
lbl3.Text=dt.Rows[0]["a_age"].ToString();
Label4.Text=dt.Rows[0]["a_gender"].ToString();
Label5.Text=dt.Rows[0]["a_dob"].ToString();
lblbgroup.Text=dt.Rows[0]["bgroup_name"].ToString();
Image1.ImageUrl = "../uploads/acceptor/" + dt.Rows[0]["a_certificate"].ToString();
string sel2 = "select * from tlb_acceptor_organ a,tbl_organ o where
a.organ_id=o.organ_id and a.a_id=" +Aid;
DataTable dt2 = acceptorap.GetDataTable(sel2);
int cnt = dt2.Rows.Count;
if (cnt == 1)
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();

103
if (cnt == 2)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
}
if (cnt == 3)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorg3.Text = dt2.Rows[2]["organ_name"].ToString();
}
if (cnt == 4)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorg3.Text = dt2.Rows[2]["organ_name"].ToString();
lblorg4.Text = dt2.Rows[3]["organ_name"].ToString();
}

string upd = "update tbl_acc_do set last_view_date='"


+System.DateTime.Now.ToShortDateString() + "' where a_id=" + Aid+"";
acceptorap.ExecuteCommand(upd);
}
protected void LinkButton1_Click1(object sender, EventArgs e)
{
Response.Redirect("../medical_staff/Acceptor_Certificate.aspx?accID=" +
Request.QueryString["accID"] + "");
}
protected void Button1_Click(object sender, EventArgs e)

104
{
string str = "update tbl_acc_do set a_status='" + DropDownList1.SelectedValue +
"',a_date_of_req='" + TextBox1.Text + "' where a_id=" + Aid;
acceptorap.ExecuteCommand(str);
}}

Code for Medical Staff Patients List


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class medical_staff_PatientList : System.Web.UI.Page
{
OOBDMS pl = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ user(); }
protected void user()
{
string str = "select * from tlb_acceptor a,tbl_acc_do ac where a.a_id=ac.a_id and
ac.dr_id=" + Session["userid"];
pl.FillGridView(str, GridView1);
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{

105
if (e.CommandName =="Vp")
{
Response.Redirect("../medical_staff/AcceptorProfile.aspx?accID="
+e.CommandArgument.ToString()+"");
} }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
HiddenField h1 = (HiddenField)e.Row.FindControl("HiddenField1");
HiddenField h2 = (HiddenField)e.Row.FindControl("HiddenField2");
Label lbl = (Label)e.Row.FindControl("lblstatus");
if (string.IsNullOrEmpty(h1.Value))
{ lbl.Text = "Pending"; }
else
{ lbl.Text = h2.Value.ToString(); }
} }}

106
9.2 INTERFACE
9.2.1 Login Form

9.2.2 Statistics

107
9.2.3 Enquiry

9.2.4 Donor and Acceptor Registration

108
9.2.5 Hospital Registration

9.2.6 Medical Staff Registration

109
9.2.7 Registration Cancellation

9.2.8 FAQs

110
9.2.9 Change Password

111
9.2.10 Department

9.2.11 Blood Group

9.2.12 Organ

112
9.2.13 Place

9.2.14 FAQs

113
9.2.15 Organ Search

9.2.16 View Profile

9.2.17 Edit Profile

114
9.2.18 Enquiry

9.2.19 Allotment

115
9.2.20 Approval

9.2.21 User Profile View

116
9.2.22 Complete Approval

9.2.23 Assign Doctor

9.2.24 Acceptor View Profile

117
9.2.25 Edit Profile

9.2.26 Update Blood Donation Status

118
9.2.27 View Profile

9.2.28 Update User Status

119
9.2.29 Edit Profile

9.2.30 Transplantation Details

120
9.2.31 Patient List

121
REFERENCES
 ASP.NET - Complete reference by Matthew Macdonald
 Beginning ASP.NET 2.0 Databases From Novice To Professional by Damien Foggon
 An Integrated Approach To software Engineering by Pankaj Jalote
 DORSO
 NHS blood and transplant
 www.livingdonorsonline.org
 www.matchingdonors.com

122

You might also like