Sie sind auf Seite 1von 72

Distributed Web application of

An Online Library

A
Project Report
Submitted in partial Fulfillment of the requirements
For the award of PGDCA 2nd Semister

Submitted by
Soibam Roshni Devi
Roll No :18187
Registration No.:1100160045
315008H

(………………………)
(Guide)
(Designation:………………)
Certificate
This is to certify that the project report entitled “Online Library” is a
bonafide work done by Soibam Roshni Devi of PGDCA 2ndSemister and
(Roll No:-18187) in the partial fulfillment of the requirement for the
award of PGDCA 2nd Semister 2018-2019 and has carried out under my
direct supervision and guidance. This project work or a similar report
on the topic has not been submitted for any other examination and
does not form part of any other course undergone by the candidate.

To the best of my knowledge,Soibam Roshni Devi carried out the


project work with sincerity and hard work. I herey forward the project
for the partial fulfillment of the requirement for the award of the
degree in PGDCA 2nd Semister.

Date :
Place :

(Pukhrambam Vikramjit Singh)


(Sr. Software Engineer at Hadrontechs Pvt. Ltd.)
ACKNOWLEDGEMENTS

My first and foremost debt of gratitude is to Shri. P. Vikramjit Singh, Sr. Software
Engineer of Hadrontechs Pvt. Ltd for allowing me to do the project work as a partial
fulfillment for the award of PGDCA 2nd Semister and giving me an overall guidance
whenever we have interaction.

I extend my my gratitude to Shri Jugeshore Singh Coordinator of A.M.I.E.T.E


imphal center.

I cannot fully express my gratitude to all those who help me whose name have not been
mentioned, whose support moulde this project work a complete and success.
I was benefited from the intuitive explanations and implication provided by them.

Date :
Place :

(Soibam Roshni Devi)


Registration No :
1100160045
Roll No :18187
PGDCA 2nd Semister

ABSTRACT

The System “ On line Library” has been desgined and developed as a project
work in order to serve as as a partial fulfillment of the requirements for the
Award of PGDCA. It is a website developed to encounter the drawback of
manually file processing system accounting

The frontend of my project will be Microsoft asp.net 2005 with azax extension
2.0, and the backend will be Microsoft Sql 2005 . And the environment will be
Microsoft Xp service pack-2.
There will be three types of user : An Administrator, Users and Member.
The Administrator will have the privilege to control all the functionalities of this
distributed application. The Administrator can create a user and also has the
control to band the users.
An administrator and the users will have a valid account to access the application.
They will have different interface according to their role. Except the
Administrator can access all interface.
When a member wants to make an enquiry about availability of book, he/she can easily
know from the Book enquiry interface, which is public. If the desired Book is found
vacant then he/she can come to the Library and ask to borrow the book . And the user of
this application will borrow that particular book in the membership id of that member .
And the borrowed record will be stored in a RDBMS. A Member can borrow three books
by his/her merbership id. After borrowing three books the member cannot borrow further
books, until and unless he/she returns the books. The user of this application can make
enquiry for the member who borrowed the book. And can found out the particular
member who borrowed the book from the library.
So, this Dynamic web page will make Library management very easy, accurate and
time saving.

CONTENTS

1. Indroduction 1-2
1.1 Purpose 1

1.2 Objective 1

1.3 Definitions, Acronyms and Abbreviations 2

1.4 About Online Ticketing 2

2. Software Tools and Techniques 3-17

2.1 Rational unified process 3

2.2 Merits and demerits of this approach 6

2.3 Unified Modeling Language 6-7

2.4 Rational Requisite Pro 8

2.5 Rational XDE 8

2.6 .NET framework 11

2.7 ASP.NET 12

3.7.1. New in ASP.NET 12

2.8 IIS 13

2.9 SQL Server 2005 14

2.9.1. SQL Server Enterprise Manager 16-17

2.10. AJAX (Asynchronous JavaScript and XML) 17


3. System analysis and design 18-32

3.2 Need for computerization 18

3.3 Proposed system 18

3.4 Assumptions and Dependencies 19

3.5 Actor List 20

3.6 Actor Specification 20

3.7 Use Case List 21

3.8 Use Cases Diagram 23

3.8.1 Use Case Specification : View Scheme Details 24

3.8.2 Use Case Specification : View books Details 25

3.8.3 Use Case Specification : View Transaction of borrow 26


Details

3.8.4 Use Case Specification : View Transaction Manager to 28


Ticket Cancellation Details
3.8.5 Use Case Specification : Administrator edit user account.. 29

3. 8.6 Use Specification : View Passenger profile Details 31


View Staff profile Details

4. Input/output Interfaces 33- 36

4.1 Simple codes 37- 59

5. Database Design 60- 61

Conclusion 62
1

INTRODUCTION

Organization becomes dizzy when they used to process Library management


manually.
To lookup the old record manually often takes big times as well as is tiresome.
But Companies need to do work faster, with time saving and accuracy.
After digesting these problems of old way file processing system people start
doing computerization, instead .
Computerization makes the work accurate and time saving. User of the system
can easily know the old record by performing simple query of sql and can retrieve
a particular record. Also, can make new record by just click a button of the
application.

1.1 Purpose
The purpose of this Report is to collect, analyze and define high-level
needs and features of the “Online Library ”. Only the targeted features are
extracted to illustrated in details, leaving behind other less important
features by mentioning their existence only. A vision to the overall works
done to develop this system is provided by this report.
1.2 Objectives
The main objective of Developing this Dynamic web page is to encounter
the drawback of olden way of manually processing Library management
system.
When a member want to make an query about availability of book, he/she can easily
know from the Book query interface , which is public. If the desired found is found
vacant then he/she can come to the Library and ask to borrow the book. And the user of
this application will borrow that particular book in the membership id of that member.
And the borrowed record will be stored in a RDBMS. A Member can borrow three books
by his/her membership id. After borrowing three books the member cannot borrow
further
2

books , until and unless he/she returns the books. The user of this application can make
query for the member who borrowed the book. And can found out the particular member
who borrowed the book from the library.

1.3 Definitions, Acronyms and Abbreviations


ADO.NET : Active Data Object.NET
ASP.NET : Active Server Pages. NET
FTP : File Transfer Protocol
FOS : Field Officers
HTTP : Hypertext Transfer Protocol
I.D.E : Integrated Development Environment
IIS : Internet Information Server
RDBMS : Relational Database Management System
U.M.L. : Unified Modeling Language
VB.NET : Visual Basic. NET
X.D.E. : Extended Development Environment.

1.4 About Online Library


When a member wants to make query about availability of book, he/she can easily know
from the Book query interface, which is public. If the desired found is found vacant then
he/she can come to the Library and ask to borrow the book. And the user of this
application will borrow that particular book in the membership id of that member. And
the borrowed record will be stored in a RDBMS. A Member can borrow three books by
his/her membership id. After borrowing three books the member cannot borrow further
books, until and unless he/she returns the books. The user of this application can make
query for the member who borrowed the book. And can found out the particular member
who borrowed the book from the library.
Chapter 2

Software Tools and Techniques.


3

2. Software Tools and Techniques

2.1 Rational Unified Process

The Rational Unified Process in one of the Software Engineering Process


Which provides a disciplined approach to assigning tasks and responsibilities
within a development organization. It ensures for the production of high-
quality software that will certainly meet the requirements of its end-users,
within a predictable schedule and budget.

