library

93
Owen Trust Library Management System 1. INTRODUCTION This project entitled “OWEN TRUST LIBRARY MANAGEMENT SYSTEM” is developed for Owen Library. The main aim of the project is to transfer the manual details into a full-fledged computerized. There are number of modules in this project. They are Master Module, Transaction Module, Fine Modules and Search Module The main aim of this project is to reduce the manual work in Library processing. The system can easily maintain all Book Transaction, Amount, and Status and also maintain the entire books in library, details of books and unit. Through this project the time is saving and also the workload of the people working in the organization is reduced, much. Morning Star Polytechnic - Chunkankadai 1

Upload: velvizhi-mohanraj

Post on 22-Nov-2014

193 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Library

Owen Trust Library Management System

1. INTRODUCTION

This project entitled “OWEN TRUST LIBRARY MANAGEMENT SYSTEM” is

developed for Owen Library. The main aim of the project is to transfer the manual

details into a full-fledged computerized. There are number of modules in this project.

They are Master Module, Transaction Module, Fine Modules and Search Module

The main aim of this project is to reduce the manual work in Library

processing. The system can easily maintain all Book Transaction, Amount, and

Status and also maintain the entire books in library, details of books and unit.

Through this project the time is saving and also the workload of the people working

in the organization is reduced, much.

The details of Library process have been computerized. The next important

feature is its user friendliness and easy navigation. Flexibility of the system is also

maintained. This is a client server programming, user can easily maintain all Library

process.

This project is implemented in VB.NET as frontend and with MS Access as

backend.

Morning Star Polytechnic - Chunkankadai 1

Page 2: Library

Owen Trust Library Management System

Need for the project

The main aim of this project is to reduce the manual work of the Owen trust library.

The user can easly maintain all the details like member, book and rack. Moreover,

santa is maintained here. Also this project is developed with the main aim of

reducing the time in a cost effective manner. Also the workload of the people

working in the organization is reduced, much.

Morning Star Polytechnic - Chunkankadai 2

Page 3: Library

Owen Trust Library Management System

2. SYSTEM ANALYSIS

System Analysis is the process of gathering and interpreting facts, diagnosing

problems, and using the information to recommend improvements to the systems.

Analysis specifies what the system should do.

The first stage of software development is the study of the system under

consideration and its requirement analysis. During these stages constant interaction

with the users of the system is necessary. System analysis is the key to the life cycle.

To ensure the success of the system, careful and extensive analysis is required.

Analysis is a detailed study of various operations performed by the system. This

involves gathering information and using structured tools for analysis.

Objectives Of System Analysis:

Identify the customer’s need.

Evaluate the system concept for feasibility.

Perform economic and technical analysis.

Allocate function to hardware, software, people, database and

Other System elements.

Establish cost and schedule constraints.

Create a system definition that forms the foundation for all

Subsequent

Morning Star Polytechnic - Chunkankadai 3

Page 4: Library

Owen Trust Library Management System

System Analysis Phases of a Project

66666

Morning Star Polytechnic - Chunkankadai 4

Documentation

System improvement Objectives

Survey and

plan the

project

Repository

Study and analyze the existing system

Define and prioritize Business

Requirements

Business Requirements

Configuration phase

Design Phase

Documentation

Documentation

Project and System scope

Page 5: Library

Owen Trust Library Management System

A repository is a collection of those places where we keep all documentation

associated with the application and project.

The purpose of the survey phase is to determine the worthiness of the

project and to create a plan to complete those projects deemed worthy. To

accomplish the survey phase objectives the system analyst will work to

1.Survey problems, opportunities and solutions.

2.Negotiate the project scope.

3.Plan the project

4.Present the project

The purpose of the study phase is to answer the questions. Are the problems

really worth solving? And is a new system really worth building? To answer these

questions, the study phase thoroughly analyzes the alleged problems and

opportunities first identified in the survey phase. The system analyst will

1.Optionally, model the current system.

2.Optionally analyze business processes.

3.Analyze problems and opportunities.

4.Establish system improvement objectives and Constraints.

5. Modify project scope and the problem.

6.Present the findings and recommendations.

The purpose of the definition phase is to identify what the new system is to do

without the consideration of technology; in other words, to define the business

requirements for a new system.

Morning Star Polytechnic - Chunkankadai 5

Page 6: Library

Owen Trust Library Management System

The analysis will

1.Outline business requirements.

2.Model the business system requirements.

3.Optionally build discovery prototypes.

4.Prioritize the business system requirements.

5.Modify the project plan and scope.

Approach

Determining the user requirement is not easy. System requirement change, the

articulation of requirements is difficult and heavy user involvement and

motivations are uncertain. Problems with the user analyst interface add further

difficulties to the procedure.

There are three strategies for eliciting information regarding the users

requirements asking question, obtaining information from the present system and

prototyping .The asking strategy assumes a stable system where the user is well

informed about information requirements. In contrast, prototyping strategy is

appropriate for high uncertainty information requirement determination

Morning Star Polytechnic - Chunkankadai 6

Page 7: Library

Owen Trust Library Management System

2.1 Existing system:

The existing system is done manually with lot of works imposed on the

people. And their having no formal way of Book Issuing, Book Returning, Bill

making and storing books and details about the library, and they are maintaining all

the information put only in paper work. Suppose we need particular information, this

is very difficult to take from the file. They have to maintain all works properly. The

existing system is difficult to maintain. So there are a lot of disadvantages in the

existing system.

Disadvantages of existing system:

1.Difficult to find out currently available books.

2. No proper maintain of our assets.

3. Few confuse arise while on booking.

4. No systematic relationship between borrower and management.

5. Paper valuation is a tedious process as each and every one of the papers is

to be corrected manually.

6. There may be many mistakes while correcting the papers and calculating

the accounts.

7. It takes a lot of time to prepare daily report.

8. There occurs a chance of missing the papers and files.

9. It takes lot of time to reach the books to customer.

10. Stock maintaining is difficult.

Morning Star Polytechnic - Chunkankadai 7

Page 8: Library

Owen Trust Library Management System

2.2 Proposed System:

The proposed system is a computerized one. The details about the Library

Management Processing are kept in the server of the system. All the manual works

are computerized. We see the account from any place at any time. It generates

automatic Id number and maintains all Books immediately. It gives sufficient

information when we are asking. We can monitor all stock details every minute and

also we can see the book details, Status of the books, Type of the books available etc.

Advantages of proposed system:

1. Generate all Id number automatically.

2. All the manual work is reduced, as there is no need of staff members.

3. No chance of errors in the system

4. Measuring and calculation of the damage are accurate.

5. Results can be displayed immediately so that the user need not wait for

their results to be displayed.

6. Processing of work is very fast and the time is reduced much.

7. Store all the appropriate information to corresponding files

8. It gives sufficient information when we are asking

Morning Star Polytechnic - Chunkankadai 8

Page 9: Library

Owen Trust Library Management System

3. SYSTEM SPECIFICATION

3.1 Hardware Specification:

The hardware for the system is selected considering the factors such as CPU

processing speed, memory access speed, peripheral channel speed, printer speed, seek

time & relational delay of hard disk and communication speed etc. The hardware

specifications are as follows:

Processor Intel Pentium III

Processor Speed 600 MHz

Monitor Size 15” SVGA

RAM 64 MB

HDD 20 GB

Extra Drive 1.44” Floppy Drive

Operating System Windows 2000

Cache Memory 512 KB Level 2 Cache

Printer Laser Printer

Modem 56 KBPS

UPS 1KVA

Scanner 8.5” x 11.7” Document Size

Keyboard SAMSUNG

Mouse Logitech

3.2 Software Specification

Operating system - Windows 2000 Professional/Windows Xp

Front-End Tool - VB.Net

Back-End Tool - MS Access

Morning Star Polytechnic - Chunkankadai 9

Page 10: Library

Owen Trust Library Management System