The Rational Unified Process activities create and maintain models.


Rather than focusing on the production of large amount of paper documents,
the Unified Process emphasizes the development and maintenance of
models-semantically rich representations of the software system under
development. It is a guide for how to effectively use the Unified Modeling
Language (UML). The UML is an industry-standard language that allows us
to clearly communicate requirements, architectures and designs. The UML
was originally created by Rational Software, and is now maintained by the
standards organization Object Management Group (OMG).

The Rational Unified Process provides us with the guidelines, templates


and tool mentors necessary for us to take full advantage of among others the
following best practices :

1. Develop software iteratively


2. Manage requirements
3. Use component-based architectures
4. Visually model software
5. Control changes to software.
4

Phases and Iterations- The Time Dimension

The software Lifecycle is broken into cycles, each cycle working on a new
generation of the product. The Rational Unified Process divides one development
cycle in four consecutive phases.

 Inception phase
 Elaboration phase
 Construction phase
 Transition phase

Each phase is concluded with a well-defined milestone- a point in time at which


certain critical decisions must be made, and therefore key goals must have been
achieved.

Inception Phase
Inception phase Elaboration phase Construction phae transition

During the inception phase, we establish the business case for the system and
delimit the project scope to accomplish this we must identify all external entities
with which the system will interact (actors) and define the nature of this
interaction at a high-level. This involves identifying all use cases and describing a
few significant ones. The business case includes success criteria, risk assessment,
and estimate of the resources needed, and a phase plan showing dates of major
milestones.
5

Elaboration Phase
Inception phase Elaboration phase Construction phae transition

The purpose of the elaboration phase is to analyze the problem domain, establish
a sound architectural foundation, develop the project plan, and eliminate the
highest risk elements of the project. To accomplish these objectives, we must
have the “mile wide and inch deep” view of the system. Architectural decisions
have to be made with an understanding of the whole system : its scope, major
functionality and nonfunctional requirements such as performance
requirements.

Construction Phase
Inception phase Elaboration phase Construction phae transition

During the construction phase, all remaining components and application features are
developed and integrated into the product, and all features are thoroughly tested. The
construction phase, in one sense, a manufacturing operations to optimize costs, schedules,
and quality. In this sense, the management mindset undergoes a transition from the
development of intellectual property during inception and elaboration, to the
development of deployable products during construction and transition.

Transition Phase
Inception phase Elaboration phase Construction phae transition

The purpose of the transition phase is to transition the software product to the user
community. Once the product has been given to the end user, issues usually arise that
6

require you to develop new releases, correct some problems, or finish the features that
were postponed.
2.2 MERITS AND DEMERITS OF THIS APPROACH

2.2.1 MERITS
 This approach omits the need to find all the requirements at the starting stage of
the project.
 For complex system it is not possible to collect all the requirements at the very
initial stages of project development, so this type of approach is suitable for
developing complex systems.
 It can result in superior testing because testing in each increment is expected to be
easier than testing the entire system.

2.2.2 DEMERITS
 The duration for delivering the final system will be long if the system is very
complex.
 To use the format Rational Unified Process documentation and templates, it is
necessary to buy the RUP methodology and tools, including the Rational Rose
desingn tool.
 For non-functional requirements Rational Unified Process doesn’t state clearly
how to deal with.

2.3 UML

The Unified Modeling Language (UML) uses graphical notations which makes things
easier for the analyst and developer at visualizing, specifying, constructing, and
documenting the artifacts of a software-intensive system.
7

It presents a standard way to write a system’s blueprints, together with conceptual


things like business processes and system functions as well as concrete things like
programming language statements, database schemas, and reusable software
components.
UML is a language for specifying and not a method or procedure of some king. The
UML is used to define a software system; to detail the artifacts in the system, to
document and construct- it si the language that the blueprint is written in. The UML
may be used in a wide range to support a software development methodology (such as
the Rational Unified Process) – but in itself it does not specify that methodology or
process.

UML defines the notation and semantics for the following domains :

- The User Interaction (Use Case Model) – portrays the boundary and
interaction between the system and users. The Interaction or
Communication Model describes how objects in the system will interact
with each other to get work done.
- The state or Dynamic Model – State charts describe the states or
conditions that classes assume overe time. Activity graphs describe the
workflow’s the system will implement.
- The Logical or Class Model – describes the classes and objects that will
make up the system.
- The Physical Component Model – describes the software (and sometimes
hardware componednts) that make up the system.
- The Physical Deployment Model – describes the physical architecture and
the deployment of components on that hardware architecture.

The UML also defines extension mechanisms for extending the UML to meet
specialized needs (for example Business Process Modeling extensions).
8

2.4 Rational RequisitePro

Rational RequisitePro is a supreme, user-friendly requirements management tool that aid


teams manage project requirement comprehensively, promotes communication and
collaboration among team members, and lessen project risk.

Requirements management is crucial for improving our software development


process. The better the communication and management of our requiremenets, the more
likely we are to identify the correct problem and deliver the right solution, and to do that
on time and within budget. RequisitePro helps facilitate that process.

Rational RequisitePro put forward the power of a data base and Microsoft Word. It
s vigorous architecture maintains live requirements documents that are dynamically
linked to a database for powerfull sort and query capabilities. This allowa us to easily
organize and prioritize our requirements, to trace relationships between them, and track
changes that affect then. Robust traceability features visually indicate how changes affect
the project, therby giving us the ability to perform real-time impact analysis and allowing
us to make informed decisions for scope management or resource allocation. As a result,
we are better able to manage requirement change, and our project is less likely to spiral
off course.
requisitePro captures the change history for each requirement, thereby providing a paper
audit of the evolution of project requirements.

2.5 Rational XDE.

Rational eXtended Development Environment (XDE) is a stimulating fresh technology


for designing and developing java and Microsoft .NET applications. It merges the
9

modeling power of Rational Rose with Integrated Development Environment (IDE) of a


programming tool. Rational defines XDE as “a complete visual and development
environment.” It is essentially a design tool that is obtainable directly in IDE.
Features of XDE :
With the release of the different versions of XDE, the features provided by them differ
slightly. A summery of Key features of XDE are as follows.

Cross-model references :
As an alternative of maintaining the complete design and implementation for a system in
a solitary model, we can build as many dissimilar models as we want for different pieces
of the system or to represent different perspective of the system. One model can reference
elements contained in a separate model.

System perspective :
XDE incorporates the idea of a ‘perspective’ to facilitate us to see the system from
different angles such as from customer, developer, architect, and database administrator.

Reusable Asset Specification (RAS):


Rational offers a new means to generate and share reusable components. We can create
Reusasble Asset Specification (RAS) of completed projects for those usable assets and
share them with the other project team.

Ability to build and reuse patterns :


XDE consist of a build-in pattern engine and pattern wizards that will let us gather our
existing design or code information into a reusable pattern.
10
Integrating with Leading IDEs:
XDE amalgamates directly into popular development tools such as IBM websphere
Studio and Microsoft Visual Studio .NET. The developer can employ the modeling tool
as a part of their development environment.

Synchronization of code and model:


XDE has the potential to keep to automatically observing the code and the design
synchronized. This makes the code generation and reverse engineering a simple, day-to-
day operation rather than a complex effort undertaken only when needed. We can work
on either the code or the design model, and XDE will automatically update the other.

Assisted modeling :
XDE guarantees that it is not necessary for any developer to be a UML expert to model
their system since XDE includes wizards written for specific language.

Industru-standard UML modeling at all levels of abstraction:


Since UML is an industry-standard notation for modeling systems, XDE supports Class,
Use case, Activity, Statechart, Sequence, Component, and Deploment deagrams.

Integrated use case management:


XDE combine with RequisitePro, Ratinal’s requirement management tool, allowing us to
link use case in XDE with the details of use case in the RequisitePro. It helps the design
and code that is building map back to the user’s requirements.
11
Data Modeling:
XDE includes data modeling feature that supports visualization of database design using
the UML.

2.6 .NET framework


The .NET Framework is the infrastructure for the Microsoft .Net platform.

The .Net Framework is an environment for building, deploying, and running Web
applications and Web Services.

The .NET Framework contains a common language runtime and common class
libraries – like ADO.NET, ASP.NET and Windows Forms – to provide advanced
standard services that can be integrated into a variety of computer systems.

The .NET Framework provides a feature-rich application environment, simplified


development and easy integration between a numbers of different development
languages.

The .NET Framework is language neutral. Currently it supports C++, c#, Visual
Basic, and JScrip (Microsft’s version version of JavaScript).

Microsoft’s Visual Studio .NET is a common development environment for the .NET
Framework.

.NET is actually a collection of different technologies, which includes

The .NET Class Library and Common Language Runtime are the two fundamental
parts of .NET.
12
2.7 ASP.NET
Microsoft’s ASP.NET is a server-side scripting technology that can be used to create
dynami and interactive Web applications. An ASP.NET page is an HTML page that
contains server-side scripts that are processed by a web sercer before being sent to
the user’s browser. You can combine ASP with Extensible Markup Language (XML)
and Hypertext Markup Language (HTML) to create powerful interactive Web sites.
ASP.NET coding is more “compact” than ASP code; the scripts required to perform a
given functions are shorter in ASP.NET than they are in ASP.
In othter word it is defined as ASP.NET is a part of the .NET framework which is the
platform that allows to program web application and Web Services in any .NET
language, with almost any feature from the .NET Class Library. When a client
requests a page, the ASP.NET service runs, executes code, and generates a final
HTML page to send to the client.

Since the server-side script is building a regular HTML page, it can be served to
almost any browser. An ASP.NET file can be created by using any text editing tool,
such as notepad.

2.7.1 New in ASP.NET


 Better Language support
 Programmable controls
 Event-driven programming
 XML-based components
 User authentication, with accounts and roles
 Higher scalability
 Increased performance- Compiled code
 Easier configuration and deployment
 Not fully ASP compatible
13
2.8 IIS
Internet Information server(IIS) for Microsoft Windows XP Professional brings the
power of web computing to windows. With IIS, we can easily share files and
Printers, or we can create applications to securely publish information on the web to
improve the way your organization shares information. IIS is a secure platform for
building and deploying e-commerce solutions and mission-critical applications to the
web.
Using Windows XP professional with IIS Installed, provides a personal and
development operating system that allows us to :
 Set up a personal Web server.
 Share information within your team.
 Access databases.
 Develop an enterprise intranet.
 Develop applications for the Web.

Internet Information server (IIS) is a special software that runs on the Web Service to
support mail exchange, FTP and HTTP access, and everything eslse client expect in order
to access web content.

The following figure shows how IIS handles in ASP.NET file request.

Web request
Remote Client IIS ASP.NET
Browser engine

HTML output
page

Page processing
ASPL.NET page
(.aspx file)
14
2.9 SQL Server 2005
Microsoft SQL Server is a RDBMS (Relation Database Management System)
created by Microsoft Corporation. With the emergence of the Microsoft .NET
applications and services, SQL Server stands as a prominent backbone of the data
management and analysis. One of its promising features is that it supports a superset
of the most common database language, Structured Query Language or SQL. Its
familiarity was among the organizations that need to maintain only small to mediun
size databases. But for the past 5 years its maturity ripen and its target enclose large
enterprise database. Now it is competing with other relational database products for
market segment. SQL Server is easy to manage and provides a separate OLAP
engine. It is the ideal database for Web applications witten in Asp/Asp.Net as well.
SQL Server currently runs only on the Windows operating systems.

For E-commerce and data warehousing applications Microsoft SQL Server


2000 Enterprise Edition presents a complete database and analysis platform. SQL
Server 2000 considerably reduces the time necessary to bring applications to market
while offering advanced scalability and reliability for the most demanding enterprise
environments. A comprehensive database and analysis solution, SQL Server 2000
delivers the performance, scalability, and reliability that demanding Web and
enterprise line-of-business environments requird.

Latest XML and HTTP support products make things easier for data accessing
and inter-changing, while powerful analysis capabilities enhance data value.
Enhanced availability features maximize uptime; advanced management functions
automate routine tasks, and improved programming tools and services speed
development.
15
Some of the important features of Microsoft SQL Server 2000 are :

1. Simplify the integration of back-end systems and data transfer across firewalls
using rich SQL Server 2000 XML functionality and support for other Internet
standards, such as Xpath, XSL and XSLT. Web developers can access data
using XML without relational database programming, while database
administrators can easily manipulate data in XML forma using Transact-SQL
(T-SQL) and stored procedures.
2. Connect to SQL Server 2000 databases and OLAP cubes flexibly using Web
with no additional programming. Use secure HTTP database connectivity to
ensure that data can be queried, even by novice developers, through a URL and
intuitive user interfaces.
3. Obtain results quickly using Microsoft English Query, which allows users to
pose questions in English instead of using Structured Query Language (SQL)
or Multi-dimensional Expressions (MDX). Enhanced Full-Text Search now
allows users to search unstructured data such as Microsoft Word documents,
Web pages, or Microsoft Excel spreadsheets.
4. From a data management and analysis perspective, it is critical to turn raw data
into business intelligence and take full advantage of the opportunities presented
by the Web. A complete database and data analysis package, SQL Server 22005
opens the door to the rapid development of a new generation of enterprise-class
business applications that can give your company a critical competitive
advantage.
5. Fully Web-Enabled : SQL Server 2005 provides extensive database
programming capabilities built on Web standards. Rich XML and Internet
standard support give you the ability to store and retrieve data in XML format
easily with build-in stored procedures. You can also use XML update grant to
insert, update and delete data easily.
16

6. Easy access to data through the Web , with SQL Server 2005 you can use HTTP
to send queries to the database, perform full-text search on documents stored in
database, and run queries over the Web with natural language.
7. Quick and extensible analysis services. With SQL Server 2005, you can build
end-to-end analysis solutions with integrated tools to create value from data.
Additionally, you can automatically drive business processes based on analysis
results and flexibly retrieve custom result sets from the most complex
calculations.
8. Quick development, debugging, and data transformation, SQL Server 2005
features the ability to interactively tune and debug queries, quickly move and
transform data from any source, qand define and use functions as if they were
built in to Transact-SQL. You can visually design and code database
applications from any Visual Studio tool.

2.9.1 SQL Server Enteprise Manager

SQL Server Enterprise Manager is the principal administrative tool form