About Sofware

.Net Framework

The .Net Framework is essentially a combination of the common language

runtime (CLR) and the standard classes that are available to .NET programmers. The

CLR is the execution environment for all programs in the .NET framework. It’s

similar in nature to the java virtual machine (JVM). The runtime classes provide

hundreds of prewritten services that clients can use as the basic building blocks for

an application.

Features of Common Language RunTime (CLR)

Consistent Programming Model

All application services are offered through a common object (OOPS).

Simplified Programming Model

There in no API(Application Programming Interface).

DLL Problems

.Net architecture removes the common problems caused by DLL versions.

Platforms

.Net application consists of managed code that can execute on any platform

that supports the .Net CLR.

Reuse of code/Language integration

.Net allows languages to be integrated with one another.

Morning Star Polytechnic - Chunkankadai 10

Page 11: Library

Owen Trust Library Management System

It is possible to create a class in C++ that derives from a class first

implemented in VB.

Types

.Net CLR verifies that all code is type safe.

Error Handling

All errors are reported as exceptions, which simplifies code maintain.

Compare to VB

VB 6.0, a programming language from Microsoft, is a popular language

because of the simplicity it offers in terms of syntax. However, it lacks the object

oriented programming approach. To overcome this drawback Microsoft in its

new .NET strategy revamped the existing VB to VB.NET.

Moreover, the VB.NET has following addition features compare to VB 6.0.

Object Oriented Programming

VB.NET allows developers to make use of object oriented features such as

classes, interfaces, inheritance and polymorphism. The main advantage of this is

code reuse. Code need no be built every time from scratch, but instead can be built

upon existing components thus saving time and effort for the developer.

Structured Error Handling

Errors are bound to occur in a program no matter how careful the developer

is during program development. Errors can be handled in VB.NET in a more

systematic and structured manner through the use of exceptions.

Multithreading

Morning Star Polytechnic - Chunkankadai 11

Page 12: Library

Owen Trust Library Management System

In a multithreading environment, each process is broken into one or more

threads. These threads when executed by the processor can sometimes cause

problems. This especially when multiple threads try to access shared data.

For example, a simple code like x=x+1 may fail if multiple threads attempt to

execute if simultaneously and x happens to be a shared variable among the threads.

This can be avoided if only the programmer manages the threads through the

program. VB.NET allows programmers to synchronize threads from within a

program which ultimately improves the performance of the program.

VB.Net Capabilities

VB.NET offers capabilities for developing the following.

Console Based Application (Notepad)

Web Application

Windows Application (GUI)

Windows Based Application (GUI)

Every windows based application has two parts

User Interface

Program

User Interface

Morning Star Polytechnic - Chunkankadai 12

Page 13: Library

Owen Trust Library Management System

A user interface is the screen through which the user interacts with the

application. Thus for any application to be successful it needs to have a good user

interface.

Program A program is a set of instructions that are used to carry out a specific task.

Console applications a created using VB.NET consists mainly of programs and no

user interface.

Class Library

Everything in the .NET framework is a class or an instance of a class. One of

the main components of the .NET framework is the Class library. Class libraries are

a collection of reusable classes or types. Some of the classes are form class, textbox

class, button class, label class, listbox class, combobox lass and checkbox class.

Form

A form is added automatically to the application when a new application is

created. When a form is added to the application, winforms created an instance of the

form class.

Controls are visual interface components that are placed on a form to create a

user interface. All controls that appear on a windows form inherit from the

usercontrol class.

Label

Morning Star Polytechnic - Chunkankadai 13

Page 14: Library

Owen Trust Library Management System

The label control contains descriptive text that is set and retrieved using the

control’s text property. It is used for designating names to the various controls on the

form.

Textbox

The Textbox control is used to get input from the user or display text to the

user. Some of the important properties of textbox are following.

Text - used to show and get the text that entered in textbox

MaxLength - used to set the maximum length in textbox

Password - used to act the textbox as password field (*****)

Button

The button control is the easiest way to allow the user to interact with an

application. The user can click the button to perform the required action.

ListBox

The ListBox control is used to display long lists of options from which the

user can choose. Each property in the list is called an item. There are two types of list

boxes supported in winforms.

Listbox

Checked Listbox

Morning Star Polytechnic - Chunkankadai 14

Page 15: Library

Owen Trust Library Management System

The difference between the listbox and the checkedlistbox is that in

checkedlistbox each list item is accompanied by a checkbox.

GetItemCheckState is an important method in checkedlistbox.

GetItemCheckState(integer)

Get particular item check state. If it is checked then it returns true otherwise

false.

Item

Item is used to retrieve the text of the particular item by using index value.

Example

Dim i

For i = 0 To CheckedListBox1.Items.Count - 1

If CheckedListBox1.GetItemCheckState(i) Then

msgbox(CheckedListBox1.Items.Item(i).ToString)

End If

Next

The above example views the item that is checked state in the checkedlistbox.

Combobox

The combobox control features of the Textbox and Listbox controls. This

control allows the user to select an item either by typing text into the combobox, or

by selecting it from the list.

By using add method we can add the items in combobox. Example

Morning Star Polytechnic - Chunkankadai 15

Page 16: Library

Owen Trust Library Management System

ComboBox1.Items.Add("car")

ComboBox1.Items.Add("bus")

ComboBox1.Items.Add("train")

Timer

The timer control is a component that raises an event at regular intervals. It is

like a clock that keeps on ticking at specified intervals and it raises an event.

Interval is a property represents the time period, in milliseconds between

each timer ticks.

Start and Stop methods are used to start and stop the timer tick event

respectively.

Tick is an event that triggered when the specified timer interval has elapsed

and the timer is enabled.

Scrollbars

There are two types of Scrollbars supported in winforms. They

HscrollBar

VscrollBar

Hscrollbar indicates the Horizontal scrollbar and Vscrollbar indicates the

Vertical Hscrollbar.

Morning Star Polytechnic - Chunkankadai 16

Page 17: Library

Owen Trust Library Management System

ProgressBar

The progress bar control is used to indicate the progress of an action. It

displays an appropriate number of rectangles arranged in a horizontal bar. When the

action is complete the bar gets filled.

ToolTip

The ToolTip control is used to display text when the mouse moves over a

particular control. For example, the ToolTip control can be used to display the

function of a button when the mouse is on that button.

About Access

Microsoft Access:

Using Microsoft access, we can manage all the information from a single

database file. Within the file, the data is divided into separate storage containers

called tables.

Tables

A table is a collection of data about specific topic such as registration etc.

using a separate table for each means; you can store the data only once, which makes

the database more efficient. A common field relates two tables so that Ms Access can

bring together the data from the table for viewing, editing or printing.

Queries

Morning Star Polytechnic - Chunkankadai 17

Page 18: Library

Owen Trust Library Management System

Queries are used to view, change & analyze data on different ways. It can be

used as the source of records for forms, reports and data access pages. An SQL query

is a query you create by using an SQL Statement. We can use Structured Query

Language (SQL) to query, update, and manage relational databases such as

Microsoft Access.

When we create a query in query design view, Access constructs the equivalent SQL

statements behind the scenes for you. In fact, most query properties in the property

sheet in query Design view have equivalent clauses and options available in SQL

view. If we want, to view or edit the SQL statements in SQL view. However, after

we make changes to a query in SQL view, the query might not be displayed the way

it was previously in Design view.

Some SQL queries, called SQL specific queries, can't be created in the design grid.

For pass through, data definition, and union queries, we must create the SQL

statements directly in SQL view. For sub queries, you enter the SQL in the Field row

or the Criteria row of the query design grid.

Forms:

A form is a type of a database object that is primarily used to enter or display

data in a database. You can also use a form as a switchboard that opens other forms

and reports in the database, or as a custom dialog box that accepts user input and

carries out an action based on the input.  Most forms are bound to one or more tables

and queries in the database. A form's record source refers to the fields in the

underlying tables and queries. A form need not contain all the fields from each of the

tables or queries that it is based on. A bound form stores or retrieves data from its

Morning Star Polytechnic - Chunkankadai 18

Page 19: Library

Owen Trust Library Management System

underlying record source. Other information on the form, such as the title, date, and

page number, is stored in the form's design.

Reports

A report is an effective way to present your data in a printed format. Because

we can control over the size and appearance of everything on a report, we can

display the information the way we want to see it.  Most reports are bound to one or

more table and query in the database. A report's record source refers to the fields in

the underlying tables and queries. A report need not contain all the fields from each

of the tables or queries that it is based on.

Morning Star Polytechnic - Chunkankadai 19

Page 20: Library

Owen Trust Library Management System

4. TESTING

“No man is perfect ”said a philosopher. Every human being is born with

certain imperfections and has to struggle to make himself performance “God Has

made the world imperfectly”, said a student of his guru, and he replied “Only to be

made perfect by you”. This is the case not with the human alone also with the system

he has designed.

The software, which has been developed, has to be tested to prove its

validity. Testing is considered to be the least creative phase of the least creative

phase of the whole cycle of system design. In the real sense it is the phase, which

helps to bring out the creativity of the other phases makes it shine.

TYPES OF TESTING DONE

Testing forms a core part of any project. There are various types of testing are

there. In this system we are done following testing

- White Box testing

- Black Box testing

- Unit Testing

- Integration Testing

- User Interface Testing

Morning Star Polytechnic - Chunkankadai 20

Page 21: Library

Owen Trust Library Management System

4.1 WHITE BOX TESTING

White-box testing, sometimes called glass-box, is a test case design method

that uses the control structure of the procedural design to derive test cases. Using

White Box testing methods, we can derive test cases that

(1) guarantee that all independent paths within a module have been

exercised at

least once

(2) Exercise all logical decisions on their true and false sides

(3) Execute all loops at their boundaries and within their operational bounds

and

(4) Exercise internal data structures to assure their validity.

4.2 BLACK BOX TESTING

Black Box testing focuses on the functional requirements of the software.

That is, black box testing enables the software engineer to derive sets of input

conditions that will fully exercise all functional requirements for a program. Black

box testing is not an alternative to White Box testing. Rather it is a complementary

approach that is likely to uncover a different class of errors than White Box methods.

Black Box testing attempts to find errors in the following categories

1. Incorrect or missing functions

2. Interface errors

3. Errors in data structures or external data base access

4. Performance errors

5. Initialization and Termination errors

Unlike White-Box testing, which is performed early on the testing process black-

box testing tends to be applied during later stages of testing because black-box

Morning Star Polytechnic - Chunkankadai 21

Page 22: Library

Owen Trust Library Management System

testing which is purposely disregards control structures attention is focused on the

information domain.

4.3 UNIT TESTING:

Unit testing focuses verification effort on the smallest unit of software

design-the module. Using the procedural design description as a guide, important

control paths are tested to uncover errors within the boundary of the module. The

relative complexity of tests and uncovered errors is limited by the constrained scope

established for Unit Testing. The unit test is normally white-box oriented and the

step can be conducted in parallel for multiple modules. The module interface is

tested to ensure that information properly flows into and out of the program unit

under test. The local data structure is examined to ensure that data stored temporarily

maintains its integrity during all steps in an algorithm’s execution. Boundary

conditions are tested to ensure that the module operates properly at boundaries

established to limit or restrict processing. All independent paths (basis paths) through

the control structure are exercised to ensure that all statements in a module have been

executed at least once. And finally, all error-handling paths are tested.

UNIT TEST PROCEDURES:

Unit testing is normally considered as an adjunct to the coding step. After

source-level code has been developed, reviewed, and verified for correct syntax, unit

test case design begins A review of design information provides guidance for

establishing test cases that are likely to uncover all errors. Each test case should be

coupled with a set of expected results.

Because a module is not a standalone program, driver and/or stub software

must be developed for each unit test. In most applications a driver is nothing more

than a “main program” that accepts test case data, passes such data to the module (to

be tested), and prints relevant results. Stubs serve to replace modules that are

Morning Star Polytechnic - Chunkankadai 22

Page 23: Library

Owen Trust Library Management System

subordinate to (called by) the module to be tested. A stub or “dummy subprogram”

uses the subordinate module’s interface, may do minimal data manipulation, prints

verification of entry, and returns.

Drivers and stubs represent overhead. That is both the software that must be

developed but that is not delivered with the final software Products drivers and Stubs

are kept simple, actual overhead is relatively low.

Unit testing is simplified when a module with high cohesion is designed.

When only one function is addressed by a module, the number of test cases is

reduced and errors can be easily predicted and uncovered.

USER INTERFACE TESTING:

An interactive interface is a system that is dominated by interaction between

the system and external agents, such as humans, devices or other programs. The

external agents are independent of the system, so their inputs cannot be controlled,

although the system may solicit response from them. An interactive interface usually

includes only part of an entire application, one that can often be handled

independently from the computational part of the application. The major concerns of

an interactive interface are the communications protocol between the system and the

external agents, the syntax of possible interactions the presentation of output, the

flow of control with in the system, the ease of understanding and user interface,

performance and error handling.

The dynamic model dominates interactive interfaces. Objects in the model

represent interaction elements, such as input and output tokens and presentation in

response to input event sequences, but the internal structure of the functions is

usually unimportant to the behavior of the interface.

Morning Star Polytechnic - Chunkankadai 23

Page 24: Library

Owen Trust Library Management System

5. PROJECT DESCRIPTION

System implementation is an important phase in a project. After analysis

phase, we come to a conclusion of, which modules are required and the system

requirements are also finalized.

Architectural design involves identifying the software components,

decoupling and decomposing them into processing modules and conceptual data

structures & specifying the interconnections among the components.

Software design is a process through which the requirements are translated

into representation of software.

A user must complete the sign-up process, which involves the completion of

form to be filled in by the user and to be submitted. Once the users are login with

their user id & password, they are allowed to.

Morning Star Polytechnic - Chunkankadai 24

Library Process

Book ReturnBook Issue

Fine CalculationSearch

Book Detail Maintaince

Page 25: Library

Owen Trust Library Management System

Implementation of modules:

There are three modules in this project. They are

1. Master

2. Transaction

3. Search

Master Module:

Master module is again subdivided into

1. Member

2. Book Master

3. Magazine

Member:

The system will ask for the details like Type, Type Id, Type Name, Number

of cards and Return Days One book is given for each card.

Book Master:

The system will be denote what are available books we have, then it will

displays all the details. It includes the Access Number, Author Name, Book Title,

Publisher, Number of Pages, Edition, Price, Subject, Remark, and Number of cards

and Status. In this case if the book is lost it has to be paid by an amount of about two

times more than the actual price.

Transaction Module

The Transaction module is sub divided into

1. Book Issue

2. Book Return

Morning Star Polytechnic - Chunkankadai 25

Page 26: Library

Owen Trust Library Management System

Book Issue

The system will be maintaining all the appropriate details of issued books. At

the time of book issue the system will collect the following information from the

borrower. They are type name, member Id, Name, Department, no of cards and issue

date etc.For each card only one book is issued.

Book Return

The system will maintain all the appropriate details of returned books. At that

time of returning the system will fetch the following information from the system.

They are type name, member id, issue date, cards, actual return date and old fine

calculations etc. . In the case of delay the fine value for each day is about twenty-five

paise. In this case if the book is lost it has to be paid by an amount of about two

times more than the actual price.

Fine calculation

The system will maintain all the appropriate details for fine details of

members. In the case of delay the fine value for each day is about twenty-five paise.

In this case if the book is lost it has to be paid by an amount of about two times more

than the actual price.

Search

The Search module will be divided into

1. Book Search

2. Member Search