Microsoft SQL Server 2005 and provides a Microsoft Management Console
(MMC) compliant user interface that allows users to :

 Define groups of server running SQL Server.


 Register individual servers in a group.
 Configure all SQL Server options for each registered Server.
 Create and administer all SQL Server databases, objects, Logins, Users,
and permissions in each registered server.

17

 Define and execute all SQL Server administrative tasks on each registered
server.
 Desing and text SQL statements, batches, and Scripts interactively by
invoking SQL Query Analyzer.
 Bring into play the various Wizards defined for SQL Server.

2.10 AJaX
(Asynchronous JavaScript and XML) using an enhancement in JavaScript that
allows Web pages to be more interactive and behave like local applications, which
are also known as “rich client” applications. AJAX allows the Web page to
retrieve small amounts of data from the server without reloading the entire page.
Prior to AJAx, any retrieval of data from the server required that the entire Web
page be refreshed in the user’s computer. As a result, systems were often
designed with less interaction; for example, to have the user submit a form only
at the end, after all fields were filled in. In contrast, AJAX systems can validate
one or two items at a time “behind the scenes” without making the session
cumbersome, especially over slow connections.
AJAX, also known as “remote scripting,” allows Web-based applications to be
designed like LAN-based applications.
Chapter 3
SYSTEM ANALYSIS AND DESIGN
18

SYSTEM ANALYSIS AND DESIGN

3.1 Need for Computerization :

Computers are becoming an indispensable gear in every field of human


civilization. There speed, accuracy and reliability are some of its main features provided
to us. Above this features the emergence of Internet enhance attraction to the common
mass. Their growth was beyond everybody’s expectation. Now, Information and

Communication technology have adopted a new medium, the cyber medium. The
ultimate positive effect is that people living at physically challenged regions are blessed
with a new boon. Now Information deficiency is decreasing with the increase of
circulation.
The application of computer to the Existing System is an important aspect as it will
increase throughput and accuracy of various jobs. Moreover this will extend the
Information Technology of the State therebyb marching a step0 forward towards the
dream of E-governance.

3.2 Proposed System :

Among the options resulted from the quest for an answer, developing a Web application
is foremost on the list. When a member want to make an enquery about availability of
book, he/she can easily know from the Book enquery interface , which is public. If the
desired found is found vacant then he/she can come to the Library and ask to borrow the
book . And the user of this application will borrow that particular book in the membership
id of that member . And the borrowed record will be stored in a RDBMS. A Member can
borrow three books by his/her merbership id. After borrowing three books the member
cannot borrow further books, until and unless he/she returns the books. The
19

user of this application can make enquery for the member who borrowed the book. And
can found out the particular member who borrowed the book from the library.

The Influence of ease of labour and better technology into the old system ignites
towards the moulding of a new system. Major focuses includes ease of tackling,
flavored with interactive interfaces. So far from the farthest vision, no hindrance will
be there in using the system once developed and implemented.

Some of the features of this Web Portal are as follows :-

3.2.1 Member Enquery for books : The member make enquery for books availability .

3.2.2 Book borrow : The user will borrow the book for the member in the id of that
particular member who intend to borrow the book.
3.2.3 User enquery the member: The user will make enquery for the member who
borrow the book.
3.2.4 Report : All the transaction, Books, borrow record etc. can be retrieve and also be
print out .

3.3 Assumptions and Dependencies

 Administrator has enough knowledge about handling computer


 User can borrow and check the member .
 Member make enquery

20
3.4 Actor List :

Sl.no Actor Description


1 Administrator Overall Administrator of the system
2 User Handles all the book management
3 Member Enquery for book

3.6. Actor Specifications :

Actor Name : Administrator


Description : He is the overall supervisor for the system. He has the privileged of
creating a new Users account or can band the User..

Actor Name : Users.


Description : He takes a main role in performing Library management. All the
management task is perform by him.

Actor Name : Member


Description : He/she simply make an enquery through this application about availability
of books.
21

3.7 Use Cases List :

Sl. No User Case No. Use case Name.


1. UC1 View Home page Details.
2. UC2 View Books Details.
3. UC3 View borrow Details .
4. UC4 Administrator creates user Account.
5. UC5 Add, edit Users.
6. UC6 View member Profile Details.
7. UC7 View user detail Details.

Packages :

Actor
hjj

Administrator. Users. Members.

Fig : 3.1 Package Actor with its contents


22

kjhk Use Case

View Home page


Details.
View Borrow
Details ..

View Users Details

View Books Details.

Add, edit, Users.


Administrator creates
user Account..

View Member Profile


Details.

Fig 3.2 Package Use Case with its contents.


23
3.8 USE CASES DIAGRAM

View Home page


Details.

Administrator
Users.
View Books Details.

Members . View Member Profile


Details..
View User Details.
View Borrow Details.
.

. Administrator Creates
Users.

Edit Users..
Fig 3.3 : Use Cases diagram

24
3.8.1 Use Case Specification : View Scheme Details

View Home page Details


Brief Description
Member make enquery, and Administrator and Users invokes this case to login
to their Interface.
Flow of Events
Basic Flow

a) All users opens the browser and provides the URL, for example http
:\\localhost/Online Library/Homepage.aspx.
b) If server is not available Alternate flow 1 follows.
c) User fills all the required information in the textbox fields and click the button to
visit in their Interface.
d) Member make books availability enquery, through the Home page Interface.
e) User borrow books and check the member..
f) Administrator create user, edit user ( Valid or Band).
g) All the transaction report can be view on the screen with the help of a crystal
report and can also be print out.
h) User log out from their Interface.
i) The use case ends.

25
Alternative Flows
Alternate flow 1 : Web Server not running.
System responds with “Web Server is currently down. Kindly try after sometime.”

Special Requirements
 Data are available on Internet.
 User has access to Internet.

Preconditions
Web Server should be up and running.

Post Conditions
Log on through the main page.

3.8.2 Use Case Specification : View Books detail


Brief Description
Members invokes the Home page through a browser and make enquery for availability
of book.

Flow of Events
Basic Flow
a) User opens the browser and provides the URL, e,g, http
://localhost/Homepage.aspx.
b) If server is not available Alternate flow 1 follows.

26

c) User log on to his interface and fill all the dropdown combos and textboxes, click
the sumit button and made a borrow transaction .
d) Administrator log on to his interface and see the Report of Borrow and Books
details, sometime creates user.
e) User log off from their interfaces.
f) The use case ends.

Alternative Flows
Alternate flow 1 : Web Server not running
System respons with “Web Server is currently down. Kindly try after Sometime.”

Special Requirements
 Data are available on internet.
 User has access to internet.

Preconditions
Web Server should be up and running.

Post Conditions
View Books Details.

3.8.3 Use Case Specification : View Borrow Details


View transaction of User borrow the books for the member details..

27
Flow of Events
Basic Flow
a) User opens the browser and provides the URL, e,g, http
://localhost/Homepage.aspx.
b) If server is not available Alternate flow 1 follows.
c) User log on to his interface for “Borrow interface ” and select the dropdown
combo and textboxes, fill the details and submit the ok button..
d) User log off from their interfaces.
e) The use case ends.

Alternative Flows
Alternate flow 1 : Web Server not running
System response with “Web Server is currently down. Kindly try after Sometime.”

Special Requirements
 Data are available on internet.
 User has access to internet.

Preconditions
Web Server should be up and running.