Morning Star Polytechnic - Chunkankadai 26

Page 27: Library

Owen Trust Library Management System

Book Search

The system will maintain all the appropriate details of books. At that time of

searching the system will fetch the following information from the system. They are

search type and type name etc. The management in the library may not know the

stock of books that are stored in the library. So the management uses this type

inorder to search the books whether book is on issue or not.Thus using this prosses

searches the books.

Member Search

The system will maintain all the appropriate details of members of the

library. .The management in the library may not know which member has taken the

book from the library. At that time of searching the system will fetch the following

information from the system. They are member type, number of cards and whether

the book is issued to the member or not etc.

Morning Star Polytechnic - Chunkankadai 27

Page 28: Library

Owen Trust Library Management System

6. SYSTEM DESIGN

6.1. Data Flow Diagram

Data flow diagram for Member Type

Data Flow Diagram for Book Master

Morning Star Polytechnic - Chunkankadai 28

Member DetailMember

Member TblInsert

Book Details

BookBook Table

Page 29: Library

Owen Trust Library Management System

Data Flow Diagram for Book Issue

Data Flow Diagram for Book Return

6.2 DataBase Design

Morning Star Polytechnic - Chunkankadai 29

Book Master Book Issue Issue table

Return detail Return Book Master

Page 30: Library

Owen Trust Library Management System

1) Customer_Master

Column Name Data Type Size DescriptionCust_id Text 20 Id of the customer Cust_name Text 50 Name of the customerAddress Text 100 Address of the customerSex Text 10 Gender of the customerDoj Date Join dateDob Date Date of birthPhone Number 10 Customer Phone numberEmail Text 50 Email id of the customerNo_of_cards Number 10 Number of cards for the

customerStatus Text 25 Status of the customer

2) Card_master

Column Name Data Type Size DescriptionCust_id Text 50 Id of the customerAvail_cards Number 10 Currently available cards

3) department_master

Column Name Data Type Size DescriptionDept_id Text 50 Id for the DepartmentDept_name Text 50 Name of the department

4) book_master

Morning Star Polytechnic - Chunkankadai 30

Page 31: Library

Owen Trust Library Management System

Column Name Data Type Size Descriptionbook_id Text 25 Id for the bookbook_name Text 50 Name of the bookDepartment_id Text 50 Releated departmentPublisher Text 50 Name of the publisherNo_of_copies Number 10 Number of copiesNo_of_pages Number 10 Number of pagesPrice Number 10 Amount of the bookRack_id Text 50 Id of the rack where it is

present

5) author_detail

Column Name Data Type Size DescriptionBook_id Text 50 Id for the bookAuthor_name Text 50 Name of the author

6) Rack_master

Column Name Data Type Size DescriptionRack_id Text 50 Id for the rackRack_name Text 50 Department name of the

rackRack_capacity Number 10 Capacity of the rack

7) Book_detail

Column Name Data Type Size DescriptionBook_id Text 25 Id for the bookNo_of_copies Number 10 Number of copies Avail_copies Available copies

8) magazine_master

Morning Star Polytechnic - Chunkankadai 31

Page 32: Library

Owen Trust Library Management System

Column Name Data Type Size DescriptionMagazine_no Text 25 Id for the magazineMagazine_name Text 50 Name of magazineMagazine_type Text 50 Type of magazineSubject Text 50 Subjet which releated to the

magazinePrice Number 10 Price of the magazine

9)santa_master

Column Name Data Type Size DescriptionCust_id Text 25 Id for the customerSanta_amt Number 10 Amount of santaReceived_date Date Paid dateYear Number 10 Paid for the year

10) issue_master

Column Name Data Type Size Descriptionissue_no Text 25 Id for the issue cust_id Text 25 Customer idbook_id Text 25 Book idissue_date Date Date of issuecard_no Number 10 Number of the cardStatus Text 10 Book returned

11) return master

Column Name Data Type Size Descriptionissue_no Text 25 If for the issuecust_id Text 25 Customer idbook_id Text 25 Book idissue_date Date Date of issueact_return_date Date Actual return date of the

bookreturn_date Date Return dateFine Number 10 Fine amount

Morning Star Polytechnic - Chunkankadai 32

Page 33: Library

Owen Trust Library Management System

7. SOURCE CODE

frmbookentry Private Sub authorflex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles authorflex.KeyPressEvent With authorflex If e.keyAscii = 13 And .Col = .Cols - 1 Then If MsgBox("More Author", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Library") = MsgBoxResult.Yes Then .Rows = .Rows + 1 .Row = .Row + 1 .Col = 1 .Focus() .set_TextMatrix(.Row, 0, .Row) Else cmdsave.Focus() End If ElseIf e.keyAscii = 13 Then .Col = .Col + 1 ElseIf e.keyAscii = 8 Then If .get_TextMatrix(.Row, .Col) = "" Then .Row = .Row - 1 .Rows = .Rows - 1 .Col = 1 ElseIf .Row <> 0 Then .set_TextMatrix(.Row, .Col, Mid(.get_TextMatrix(.Row, .Col), 1, Len(.get_TextMatrix(.Row, .Col)) - 1)) End If Else .set_TextMatrix(.Row, .Col, .get_TextMatrix(.Row, .Col) + Chr(e.keyAscii)) End If

End With End Sub Private Sub frmBookEntry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load authorflex.set_TextMatrix(1, 0, "1") cmd = New OleDbCommand("select dept_name from dept_master", con) dr = cmd.ExecuteReader Do While dr.Read cmbdept.Items.Add(dr(0)) Loop dr.Close() Call grid() Call clear() End Sub

Morning Star Polytechnic - Chunkankadai 33

Page 34: Library

Owen Trust Library Management System

Private Sub rackflex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles rackflex.KeyPressEvent With rackflex If e.keyAscii = 13 Then txtrid.Text = .get_TextMatrix(.Row, 0) .Visible = False authorflex.Focus() End If End With End Sub

Private Sub txtprice_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtprice.KeyPress If Asc(e.KeyChar) = 13 Then cmd = New OleDbCommand("select * from rack_master", con) dr = cmd.ExecuteReader With rackflex If dr.HasRows Then .Rows = 1 .Rows = 2 .Row = 1 Do While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, dr(2)) .Rows = .Rows + 1 .Row = .Row + 1 Loop dr.Close() End If dr.Close() .Visible = True .Focus() End With End If End Sub