Post Conditions
View Transaction of Borrow Details.
.

28

3.8.4 Use Case Specification : Checking the Member details

Brief Description
User invokes this use case to check the member details.

Flow of Events
Basic Flow
a) The use case begins when the User opens the Home page.
b) If server is not available. Alternate Flow 1 follows.
c) The User enters the User Name and Password and then click Log on.
d) The system confirms the ID and Password exist. If not Alternate Flow 2
follows.
e) The Userr sees Lon on to the Booking and go to another interface namely “
Cancellation ”Interface..
f) The user cancelled by clicking the sumit button and made a enquery .
g) The User performs the function and sign-out.
h) The Use-case ends.

Alternative Flows
Alternate Flow 1 : Web server is down
a) System responds “Server currently down, Please wait for sometime”
Alternate Flow 2 : Login Fail.
a) System responds “Account doesn’t exist, please enter existing ID and Password”
b) Basic flow
c) Continues

29

Preconditions
 Web Server should be up and running.
 User should have an existing account.

Post Conditions
Acknowledgement message.
3.8.5 Use Case Specification : Administrator edit Users.

Administrator edit User


Brief Description
The Administratorr of this Dynamic Web application invokes this Use-case when he
wants to create a new User account or edit an existing account.

Flow of Events
Basic Flow
a) The Use-case begins when the Administrator opens the Home page.
b) If server is not available Alternate Flow 1 follows.
c) Administrator supplies his ID and Password.
d) The system confirms ID and Password, then directs to Administrator interface
page. If it doesn’t exist Alternate Flow 2 follows.
e) Administrator clicks the mange account among the option provided by the
System.
f) The System presents the existing Accounts in a Datagrid and provides other
facilities.

30

g) Administrator supplies User Name, Password, Type, Scheme and click create.
h) The System creates a new account. If not Alternate Flow 3 follows.
i) The Administratorr Signs-out.
j) The use case ends.

Alternative flows
Alternate Flow 1 : Web Server is down
a) System responds with “Web Server is currently down. Please try again after
sometime”.
Alternate Flow 2 : Login Fail
a). System responds “Login Fail, Please check the ID and Password”.
b). Basic fow e-continues.

Alternate Flow 3 : Account not created


a). System responds “Invalid submission, supply correct data”.
b). Basic flow h. again repeated.

Special Requirements
 The User should have Administrator Priviledge.
Preconditions
Web Server should be up and running.

Post Conditions
Acknowledgement message.

31

3.8.6 Use Specification : View Member profile Details


Brief Description
The User of this Distributed web application invokes this Use-case when he wants to
view Member details.
Flow of Events
Basic Flow
a. The Use-case begins when the User opens the Home page.
b. If server is not available Alternate Flow 1 follows.
c. User supplies his/her ID and password.
d. The system confirms ID and Password, then directs to the Interface having the
functionality to see staff details. If it doesn’t exist Alternate Flow 2 follows.
e. User supplies the ID of the staff which he want to see the details and clicks
submit.
f. The system presents the information of the staff in a Datagrid.
g. The User Sign-out.
h. The use case ends.

Alternative Flows
Alternate Flow 1 : Web Server is down.
a). System responds with “Web Server is currently down. Please try again after
somethime.”

Alternate Flow 2 : Login Fail


a). System responds “Login Fail, Please chech the ID and password”
b). Basic flow e, continues.

Alternate Flow 3 : Passenger doesn’t exist.

32

a). System responds “Passenger doesn’t exist”.


b). Basic flow h. again repeated.

Special Requirements
 The user have privileged to invoke the page.

Preconditions
Web Server should be up and running.
Post Conditions
Acknowledgement message.
Chapter 4
Input/Output Screens

33
Fig 4.1 Home page Online Library.

Fig 4.2 Book detail Interface.

34
Fig : 4.3 Borrrow Interface.

Fig : 4.4 Change password.


35

Fig : 4.5 Create Member Profile.


Fig 4.6 Edit Member Interface.

36

Fig : 4.7 View Member profile Interface.


.

Fig : 4.8 Create User profile Interface

37

SAMPLE CODES FOR FIG 4.1

Imports System.Data
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
If USERID.Text = "" And PASSWORD.Text = "" Then
msg.Text = " Invalid !"
ElseIf USERID.Text = "" Then
msg.Text = " Please enter the User id !"
ElseIf PASSWORD.Text = "" Then
msg.Text = " Please enter the Password !"
Else
msg.Text = ""
Dim mycon As New SqlClient.SqlCommand
mycon.CommandText = "select * from createuser where
user_id='" & USERID.Text & "'and Password='" & PASSWORD.Text & "' "
mycon.Connection = myconnection.connection
mycon.Connection.Open()
Dim reader As SqlClient.SqlDataReader
reader = mycon.ExecuteReader
If reader.Read Then
Session("userid") = reader(2)
Session("role") = reader(3)
Session("name") = reader(0)

If Session("role") = "admin" Then


Response.Redirect("create user.aspx")
Else
Response.Redirect("create member.aspx")
End If

Else
msg.Text = "Access Denied !"
End If

End If

End Sub

Protected Sub Button8_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
If department.SelectedIndex = 0 Then
msgs.Text = " Please select the Department !"
38

Me.GridView1.Visible = False
Else

Dim mysearch As New SqlCommand


mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
mysearch.Connection = myconnection.connection
Dim myreader As SqlClient.SqlDataReader
myconnection.connection.Open()
myreader = mysearch.ExecuteReader

If myreader.Read Then
msgs.Text = ""
Me.GridView1.Visible = True
myconnection.connection.Close()
Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
Dim ds As New DataSet
adapter.Fill(ds, "table")
Me.GridView1.DataSource = ds
Me.GridView1.DataMember = "table"
Me.GridView1.DataBind()
Else
msgs.Text = " Not available !"
Me.GridView1.Visible = False
myconnection.connection.Close()

End If

End If

End Sub
End Class

39

Imports System.Data
Imports System.Data.SqlClient
Partial Class bookdetail
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
uid.Text = Session("userid")
name.Text = Session("name")
role.Text = Session("role")
End Sub

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Dim dateofentry As String = Now.Day & "/" & Now.Month & "/" &
Now.Year

If bookcode.Text = "" And bookname.Text = "" And author.Text =


"" And quantity.SelectedIndex = 0 And department.SelectedIndex = 0 Then
msg.Text = " Invalid!"
ElseIf bookcode.Text = "" Then
msg.Text = " Bookcode cannot be blank !"
ElseIf bookname.Text = "" Then
msg.Text = "Bookname cannot be blank !"
ElseIf author.Text = "" Then
msg.Text = " Author cannot be blank !"
ElseIf quantity.SelectedIndex = 0 Then
msg.Text = " Select a quantity !"
ElseIf department.SelectedIndex = 0 Then
msg.Text = "Select a Department !"
Else

Dim myred As New SqlCommand


myred.CommandText = "select * from bookdetail where
book_code='" & bookcode.Text & "'"
myred.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = myred.ExecuteReader
If reader.Read Then
myconnection.connection.Close()
msg.Text = " Bookcode already exist, Choose another
Bookcode !"
Else
myconnection.connection.Close()

Dim mycommand As New SqlCommand


mycommand.CommandText = "insert into bookdetail values
('" & bookcode.Text & "','" & bookname.Text & "','" & author.Text &
"','" & quantity.SelectedItem.Text & "','" & quantity.SelectedItem.Text
& "','" & department.SelectedItem.Text & "','" & dateofentry & "')"
40

mycommand.Connection = myconnection.connection
myconnection.connection.Open()
mycommand.ExecuteNonQuery()
msg.Text = " Your Transaction is Successful "
myconnection.connection.Close()
End If
End If

End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
msg.Text = ""
bookcode.Text = ""
bookname.Text = ""
author.Text = ""
quantity.SelectedIndex = 0
department.SelectedIndex = 0

End Sub
End Class
41

Imports System.Data
Imports System.Data.SqlClient
Partial Class borrow
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load

uname.Text = Session("name")
uid.Text = Session("userid")
urole.Text = Session("role")
End Sub

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Dim mysel As New SqlCommand
mysel.CommandText = " select * from membership where
member_no='" & member.Text & "'"
mysel.Connection = myconnection.connection
Dim sred As SqlClient.SqlDataReader
myconnection.connection.Open()
sred = mysel.ExecuteReader
If sred.Read Then
myconnection.connection.Close()

Dim dateofborrow As String = Now.Day & "/" & Now.Month & "/"
& Now.Year
Dim mycon As New SqlCommand
mycon.CommandText = "select * from bookdetail where
book_code='" & bookcode.Text & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = mycon.ExecuteReader
If reader.Read Then

Dim mycounter As Integer


mycounter = reader.Item(3)
If reader(3) < 1 Then
msg.Text = " Already borrowed !"
Else
myconnection.connection.Close()
Dim mykon As New SqlCommand
mykon.CommandText = " insert into borrow values ('"
& member.Text & "','" & bookcode.Text & "','" & bookname.Text & "','" &
dateofborrow & "')"
mykon.Connection = myconnection.connection
myconnection.connection.Open()
mykon.ExecuteNonQuery()
42

msg.Text = " Successfully borrowed !"


myconnection.connection.Close()

myconnection.connection.Close()
Dim myupdate As New SqlCommand
myupdate.CommandText = "update bookdetail set
available ='" & (mycounter - 1) & "' where book_code='" & bookcode.Text
& "'"
myupdate.Connection = myconnection.connection
myconnection.connection.Open()
myupdate.ExecuteNonQuery()
msg.Text = " Successfully updated !"
myconnection.connection.Close()

myconnection.connection.Close()

Dim mysearch As New SqlCommand


mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
mysearch.Connection = myconnection.connection
Dim myreader As SqlClient.SqlDataReader
myconnection.connection.Open()
myreader = mysearch.ExecuteReader

myreader.Read()
msgs.Text = ""
Me.GridView1.Visible = True
myconnection.connection.Close()
Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
Dim ds As New DataSet
adapter.Fill(ds, "table")
Me.GridView1.DataSource = ds
Me.GridView1.DataMember = "table"
Me.GridView1.DataBind()

'Dim mysearch As New SqlCommand


'mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
'mysearch.Connection = myconnection.connection
'Dim myreader As SqlClient.SqlDataReader
'myconnection.connection.Open()
'myreader = mysearch.ExecuteReader
'Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
'Dim ds As New DataSet
43

End If
myconnection.connection.Close()
Else
myconnection.connection.Close()
MsgBox(" Not available !")
End If
myconnection.connection.Close()
Else
msg.Text = " Membership no. not exist!"
End If

myconnection.connection.Close()
End Sub

Protected Sub Button8_Click(ByVal sender As Object, ByVal e As


System.EventArgs)

If department.SelectedIndex = 0 Then
msgs.Text = " Please select the Department !"
Me.GridView1.Visible = False
Else

Dim mysearch As New SqlCommand


mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
mysearch.Connection = myconnection.connection
Dim myreader As SqlClient.SqlDataReader
myconnection.connection.Open()
myreader = mysearch.ExecuteReader

If myreader.Read Then
msgs.Text = ""
Me.GridView1.Visible = True
myconnection.connection.Close()
Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
Dim ds As New DataSet
adapter.Fill(ds, "table")
Me.GridView1.DataSource = ds
Me.GridView1.DataMember = "table"
Me.GridView1.DataBind()
Else
msgs.Text = " Not available !"
Me.GridView1.Visible = False
myconnection.connection.Close()

End If

End If

44

End Sub

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,


ByVal e As System.EventArgs)
GridView1.BackColor = Drawing.Color.Aqua
bookcode.Text = Me.GridView1.SelectedRow.Cells(1).Text
bookname.Text = Me.GridView1.SelectedRow.Cells(2).Text
End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
member.Text = ""
bookcode.Text = ""
bookname.Text = ""
msgs.Text = ""
msg.Text = ""
End Sub
End Class

Imports System.Data
Imports System.Data.SqlClient
Partial Class create_member
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
If IsPostBack = False Then
uid.Text = Session("USERID")
uname.Text = Session("NAME")
role.Text = Session("ROLE")

Dim i As Integer
For i = 1 To 31
td.Items.Add(i)

Next
For i = 1 To 12
tm.Items.Add(i)

Next
For i = 1940 To 2010
ty.Items.Add(i)
45

Next
End If

End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
member.Text = ""
name.Text = ""
address.Text = ""
designation.Text = ""
msg.Text = ""
td.SelectedIndex = 0
ty.SelectedIndex = 0
tm.SelectedIndex = 0
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim dateofbirth As String = td.SelectedItem.Text & "/" &
tm.SelectedItem.Text & "/" & ty.SelectedItem.Text
Dim enroldate As String = Now.Day & "/" & Now.Month & "/" &
Now.Year

If member.Text = "" And name.Text = "" And address.Text = "" And


designation.Text = "" And td.SelectedIndex = 0 And tm.SelectedIndex = 0
And ty.SelectedIndex = 0 Then
msg.Text = "Invalid submission !"
ElseIf member.Text = "" Then
msg.Text = " Membership no. cannot be blank !"
ElseIf name.Text = "" Then
msg.Text = " Name cannot be blank !"
ElseIf address.Text = "" Then
msg.Text = " Address cannot be blank !"

ElseIf td.SelectedIndex = 0 Then


msg.Text = " Please select the Day !"
ElseIf tm.SelectedIndex = 0 Then
msg.Text = " Please select the Month !"
ElseIf ty.SelectedIndex = 0 Then
msg.Text = " Please select the year !"
ElseIf designation.Text = "" Then
msg.Text = " Designation cannot be blank"
Else
Dim mycon As New SqlCommand
mycon.CommandText = "select * from membership where
member_no='" & member.Text & "' and status='" & "Y" & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = mycon.ExecuteReader
If reader.Read Then
myconnection.connection.Close()
46

msg.Text = " Memebership no. already exist!"


Else
myconnection.connection.Close()

Dim path As String = Server.MapPath("~/image/")