Private Sub cmdsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdsave.Click Dim i As Integer If txtbid.Text <> "" And txtbname.Text <> "" And cmbdept.Text <> "" And txtpub.Text <> "" And txtedition.Text <> "" And txtcopies.Text <> "" And txtpages.Text <> "" And txtprice.Text <> "" And txtrid.Text <> "" Then cmd = New OleDbCommand("select * from book_master where book_id='" + txtbid.Text + "'", con) dr = cmd.ExecuteReader If Not dr.HasRows Then dr.Close() cmd = New OleDbCommand("insert into book_master values('" + txtbid.Text + "','" + txtbname.Text + "','" +

Morning Star Polytechnic - Chunkankadai 34

Page 35: Library

Owen Trust Library Management System

cmbdept.Text + "','" + txtpub.Text + "','" + txtedition.Text + "'," + txtcopies.Text + "," + txtpages.Text + "," + txtprice.Text + ",'" + txtrid.Text + "')", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("insert into book_avail_detail values('" + txtbid.Text + "'," + txtcopies.Text + "," + txtcopies.Text + ")", con) cmd.ExecuteNonQuery() dr.Close() With authorflex If .get_TextMatrix(1, 1) <> "" Then For i = 1 To .Rows - 1 cmd = New OleDbCommand("insert into author_master values('" + txtbid.Text + "','" + .get_TextMatrix(i, 1) + "')", con) cmd.ExecuteNonQuery() dr.Close() Next End If End With MsgBox("One Book Added") dr.Close() grid() clear() Else MsgBox("Book Id Already Exists") dr.Close() End If Else MsgBox("Fields Are Empty") End If dr.Close() End Sub Sub grid() Dim i As Integer With flex1 cmd = New OleDbCommand("select book_id,book_name,dept_name,edition,no_of_copies,price,rack_id from book_master", con) dr = cmd.ExecuteReader If dr.HasRows Then .Rows = 1 .Rows = 2 .Row = 1 While (dr.Read) For i = 0 To 6 .set_TextMatrix(.Row, i, dr(i)) Next .Rows = .Rows + 1 .Row = .Row + 1 End While

Morning Star Polytechnic - Chunkankadai 35

Page 36: Library

Owen Trust Library Management System

dr.Close() End If End With dr.Close() End Sub Sub clear() txtbid.Clear() txtbname.Clear() txtpub.Clear() txtedition.Clear() txtcopies.Clear() txtpages.Clear() txtprice.Clear() txtrid.Clear() authorflex.Rows = 1 authorflex.Rows = 2 authorflex.set_TextMatrix(1, 0, "1") txtbname.Focus() Call autogen() End Sub

Private Sub cmdclear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdclear.Click clear() End Sub

Private Sub flex1_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles flex1.ClickEvent With flex1 cmd = New OleDbCommand("select * from book_master where book_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() txtbid.Text = dr(0) txtbname.Text = dr(1) cmbdept.Text = dr(2) txtpub.Text = dr(3) txtedition.Text = dr(4) txtcopies.Text = dr(5) txtpages.Text = dr(6) txtprice.Text = dr(7) txtrid.Text = dr(8) dr.Close() cmd = New OleDbCommand("select * from author_master where book_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then With authorflex .Rows = 1 .Rows = 2 While dr.Read

Morning Star Polytechnic - Chunkankadai 36

Page 37: Library

Owen Trust Library Management System

.set_TextMatrix(.Row, 0, .Row) .set_TextMatrix(.Row, 1, dr(1)) .Rows = .Rows + 1 .Row = .Row + 1 End While .Rows = .Rows - 1 End With dr.Close() End If Else dr.Close() End If End With dr.Close() End Sub Private Sub txtrid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtrid.KeyPress e.Handled = True End Sub

Private Sub cmddelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmddelete.Click If txtbid.Text <> "" And txtbname.Text <> "" Then cmd = New OleDbCommand("select * from book_master where book_id='" + txtbid.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() cmd = New OleDbCommand("delete * from book_master where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("delete * from book_avail_detail where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("delete * from author_master where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() MsgBox("One Record Deleted") Call grid() Call clear() Else MsgBox("Record Not Found") dr.Close() End If Else MsgBox("Fields Are Empty") End If dr.Close() End Sub

Morning Star Polytechnic - Chunkankadai 37

Page 38: Library

Owen Trust Library Management System

Private Sub cmdupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdupdate.Click Dim i As Integer If txtbid.Text <> "" And txtbname.Text <> "" And cmbdept.Text <> "" And txtpub.Text <> "" And txtedition.Text <> "" And txtcopies.Text <> "" And txtpages.Text <> "" And txtprice.Text <> "" And txtrid.Text <> "" Then cmd = New OleDbCommand("select * from book_master where book_id='" + txtbid.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() cmd = New OleDbCommand("update book_master set book_name='" + txtbname.Text + "',dept_name='" + cmbdept.Text + "',publisher='" + txtpub.Text + "',edition='" + txtedition.Text + "',no_of_copies=" + txtcopies.Text + ",no_of_pages=" + txtpages.Text + ",price=" + txtprice.Text + ",rack_id='" + txtrid.Text + "' where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("update book_avail_detail set no_of_copies=" + txtcopies.Text + ",cur_avail_copies=" + txtcopies.Text + " where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("delete * from author_master where book_id='" + txtbid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() With authorflex If .get_TextMatrix(1, 1) <> "" Then For i = 1 To .Rows - 1 cmd = New OleDbCommand("insert into author_master values('" + txtbid.Text + "','" + .get_TextMatrix(i, 1) + "')", con) cmd.ExecuteNonQuery() dr.Close() Next End If End With MsgBox("One Book Updated") dr.Close() grid() clear() Else MsgBox("Book Id Not Found") dr.Close() End If Else MsgBox("Fields Are Empty") End If

Morning Star Polytechnic - Chunkankadai 38

Page 39: Library

Owen Trust Library Management System

dr.Close() End Sub Private Sub txtbid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtbid.KeyPress If Asc(e.KeyChar) = 13 Then txtbname.Focus() End If End Sub

Private Sub txtbname_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtbname.KeyPress If Asc(e.KeyChar) = 13 Then cmbdept.Focus() End If End Sub

Private Sub cmbdept_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbdept.KeyPress If Asc(e.KeyChar) = 13 Then txtpub.Focus() End If End Sub

Private Sub txtpub_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtpub.KeyPress If Asc(e.KeyChar) = 13 Then txtedition.Focus() End If End Sub

Private Sub txtedition_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtedition.KeyPress If Asc(e.KeyChar) = 13 Then txtcopies.Focus() End If End Sub

Private Sub txtcopies_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcopies.KeyPress If Asc(e.KeyChar) = 13 Then txtpages.Focus() End If End Sub

Private Sub txtpages_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtpages.KeyPress If Asc(e.KeyChar) = 13 Then txtprice.Focus() End If End Sub

Morning Star Polytechnic - Chunkankadai 39

Page 40: Library

Owen Trust Library Management System

Sub autogen() cmd = New OleDbCommand("select max(book_id)from book_master", con) dr = cmd.ExecuteReader dr.Read() If Not IsDBNull(dr(0)) Then txtbid.Text = dr(0) + 1 dr.Close() Else txtbid.Text = 1 dr.Close() End If dr.Close() End Sub

frmcustomer Private Sub cmdsava_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdsava.Click Dim s As String If optmale.Checked = True Then s = "Male" Else s = "Female" End If If txtid.Text <> "" And txtname.Text <> "" And txtaddress.Text <> "" And txtphone.Text <> "" And txtemail.Text <> "" And txtnoc.Text <> "" Then cmd = New OleDbCommand("select * from customer_master where cust_id='" + txtid.Text + "'", con) dr = cmd.ExecuteReader If Not dr.HasRows Then dr.Close() 'cmd = New OleDbCommand("insert into magazine_master values('" + txtno.Text + "','" + txtname.Text + "','" + cmbtype.Text + "','" + cmbsub.Text + "'," + txtprice.Text + ")", con) Try cmd = New OleDbCommand("insert into customer_master values('" + txtid.Text + "','" + txtname.Text + "','" + txtaddress.Text + "','" + s + "','" + CStr(dtpdob.Value) + "' ,'" + CStr(dtpdoj.Value) + "'," + txtphone.Text + ",'" + txtemail.Text + "'," + txtnoc.Text + ",'current')", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try MsgBox("One Record Saved") dr.Close() cmd = New OleDbCommand("insert into card_master values('" + txtid.Text + "'," + txtnoc.Text + ")", con) cmd.ExecuteNonQuery() dr.Close()

Morning Star Polytechnic - Chunkankadai 40

Page 41: Library

Owen Trust Library Management System

clear() autoid() grid() Else dr.Close() MsgBox("Already Exists") End If Else dr.Close() MsgBox("Fields Are Empty") End If End Sub Private Sub cmdupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdupdate.Click Dim s As String If optmale.Checked = True Then s = "Male" Else s = "Female" End If If txtid.Text <> "" And txtname.Text <> "" And txtaddress.Text <> "" And txtphone.Text <> "" And txtemail.Text <> "" And txtnoc.Text <> "" Then cmd = New OleDbCommand("select * from customer_master where cust_id='" + txtid.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() Try cmd = New OleDbCommand("update customer_master set cust_name='" + txtname.Text + "',address='" + txtaddress.Text + "',sex='" + s + "',dob='" + CStr(dtpdob.Value) + "' ,doj='" + CStr(dtpdoj.Value) + "',phone=" + txtphone.Text + ",email='" + txtemail.Text + "',no_of_cards=" + txtnoc.Text + " where cust_id='" + txtid.Text + "'", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try MsgBox("One Record Updated") dr.Close() cmd = New OleDbCommand("update card_master set cur_avail_cards=" + txtnoc.Text + " where cust_id='" + txtid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() clear() autoid() grid() Else dr.Close() MsgBox("Record Not Found")

Morning Star Polytechnic - Chunkankadai 41

Page 42: Library

Owen Trust Library Management System

End If Else dr.Close() MsgBox("Fields Are Empty") End If End Sub Private Sub cmddelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmddelete.Click If txtid.Text <> "" And txtname.Text <> "" Then cmd = New OleDbCommand("select * from customer_master where cust_id='" + txtid.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() Try If MsgBox("Are You Sure", MsgBoxStyle.OKCancel + MsgBoxStyle.Question, "Customer Master") = MsgBoxResult.Cancel Then Exit Sub End If cmd = New OleDbCommand("delete * from customer_master where cust_id='" + txtid.Text + "'", con) cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try MsgBox("One Record Deleted") dr.Close() cmd = New OleDbCommand("delete * from card_master where cust_id='" + txtid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() clear() autoid() grid() Else dr.Close() MsgBox("Record Not Found") End If Else dr.Close() MsgBox("Fields Are Empty") End If End Sub Sub autoid() cmd = New OleDbCommand("select max(val(cust_id)) from customer_master", con) dr = cmd.ExecuteReader dr.Read() If Not IsDBNull(dr(0)) Then txtid.Text = Val(dr(0).ToString) + 1 Else txtid.Text = 1

Morning Star Polytechnic - Chunkankadai 42

Page 43: Library

Owen Trust Library Management System

End If dr.Close() End Sub

Sub grid() With flex1 cmd = New OleDbCommand("select * from customer_master", con) dr = cmd.ExecuteReader If dr.HasRows Then .Rows = 1 .Rows = 2 While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, Format(dr(5), "dd/MM/yyyy")) .set_TextMatrix(.Row, 3, dr(6)) .set_TextMatrix(.Row, 4, dr(8)) .Rows = .Rows + 1 .Row = .Row + 1 End While dr.Close() End If dr.Close() End With End Sub

Sub clear() txtid.Clear() txtname.Clear() txtaddress.Clear() txtphone.Clear() txtemail.Clear() txtnoc.Clear() End Sub

Private Sub frmcustomer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load clear() autoid() grid() End Sub

Private Sub flex1_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles flex1.ClickEvent With flex1 cmd = New OleDbCommand("select * from customer_master where cust_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read()

Morning Star Polytechnic - Chunkankadai 43

Page 44: Library

Owen Trust Library Management System

txtid.Text = dr(0) txtname.Text = dr(1) txtaddress.Text = dr(2) If dr(3) = "Male" Then optmale.Checked = True Else optfemale.Checked = True End If dtpdob.Value = dr(4) dtpdoj.Value = dr(5) txtphone.Text = dr(6) txtemail.Text = dr(7) txtnoc.Text = dr(8) End If dr.Close() End With End Sub

Private Sub cmdclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclear.Click clear() autoid() End Sub

Private Sub txtphone_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtphone.KeyPress If Asc(e.KeyChar) >= 47 And Asc(e.KeyChar) <= 58 Or Asc(e.KeyChar) = 8 Then e.Handled = False ElseIf Asc(e.KeyChar) = 13 Then txtemail.Focus() Else e.Handled = True End If End Sub

Private Sub txtnoc_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtnoc.KeyPress If Asc(e.KeyChar) >= 47 And Asc(e.KeyChar) <= 58 Or Asc(e.KeyChar) = 8 Then e.Handled = False ElseIf Asc(e.KeyChar) = 13 Then cmdsava.Focus() Else e.Handled = True End If End Sub

Private Sub txtid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtid.KeyPress If Asc(e.KeyChar) = 13 Then

Morning Star Polytechnic - Chunkankadai 44

Page 45: Library

Owen Trust Library Management System

txtname.Focus() End If End Sub

Private Sub txtname_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtname.KeyPress If Asc(e.KeyChar) = 13 Then txtaddress.Focus() End If End Sub

Private Sub dtpdob_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles dtpdob.KeyPress If Asc(e.KeyChar) = 13 Then dtpdoj.Focus() End If End Sub

Private Sub dtpdoj_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles dtpdoj.KeyPress If Asc(e.KeyChar) = 13 Then txtphone.Focus() End If End Sub

Private Sub txtemail_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtemail.KeyPress If Asc(e.KeyChar) = 13 Then txtnoc.Focus() End If End Sub

frmfine Private Sub txtcid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcid.KeyPress If Asc(e.KeyChar) = 13 Then flexgroup.Visible = True cmd = New OleDbCommand("select * from customer_master", con) dr = cmd.ExecuteReader If dr.HasRows Then With flex .Rows = 1 .Rows = 2 .Row = 1 While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, Format(dr(5), "dd/MM/yyyy")) .Rows = .Rows + 1

Morning Star Polytechnic - Chunkankadai 45

Page 46: Library

Owen Trust Library Management System

.Row += 1 End While .Focus() End With dr.Close() End If dr.Close() End If dr.Close() End Sub Private Sub flex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles flex.KeyPressEvent If e.keyAscii = 13 Then With flex If .get_TextMatrix(.Row, .Col) <> "" Then txtcid.Text = .get_TextMatrix(.Row, 0) txtcname.Text = .get_TextMatrix(.Row, 1) txtdoj.Text = .get_TextMatrix(.Row, 2) flexgroup.Visible = False cmd = New OleDbCommand("select * from fine_master where cust_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() If dr(1) <> 0 Then txtofine.Text = dr(1) dr.Close() txtpay.Focus() Else dr.Close() MsgBox("No Fine") txtcid.Focus() End If Else dr.Close() MsgBox("No Fine") End If End If End With End If End Sub

Private Sub txtpay_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtpay.TextChanged If Val(txtpay.Text) > Val(txtofine.Text) Then MsgBox("Fine Exceeded") txtpay.Focus() Else txtbal.Text = Val(txtofine.Text) - Val(txtpay.Text) End If End Sub

Morning Star Polytechnic - Chunkankadai 46

Page 47: Library

Owen Trust Library Management System

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdpay.Click If txtcid.Text <> "" And txtcname.Text <> "" And txtdoj.Text <> "" And txtofine.Text <> "" And txtpay.Text <> "" And txtbal.Text <> "" Then cmd = New OleDbCommand("select * from fine_master where cust_id='" + txtcid.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() cmd = New OleDbCommand("update fine_master set fine='" + txtbal.Text + "' where cust_id='" + txtcid.Text + "'", con) cmd.ExecuteNonQuery() MsgBox("Paid") dr.Close() Call clear() Else dr.Close() MsgBox("No Fine") txtcid.Focus() End If End If dr.Close() End Sub Sub clear() txtcid.Clear() txtcname.Clear() txtdoj.Clear() txtofine.Clear() txtpay.Clear() txtbal.Clear() txtcid.Focus() End Sub Private Sub txtofine_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtofine.KeyPress e.Handled = True End Sub

Private Sub txtpay_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtpay.KeyPress If Asc(e.KeyChar) >= 47 And Asc(e.KeyChar) <= 58 Or Asc(e.KeyChar) = 8 Then e.Handled = False ElseIf Asc(e.KeyChar) = 13 Then cmdpay.Focus() Else e.Handled = True End If End Sub

Morning Star Polytechnic - Chunkankadai 47

Page 48: Library

Owen Trust Library Management System

Private Sub txtbal_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtbal.KeyPress If Asc(e.KeyChar) >= 47 And Asc(e.KeyChar) <= 58 Or Asc(e.KeyChar) = 8 Then e.Handled = False Else e.Handled = True End If End Sub Private Sub cmdclear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdclear.Click Call clear() End Sub

frmissuePrivate Sub frmissue_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call clear() Call loadBook() End Sub Sub clear() txtino.Clear() txtmid.Clear() txtmname.Clear() txtnoc.Clear() flex.Rows = 1 flex.Rows = 2 Call autoid() End Sub Sub autoid() cmd = New OleDbCommand("select max(issue_no) from issue_master", con) dr = cmd.ExecuteReader dr.Read() If Not IsDBNull(dr(0)) Then txtino.Text = dr(0) + 1 Else txtino.Text = "1" End If dr.Close() End Sub Private Sub txtino_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtino.KeyPress If Asc(e.KeyChar) = 13 Then cmd = New OleDbCommand("select cust_id,cust_name,no_of_cards from customer_master", con) dr = cmd.ExecuteReader With memflex If dr.HasRows Then .Rows = 1 .Rows = 2

Morning Star Polytechnic - Chunkankadai 48

Page 49: Library

Owen Trust Library Management System

.Row = 1 While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, dr(2)) .Rows = .Rows + 1 .Row = .Row + 1 End While .Visible = True dr.Close() .Focus() End If End With End If dr.Close() End Sub

Private Sub memflex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles memflex.KeyPressEvent With memflex If e.keyAscii = 13 And .get_TextMatrix(.Row, .Col) <> "" Then txtmid.Text = .get_TextMatrix(.Row, 0) txtmname.Text = .get_TextMatrix(.Row, 1) txtnoc.Text = .get_TextMatrix(.Row, 2) txtrd.Text = Format(DateAdd(DateInterval.Month, 1, dtpidate.Value), "MM/dd/yyyy") .Visible = False dtpidate.Focus() flex.Rows = 1 flex.Rows = 2 flex.Row = 1 flex.Col = 0 cmd = New OleDbCommand("select * from card_master where cust_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() txtac.Text = dr(1) dr.Close() End If dr.Close() End If End With End Sub Private Sub dtpidate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles dtpidate.KeyPress If Asc(e.KeyChar) = 13 Then flex.Focus() End If End Sub

Morning Star Polytechnic - Chunkankadai 49

Page 50: Library

Owen Trust Library Management System

Private Sub flex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles flex.KeyPressEvent With flex If .Col = 0 And e.keyAscii = 13 Then If Val(txtac.Text) > 0 Then Call loadBook() bookflex.Visible = True bookflex.Focus() Else MsgBox("Cards Are Not Available") End If ElseIf .Col = .Cols - 1 And e.keyAscii = 13 Then If MsgBox("Issue More Book", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Library") = MsgBoxResult.Yes Then If Val(txtac.Text) > 0 Then .Rows = .Rows + 1 .Row = .Row + 1 .Col = 0 .Focus() Else MsgBox("Cards Are Not Available") cmdissue.Focus() End If Else cmdissue.Focus() End If End If End With End Sub Sub loadBook() cmd = New OleDbCommand("select * from book_master a ,book_avail_detail b where a.book_id=b.book_id and b.cur_avail_copies>0", con) dr = cmd.ExecuteReader With bookflex If dr.HasRows Then .Rows = 1 .Rows = 2 .Row = 1 While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, dr(2)) .set_TextMatrix(.Row, 3, dr(4)) .set_TextMatrix(.Row, 4, dr(8)) .Rows = .Rows + 1 .Row = .Row + 1 End While dr.Close() End If

Morning Star Polytechnic - Chunkankadai 50

Page 51: Library

Owen Trust Library Management System

End With dr.Close() End Sub Private Sub bookflex_KeyPressEvent(ByVal sender As Object, ByVal e As AxMSFlexGridLib.DMSFlexGridEvents_KeyPressEvent) Handles bookflex.KeyPressEvent Dim i As Integer With bookflex If e.keyAscii = 13 Then cmd = New OleDbCommand("select book_id,book_name,dept_name,edition,publisher,no_of_pages,rack_id from book_master where book_id='" + .get_TextMatrix(.Row, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() For i = 0 To 6 flex.set_TextMatrix(flex.Row, i, dr(i)) Next dr.Close() txtac.Text = Val(txtac.Text) - 1 End If .Visible = False flex.Col = 6 flex.Focus() End If End With dr.Close() End Sub

Private Sub txtac_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtac.KeyPress e.Handled = True End Sub

Private Sub cmdissue_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdissue.Click Dim i, avail, count As Integer With flex If txtino.Text <> "" And txtmid.Text <> "" And txtmname.Text <> "" And txtac.Text <> "" And txtrd.Text <> "" Then If .get_TextMatrix(1, 0) <> "" Then cmd = New OleDbCommand("select * from issue_master where issue_no='" + txtino.Text + "'", con) dr = cmd.ExecuteReader If Not dr.HasRows Then dr.Close() cmd = New OleDbCommand("insert into issue_master values('" + txtino.Text + "','" + txtmid.Text + "','" + CStr(dtpidate.Value) + "'," + txtnoc.Text + ",'" + txtrd.Text + "',no)", con) cmd.ExecuteNonQuery()

Morning Star Polytechnic - Chunkankadai 51

Page 52: Library

Owen Trust Library Management System

dr.Close() cmd = New OleDbCommand("update card_master set cur_avail_cards='" + txtac.Text + "' where cust_id='" + txtmid.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() For i = 1 To flex.Rows - 1 cmd = New OleDbCommand("insert into book_detail values('" + txtino.Text + "','" + flex.get_TextMatrix(i, 0) + "','not returned')", con) cmd.ExecuteNonQuery() dr.Close() cmd = New OleDbCommand("select cur_avail_copies from book_avail_detail where book_id='" + flex.get_TextMatrix(i, 0) + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() avail = dr(0) - 1 dr.Close() cmd = New OleDbCommand("update book_avail_detail set cur_avail_copies=" + Str(avail) + " where book_id='" + flex.get_TextMatrix(i, 0) + "'", con) cmd.ExecuteNonQuery() dr.Close() End If dr.Close() Next MsgBox("Books Issued") dr.Close() Call clear() Else MsgBox("Issue No Already Used") dr.Close() End If Else MsgBox("No Book Issued") End If Else MsgBox("Fields Are Empty") End If End With End Sub

Private Sub cmddelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmddelete.Click Dim count, i As Integer Dim cust_id As String Dim a As New ArrayList If txtino.Text <> "" And txtmid.Text <> "" And txtmname.Text <> "" Then

Morning Star Polytechnic - Chunkankadai 52

Page 53: Library

Owen Trust Library Management System

cmd = New OleDbCommand("select * from issue_master where issue_no='" + txtino.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close()

'get the book count from book_detail using the issue no and update the cur_avail_cards 'with count '************************************* cmd = New OleDbCommand("select count(*) from book_detail where issue_no='" + txtino.Text + "'", con) dr = cmd.ExecuteReader dr.Read() If Not IsDBNull(dr(0)) Then count = Val(dr(0)) End If dr.Close()

'select the customer id from issue master using issue_no to update 'cur_avail_cards '*************************************** cmd = New OleDbCommand("select cust_id from issue_master where issue_no='" + txtino.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() cust_id = dr(0) dr.Close() End If dr.Close()

'update the cards '******************************* cmd = New OleDbCommand("update card_master set cur_avail_cards=cur_avail_cards+" + count.ToString + " where cust_id='" + cust_id + "'", con) cmd.ExecuteNonQuery() dr.Close()

'update the book_avail table to the returned books to maintain the stock 'get all the book_id using issue_no and add it to an array list '************************************** cmd = New OleDbCommand("select book_id from book_detail where issue_no='" + txtino.Text + "'", con) dr = cmd.ExecuteReader While (dr.Read) a.Add(dr(0)) End While

Morning Star Polytechnic - Chunkankadai 53

Page 54: Library

Owen Trust Library Management System

dr.Close()

'update the book_avail_detail table to the returned books using arraylist '*********************************** For i = 0 To a.Count - 1 cmd = New OleDbCommand("update book_avail_detail set cur_avail_copies=cur_avail_copies+1 where book_id='" + a(i).ToString() + "'", con) cmd.ExecuteNonQuery() dr.Close() Next dr.Close()

'delete the books from book_details using issue_no '******************************** cmd = New OleDbCommand("delete * from book_detail where issue_no='" + txtino.Text + "'", con) cmd.ExecuteNonQuery() dr.Close()

'delete the issue_detail from(issue_master) '*********************** cmd = New OleDbCommand("delete * from issue_master where issue_no='" + txtino.Text + "'", con) cmd.ExecuteNonQuery() dr.Close() MsgBox("One Issue Deleted") Call clear() End If Else MsgBox("Fields Are Empty") End If End Sub

Private Sub dtpidate_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtpidate.ValueChanged txtrd.Text = Format(DateAdd(DateInterval.Month, 1, dtpidate.Value), "MM/dd/yyyy") End Sub

frmmagazinePrivate Sub frmmagazine_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call dept() cmbtype.Items.Add("Select Type") cmbtype.Items.Add("Monthly") cmbtype.Items.Add("Daily") cmbtype.Items.Add("Weekly") cmbtype.Items.Add("15 Days") clear()

Morning Star Polytechnic - Chunkankadai 54

Page 55: Library

Owen Trust Library Management System

autoid() grid() End Sub

Sub dept() cmbsub.Items.Clear() cmd = New OleDbCommand("select dept_name from dept_master", con) dr = cmd.ExecuteReader cmbsub.Items.Add("Select Department") While dr.Read cmbsub.Items.Add(dr(0)) End While dr.Close() End Sub Sub clear() txtno.Clear() txtname.Clear() cmbtype.SelectedIndex = 0 cmbsub.SelectedIndex = 0 txtprice.Clear() End Sub Sub autoid() cmd = New OleDbCommand("select max(val(magazine_no)) from magazine_master", con) dr = cmd.ExecuteReader dr.Read() If Not IsDBNull(dr(0)) Then txtno.Text = Val(dr(0).ToString) + 1 Else txtno.Text = 1 End If dr.Close() End Sub Sub grid() With flex1 cmd = New OleDbCommand("select * from magazine_master", con) dr = cmd.ExecuteReader If dr.HasRows Then .Rows = 1 .Rows = 2 While dr.Read .set_TextMatrix(.Row, 0, dr(0)) .set_TextMatrix(.Row, 1, dr(1)) .set_TextMatrix(.Row, 2, dr(2)) .set_TextMatrix(.Row, 3, dr(3)) .set_TextMatrix(.Row, 4, dr(4)) .Rows = .Rows + 1 .Row = .Row + 1 End While dr.Close()

Morning Star Polytechnic - Chunkankadai 55

Page 56: Library

Owen Trust Library Management System

End If dr.Close() End With End Sub Private Sub txtprice_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtprice.KeyPress If Asc(e.KeyChar) >= 47 And Asc(e.KeyChar) <= 58 Or Asc(e.KeyChar) = 8 Then e.Handled = False ElseIf Asc(e.KeyChar) = 13 Then cmdsave.Focus() Else e.Handled = True End If End Sub

Private Sub cmdclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclear.Click clear() autoid() End Sub

Private Sub cmdsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdsave.Click If txtno.Text <> "" And txtname.Text <> "" And txtprice.Text <> "" And cmbtype.Text <> "" And cmbsub.Text <> "" Then cmd = New OleDbCommand("select * from magazine_master where magazine_no='" + txtno.Text + "'", con) dr = cmd.ExecuteReader If Not dr.HasRows Then dr.Close() cmd = New OleDbCommand("insert into magazine_master values('" + txtno.Text + "','" + txtname.Text + "','" + cmbtype.Text + "','" + cmbsub.Text + "'," + txtprice.Text + ")", con) cmd.ExecuteNonQuery() MsgBox("One Record Saved") dr.Close() clear() autoid() grid() Else dr.Close() MsgBox("Already Exists") End If Else dr.Close() MsgBox("Fields Are Empty") End If End Sub

Private Sub cmdupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdupdate.Click

Morning Star Polytechnic - Chunkankadai 56

Page 57: Library

Owen Trust Library Management System

If txtno.Text <> "" And txtname.Text <> "" And cmbtype.Text <> "" And cmbsub.Text <> "" And txtprice.Text <> "" Then cmd = New OleDbCommand("select * from magazine_master where magazine_no='" + txtno.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() cmd = New OleDbCommand("update magazine_master set magazine_name='" + txtname.Text + "',magazine_type='" + cmbtype.Text + "',subject='" + cmbsub.Text + "',price=" + txtprice.Text + " where magazine_no='" + txtno.Text + "'", con) cmd.ExecuteNonQuery() MsgBox("One Record Updated") dr.Close() clear() autoid() grid() Else dr.Close() MsgBox("Already Exists") End If Else dr.Close() MsgBox("Fields Are Empty") End If End Sub

Private Sub cmddelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmddelete.Click If txtno.Text <> "" And txtname.Text <> "" Then cmd = New OleDbCommand("select * from magazine_master where magazine_no='" + txtno.Text + "'", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Close() cmd = New OleDbCommand("delete * from magazine_master where magazine_no='" + txtno.Text + "'", con) cmd.ExecuteNonQuery() MsgBox("One Record Deleted") dr.Close() clear() autoid() grid() Else dr.Close() MsgBox("Already Exists") End If Else dr.Close() MsgBox("Enter The code to Delete") End If End Sub

Morning Star Polytechnic - Chunkankadai 57

Page 58: Library

Owen Trust Library Management System

8. SCREEN OUTPUT

Morning Star Polytechnic - Chunkankadai 58

Page 59: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 59

Page 60: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 60

Page 61: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 61

Page 62: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 62

Page 63: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 63

Page 64: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 64

Page 65: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 65

Page 66: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 66

Page 67: Library

Owen Trust Library Management System

Morning Star Polytechnic - Chunkankadai 67

Page 68: Library

Owen Trust Library Management System

9. FUTURE ENHANCEMENTS

Some of the future enhancements that can be done in this project are:

1. We can fetch all corresponding server information to another system in

another city using Three Tier Architecture.

2. Finding what are the books in which rack are computerized in future.

3. On line library facility can also be added in future.

4. Home delivery System will be included in future.

Morning Star Polytechnic - Chunkankadai 68

Page 69: Library

Owen Trust Library Management System

10. CONCLUSION

The project “OWEN TRUST LIBRARY MANAGEMENT SYSTEM” has

been designed and developed for Library process. The details of Library process

have been computerized. The next important feature is its user friendliness and easy

navigation. Flexibility of the system is also maintained. This is a client server

programming, user can easily maintain all Library process. Though the system has

been developed using modern approaches in software engineering, non-computer

professional with little knowledge can operate it.

This system has been divided into modules such that each module has

separate entity making modification easy without affecting the main design of the

system.

This system works in a fashion, which is very user-friendly and also gives

more option to the user. All the works that have to be done manually during the

examination has been computerized in a better way. The system is tested by possible

sample input and the performance of the system proved much efficient data

maintenance and retrieval is achieved much efficiently and satisfactorily.

Morning Star Polytechnic - Chunkankadai 69

Page 70: Library

Owen Trust Library Management System

11. BIBLOGRAPHY

1. .Net Programming Black Book - Steven Holzner

2. .Net Projects - Tony Martin

Dominic Selly

3. .Net Complete - BPB Publications

Morning Star Polytechnic - Chunkankadai 70