Me.FileUpload1.PostedFile.SaveAs(path & Me.member.Text &
Me.FileUpload1.FileName)
Dim url As String = "~/image/" & Me.member.Text &
Me.FileUpload1.FileName
Me.Image1.ImageUrl = url
Dim mycommand As New SqlCommand
mycommand.CommandText = "insert into membership values
('" & member.Text & "','" & name.Text & "','" & address.Text & "','" &
dateofbirth & "','" & designation.Text & "','" & enroldate & "','" &
Me.member.Text & Me.FileUpload1.FileName.Trim & "','" & "VALID" & "')"
mycommand.Connection = myconnection.connection
myconnection.connection.Open()
mycommand.ExecuteNonQuery()
msg.Text = "Congratulation you have created on Member !"
myconnection.connection.Close()
End If

End If
End Sub

Protected Sub Button6_Click1(ByVal sender As Object, ByVal e As


System.EventArgs)

End Sub

Protected Sub Button6_Click2(ByVal sender As Object, ByVal e As


System.EventArgs)
If search.Text = "" Then
smsg.Text = " Please Insert the Membership no. !"
Else
Dim mycon As New SqlCommand
mycon.CommandText = " select * from membership where
member_no='" & search.Text & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = mycon.ExecuteReader
If reader.Read Then
Session("mmember") = reader.Item(0)
Session("mname") = reader.Item(1)
Session("maddress") = reader.Item(2)
Session("dateofbirth") = reader.Item(3)
Session("designation") = reader.Item(4)
Session("dateofenroll") = reader.Item(5)
Session("photo") = reader.Item(6)
Session("status") = reader.Item(7)
myconnection.connection.Close()
47

Response.Redirect("viewmember.aspx")
Else
smsg.Text = " Not exist !"
myconnection.connection.Close()

End If
End If
End Sub
End Class
Imports System.Data
Imports System.Data.SqlClient

Partial Class book_detail


Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Response.Redirect("book detail.aspx")
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
If IsPostBack = False Then

UID.Text = Session("userid")
UNAME.Text = Session("name")
UROLE.Text = Session("role")
Dim i As Integer
For i = 1 To 31
td.Items.Add(i)

Next
For i = 1 To 12
tm.Items.Add(i)

Next
For i = 1940 To 2010
ty.Items.Add(i)
Next
End If
End Sub
48

Protected Sub Button4_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Response.Redirect("create member.aspx")
End Sub

Protected Sub Button5_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Response.Redirect("change password.aspx")
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Response.Redirect("borrow.aspx")
End Sub
Protected Sub Button6_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim dateofbirth As String = td.SelectedItem.Text & "/" &
tm.SelectedItem.Text & "/" & ty.SelectedItem.Text
'Dim enroldate As String = Now.Day & "/" & Now.Month & "/" &
Now.Year

If name.Text = "" And address.Text = "" And password.Text = ""


And confirm.Text = "" And td.SelectedIndex = 0 And tm.SelectedIndex = 0
And ty.SelectedIndex = 0 Then
msg.Text = "Invalid submission !"

ElseIf name.Text = "" Then


msg.Text = " Name cannot be blank !"
ElseIf address.Text = "" Then
msg.Text = " Address cannot be blank !"
ElseIf userid.Text = "" Then
msg.Text = " Userid cannot be blank !"
ElseIf password.Text = "" Then
msg.Text = " Password cannot be blank !"
ElseIf confirm.Text = "" Then
msg.Text = " Confirm your password !"
ElseIf td.SelectedIndex = 0 Then
msg.Text = " Please select the Day !"
ElseIf tm.SelectedIndex = 0 Then
msg.Text = " Please select the Month !"
ElseIf ty.SelectedIndex = 0 Then
msg.Text = " Please select the year !"
ElseIf password.Text <> confirm.Text Then
msg.Text = " Password not match !"

Else
Dim mycon As New SqlCommand
mycon.CommandText = "select * from createuser where
user_id='" & userid.Text & "' and status='" & "Y" & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
49

myconnection.connection.Open()
reader = mycon.ExecuteReader
If reader.Read Then
myconnection.connection.Close()
msg.Text = " userid already exist!"
Else
myconnection.connection.Close()

Dim path As String = Server.MapPath("~/image/")


Me.FileUpload1.PostedFile.SaveAs(path & Me.userid.Text &
Me.FileUpload1.FileName)
Dim url As String = "~/image/" & Me.userid.Text &
Me.FileUpload1.FileName
Me.Image1.ImageUrl = url
Dim mycommand As New SqlCommand
mycommand.CommandText = "insert into createuser values
('" & name.Text & "','" & address.Text & "','" & userid.Text & "','" &
"User" & "','" & password.Text & "','" & dateofbirth & "','" &
Me.userid.Text & Me.FileUpload1.FileName.Trim & "','" & "Y" & "')"
mycommand.Connection = myconnection.connection
myconnection.connection.Open()
mycommand.ExecuteNonQuery()
msg.Text = "Congratulation you have created on Member !"
myconnection.connection.Close()
End If

End If
End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
name.Text = ""
address.Text = ""
userid.Text = ""
password.Text = ""
td.SelectedIndex = 0
ty.SelectedIndex = 0
tm.SelectedIndex = 0
msg.Text = ""
End Sub

Protected Sub find_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
If uuid.Text = "" Then
msgs.Text = " Please Insert the Userid !"
Else
Dim mycon As New SqlCommand
mycon.CommandText = " select * from createuser where
user_id='" & uuid.Text & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
50

reader = mycon.ExecuteReader
If reader.Read Then
Session("name") = reader.Item(0)
Session("address") = reader.Item(1)
Session("userid") = reader.Item(2)
Session("role") = reader.Item(3)
Session("dateofbirth") = reader.Item(5)
Session("photo") = reader.Item(6)

myconnection.connection.Close()
Response.Redirect("viewuser.aspx")
Else
msgs.Text = " Not exist !"
myconnection.connection.Close()
End If
End If
End Sub
End Class

51

Imports System.Data
Imports System.Data.SqlClient
Partial Class borrow
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load

uname.Text = Session("name")
uid.Text = Session("userid")
urole.Text = Session("role")
End Sub

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Dim mysel As New SqlCommand
mysel.CommandText = " select * from membership where
member_no='" & member.Text & "'"
mysel.Connection = myconnection.connection
Dim sred As SqlClient.SqlDataReader
myconnection.connection.Open()
sred = mysel.ExecuteReader
If sred.Read Then
myconnection.connection.Close()

Dim dateofborrow As String = Now.Day & "/" & Now.Month & "/"
& Now.Year
Dim mycon As New SqlCommand
mycon.CommandText = "select * from bookdetail where
book_code='" & bookcode.Text & "'"
mycon.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = mycon.ExecuteReader
If reader.Read Then

Dim mycounter As Integer


mycounter = reader.Item(3)
If reader(3) < 1 Then
msg.Text = " Already borrowed !"
Else
myconnection.connection.Close()
Dim mykon As New SqlCommand
mykon.CommandText = " insert into borrow values ('"
& member.Text & "','" & bookcode.Text & "','" & bookname.Text & "','" &
dateofborrow & "')"
mykon.Connection = myconnection.connection
myconnection.connection.Open()
52

mykon.ExecuteNonQuery()
msg.Text = " Successfully borrowed !"
myconnection.connection.Close()

myconnection.connection.Close()
Dim myupdate As New SqlCommand
myupdate.CommandText = "update bookdetail set
available ='" & (mycounter - 1) & "' where book_code='" & bookcode.Text
& "'"
myupdate.Connection = myconnection.connection
myconnection.connection.Open()
myupdate.ExecuteNonQuery()
msg.Text = " Successfully updated !"
myconnection.connection.Close()
myconnection.connection.Close()

Dim mysearch As New SqlCommand


mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
mysearch.Connection = myconnection.connection
Dim myreader As SqlClient.SqlDataReader
myconnection.connection.Open()
myreader = mysearch.ExecuteReader

myreader.Read()
msgs.Text = ""
Me.GridView1.Visible = True
myconnection.connection.Close()
Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
Dim ds As New DataSet
adapter.Fill(ds, "table")
Me.GridView1.DataSource = ds
Me.GridView1.DataMember = "table"
Me.GridView1.DataBind()

End If

53

myconnection.connection.Close()
Else
myconnection.connection.Close()
MsgBox(" Not available !")
End If
myconnection.connection.Close()
Else
msg.Text = " Membership no. not exist!"
End If

myconnection.connection.Close()
End Sub
Protected Sub Button8_Click(ByVal sender As Object, ByVal e As
System.EventArgs)

If department.SelectedIndex = 0 Then
msgs.Text = " Please select the Department !"
Me.GridView1.Visible = False
Else

Dim mysearch As New SqlCommand


mysearch.CommandText = "select book_code 'BOOK
CODE',book_name 'BOOK NAME',author 'AUTHOR',available 'AVAILABLE',
quantity 'QUANTITY',department 'DEPARTMENT' from bookdetail where
department='" & department.SelectedItem.Text & "'"
mysearch.Connection = myconnection.connection
Dim myreader As SqlClient.SqlDataReader
myconnection.connection.Open()
myreader = mysearch.ExecuteReader

If myreader.Read Then
msgs.Text = ""
Me.GridView1.Visible = True
myconnection.connection.Close()
Dim adapter As New
SqlClient.SqlDataAdapter(mysearch.CommandText, myconnection.connection)
Dim ds As New DataSet
adapter.Fill(ds, "table")
Me.GridView1.DataSource = ds
Me.GridView1.DataMember = "table"
Me.GridView1.DataBind()
Else
msgs.Text = " Not available !"
Me.GridView1.Visible = False
myconnection.connection.Close()

End If

End If

54

End Sub

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,


ByVal e As System.EventArgs)
GridView1.BackColor = Drawing.Color.Aqua
bookcode.Text = Me.GridView1.SelectedRow.Cells(1).Text
bookname.Text = Me.GridView1.SelectedRow.Cells(2).Text
End Sub

Protected Sub Button7_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
member.Text = ""
bookcode.Text = ""
bookname.Text = ""
msgs.Text = ""
msg.Text = ""
End Sub
End Class

55

Imports System.Data

Partial Class viewuser


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load

UID.Text = Session("USERID")
UNAME.Text = Session("NAME")
UROLE.Text = Session("ROLE")
NAME.Text = Session("name")
ADDRESS.Text = Session("address")
USERID.Text = Session("userid")
ROLE.Text = Session("role")
DATEOFBIRTH.Text = Session("dateofbirth")

Dim url As String


url = Session("photo")
Me.Image1.ImageUrl = "~/image/" & url

End Sub
End Class

56

Imports System.Data
Imports System.Data.SqlClient
Partial Class bookdetail
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
uid.Text = Session("userid")
name.Text = Session("name")
role.Text = Session("role")
End Sub

Protected Sub Button6_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
Dim dateofentry As String = Now.Day & "/" & Now.Month & "/" &
Now.Year

If bookcode.Text = "" And bookname.Text = "" And author.Text =


"" And quantity.SelectedIndex = 0 And department.SelectedIndex = 0 Then
msg.Text = " Invalid!"
ElseIf bookcode.Text = "" Then
msg.Text = " Bookcode cannot be blank !"
ElseIf bookname.Text = "" Then
msg.Text = "Bookname cannot be blank !"
ElseIf author.Text = "" Then
msg.Text = " Author cannot be blank !"
ElseIf quantity.SelectedIndex = 0 Then
msg.Text = " Select a quantity !"
ElseIf department.SelectedIndex = 0 Then
msg.Text = "Select a Department !"
Else

Dim myred As New SqlCommand


myred.CommandText = "select * from bookdetail where
book_code='" & bookcode.Text & "'"
myred.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = myred.ExecuteReader
If reader.Read Then
myconnection.connection.Close()
msg.Text = " Bookcode already exist, Choose another
Bookcode !"
Else
myconnection.connection.Close()

Dim mycommand As New SqlCommand


mycommand.CommandText = "insert into bookdetail values
('" & bookcode.Text & "','" & bookname.Text & "','" & author.Text &
57

"','" & quantity.SelectedItem.Text & "','" & quantity.SelectedItem.Text


& "','" & department.SelectedItem.Text & "','" & dateofentry & "')"
mycommand.Connection = myconnection.connection
myconnection.connection.Open()
mycommand.ExecuteNonQuery()
msg.Text = " Your Transaction is Successful "
myconnection.connection.Close()
End If
End If

End Sub
Protected Sub Button7_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
msg.Text = ""
bookcode.Text = ""
bookname.Text = ""
author.Text = ""
quantity.SelectedIndex = 0
department.SelectedIndex = 0

End Sub
End Class

58

Imports System.Data
Imports System.Data.SqlClient
Partial Class editmember
Inherits System.Web.UI.Page
Public myconnection As New sql

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
If membershipno.Text = "" And condition.SelectedIndex = 0 Then
msg.Text = " Invalid !"
ElseIf membershipno.Text = "" Then
msg.Text = " Please insert the Membership no. !"
ElseIf condition.SelectedIndex = 0 Then
msg.Text = " Please select the Condition !"
Else

Dim mycom As New SqlCommand


mycom.CommandText = "select * from membership where
member_no='" & membershipno.Text & "'"
mycom.Connection = myconnection.connection
Dim reader As SqlClient.SqlDataReader
myconnection.connection.Open()
reader = mycom.ExecuteReader
If reader.Read Then
myconnection.connection.Close()

Dim update As New SqlCommand


update.CommandText = " update membership set status='" &
condition.SelectedItem.Text & "' where member_no='" & membershipno.Text
& "'"
update.Connection = myconnection.connection
myconnection.connection.Open()
update.ExecuteNonQuery()
msg.Text = " Successfully Updated !"
myconnection.connection.Close()

Else
msg.Text = " Memebership no. not exist !"
End If
End If

End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As


System.EventArgs)
msg.Text = ""
membershipno.Text = ""
condition.SelectedIndex = 0

59

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
uid.Text = Session("USERID")
UNAME.Text = Session("NAME")
UROLE.Text = Session("ROLE")
End Sub
End Class

60

5. Database Design
Fig 5.1 . Book detail Table

Fig. 5.2 Borrow table

61
fig. 5.3 . Membership Table

62
Conclusion

This Dynamic web page is to encounter the drawback of olden way of manually
processing an Library Management.
When a member want to make an enquery about availability of book, he/she can easily
know from the Book enquery interface , which is public. If the desired found is found
vacant then he/she can come to the Library and ask to borrow the book . And the user of
this application will borrow that particular book in the membership id of that member .
And the borrowed record will be stored in a RDBMS. A Member can borrow three books
by his/her merbership id. After borrowing three books the member cannot borrow further
books, until and unless he/she returns the books. The user of this application can make
enquery for the member who borrowed the book. And can found out the particular
member who borrowed the book from the library.

With the help of this distributed application Online Library will be accurate, time
saving and fast.

Das könnte Ihnen auch gefallen