Development of A Library Management Syst
Development of A Library Management Syst
System
by
M d . R ezau l H asan
R o ll N o . D F 0 1 3 1 0 4 3
•.
'
S essio n : 2 0 0 1 -2 0 0 2
by
M d. R ezaul H asan
R o ll N o . D F 0 1 3 1 0 4 3
S e s s io n : 2 0 0 1 -2 0 0 2
B a n g la d e s h U n iv e r s ity o f E n g in e e r in g a n d T e c h n o lo g y
D h a k a - lO O O , B a n g la d e s h
111111111l1li/111111111111111/1111
} #98296#
Development of a Library Management
System
by
M d. R czaul H asan
R o ll N o . D F 0 1 3 1 0 4 3
G ra d u a te D ip lo m a in In fo rm a tio n a n d C o m m u n ic a tio n T e c h n o lo g y (P G D lC T )
" P ro je c t S u p e rv is o r
B a n g la d e s h U n iv e rs ity o f E n g in e e rin g a n d T e c h n o lo g y
, S e s s io n : 2 0 0 1 -2 0 0 2
.}
B a n g la d e s h U n iv e rs ity o f E n g in e e rin g a n d T e c h n o lo g y
D h a k a -IO O O , B a n g la d e s h .
-'
CERTIFICATE
B O A R D O F E X A M IN A R S
M d . S a ifu lls la m
C h a irm a n a n d
A s s is ta n t P ro fe s s o r
S u p e rv is o r
In s titu te o f In fo rm a tio n & C o m m u n ic a tio n T e c h n o lo g y (IIC T )
B U E T , D h a k a -1 0 ,B a n g la d e s h .
D r. S .M . L u tfu l K a b ir
P ro fe s s o r
D ire c to r
\
~ ----= = = = -
~ ra N a th M o n d a l
A s s o c ia te P ro fe s s o r
M em b er
A s s o c ia te D ire c to r (A c a d e m ic )
B U E T , D h a k a -1 0 0 0 , B a n g la d e s h .
-I-
Declaration
System" has been done by the author under supervision of Mr. Md. Saiful Islam,
Dhaka. This is also declared that this or any part of it has not been submitted
elsewhere for the award of any degree or diploma.
- II -
ABSTRACT
).
-III-
ACKNOWLEDGEMENT
The author acknowledges his sincere gratitude and thanks to Mr. Md. Saiful Islam,
BUET for his constant guidance, suggestions and invaluable assistance during the
entire length of this project. His encouragement and motivation helped the author to
The author is greatly indebted Prof. S. M. Lutful Kabir, Director of the Institute of
The author is grateful to all the teachers, officers and staffs of IICT for giving their
kind support and information during the study. Thanks are also due to his friends and
The author gratefully acknowledges his parents for their kind co-operation, continued
encouragement and moral supports without which the work could not have been
completed.
- IV-
TABLE OF CONTENTS
Page No
I
Certificate
II
Declaration
III
Abstract
!.
IV
Acknowledgement
V
Table of Contents
1.1 General
2
1.2 Objectives
3
1.3 Brief Outline of Methodology
-v -
'<
2.5.1 Concept of Data Modelling 8
2.5.2 Categories of Data Models 8
2.5.3 Types of Data Modelling 9
2.6 Application of Database Management System 9
3.1 Introduction II
5.1 Conclusion 30
5.2 Recommendation 30
- VI -
.~ 31
References
Appendix
-VII-
Chapter 1
Introduction
1.1 General
E ducational institution needs library m anagem ent system to track and m anage its
resources. B ooks are checked out, checked in, and requested by library patrons. B ooks
can have special status, if they are placed on reserve or if they are reference books --
these books cannot leave the prem ises. It is rem inded w hen resources are m ore than tw o
w eeks overdue. O ther resources that can be checked out, including softw are, videos,
m usic C D s, each of w hich m ay only be checked out for one w eek at a tim e.
P atrons status 1) influences how long a book can be checked out 2) determ ines w hat
services are available. S tudents can check out a book for four w eeks, and faculty for three
m onths. L ibrary staff m ay keep a book for an entire year. A ny checkable library resource
m ay be renew ed as long as no other patron has requested it. F aculty and library staff can
place a book on reserve for the period of one sem ester, or they m ay bring in foreign
resources (books, papers, disks, m usic C D s, m agazines, or tapes that do not belong to the
L ibrary m ust also m anage a large selection of w eekly, m onthly, and quarterly m agazines,
w hich m ay not be checked out but are available as reference m aterials. T hese m agazines
are annually bound into volum es or recorded as m icrofiche. A dditional activities of the
library staff include re-shelving books, renew ing m agazine subscriptions, and ordering
1.2 Objectives
m a n ip u la te a n d re trie v e th e v a lu a b le d a ta . O n th e o th e r h a n d , to p ro v id e e a sy , fa st a n d
T h e o b je c tiv e s o f th is p ro je c t c a n b e su m m a riz e d b e lo w :
2
.,
1.3 Brief Outline of Methodology
T he m ethodology for developing the softw are w as divided into the follow ing
3. D atabase C reation,
4. Interface D esign,
3
Chapter 2
2.1 Introduction
u n a u th o riz e d a c c e s s . If d a ta a re to b e s h a re d a m o n g s e v e ra l u s e rs , th e s y s te m m u s t a v o id
p o s s ib le a n o m a lie s re s u lts .
4
database m anagem ent system cam e along, organization usually stored inform ation/data in
such system .
Keeping data/inform ation in file processing system has a num ber of m ajor disadvantages:
These difficulties, am ong others, prom pted the developm ent of the database.
W henever understanding of a real world phenom enon or interaction is desired the first
step is to build a sim ple m odel representing the phenom enon and perform study and
evaluation of the m odel rather that actual interaction. In building m odel the am biguity
and com plexity in the real world is avoided totally or com pensated with valid
approxim ation. [n fact a system atic study of any phenom enon whether econom ic,
inform ation generation, flow, interpretation and synthesis of m ore inform ation.
5
2.4.1 Concept of Information Modelling
The first step of infomlation modelling is to precisely choose only that part of reality,
which is of interest. This is known as Entity. Entity defines other parameters. Entities are
atomic i.e. they are invisible. The parameters if as entity are known as attribute.
Attributes are quantum of information, which describe the entity entirely. Attributes
themselves can be thought of entities, which make the first entity of a composite entity.
The key attribute if one, which distinguishes one occurrence if an entity from other. It is
the information, which links two entities. The relationship can be of four categories:
.:. One-to One (I: I) - One instance of the first entity can correspond to only one
used.
6
2 .4 .2 P ro ced u res fo r In fo rm atio n M o d ellin g
b elo w :
.:. E lim in atin g R ep eatin g G ro u p s: M ak e a sep arate tab le fo r each set o f related
relatio n sh ip s.
2 .5 D ata M o d ellin g
7
2 .5 .1 C o n c e p t o f D a ta M o d e llin g
T h e re a re tw o m a jo r c la s s e s o f d a ta m o d e ls - lo g ic a l d a ta m o d e ls o r c o n c e p tu a l d a ta
if s to ra g e m e d ia a n d d e v ic e s , b u t u s e rs o f d a ta s h o u ld b e a b le to d e s c rib e , th in k a b o u t a n d
2 .5 .2 C a te g o rie s o f D a ta M o d e ls
M a n y d a ta m o d e ls h a v e b e e n p ro p o s e d a n d o n e c a n c a te g o riz e th e m a c c o rd in g to th e
d a ta m o d e ls p ro v id e c o n c e p ts th a t a re c lo s e to th e w a y m a n y u s e rs p e rc e iv e d a ta ,
h o w d a ta is s to re d in th e c o m p u te r. C o n c e p ts p ro v id e d b y lo w -le v e l d a ta m o d e ls a re
g e n e ra lly m e a n t fo r c o m p u te r s p e c ia lis ts , n o t fo r ty p ic a l e n d u s e rs . B e tw e e n th e s e tw o
p ro v id e c o n c e p ts th a t m a y b e u n d e rs to o d b y e n d u s e rs b u t th o s e a re n o t to o fa r re m o v e d
s o m e d e ta ils o f d a ta s to ra g e b u t c a n b e im p le m e n te d o n a c o m p u te r s y s te m in a d ire c t
w ay.
)
C onceptual data m odels use concepts such as entities, attributes, and relationships. As
entity represents a real-w orld object or concept that is described in the database. An
T he data m odelling consists of three interrelated pieces of inform ation, the data object,
the attributes that describe the data object and the relationship that connect data objects to
one another. A data object is a representation of alm ost any com posite inform ation that
m ust be understood by softw are. C om posite inform ation m eans som ething that has a
2. R elational M odel
D atabase m anagem ent system IS w idely used 1tl the real w orld. H ere are som e
representative applications:
9
,
• Banking: For custom er inform ation, accounts, loans and banking transaction.
• Airlines: For reservation and schedules inform ation. Airlines were am ong the first
the world accessed the central database system through phone lines and other data
network.
• Credit card transactions: For purchases on credit cards and generation of m onthly
statem ents.
• Finance: For storing inform ation about holdings, sales and purchases of financial
• M anufacturing: For m anagem ent of supply chain and for tracking production of
• Hum an resources: For inform ation about em ployees, salaries, payroll taxes and
10
Chapter 3
3.1 Introduction
The goal of this project was to develop a software, which will make the library
management system easy, reliable and less laborious and quick. To achieve the goal,
following works are set to the target:
To achieve the above target, the data were analysed first. Collection of information
for a particular job is essential to develop the whole project. Various important
information about the project was collected like collection of data for daily
The facts define the functional requirements that the Database must meet.
They form the basis for agreement between the User and the Database Designer and are
written In a form of structured English that is clear and unambiguous.
II
A . T he A rea being M odelled is :-
A L ibrary.
B . I A uthors
B .2 B ooks
B .3 B ook C ategories
B .4 B ooks O ut on L oan
B .S U sers
C .3 A B O O K can be in m any C A T E G O R IE S.
U SE R .
total data have been norm alized and then tables are obtained.
12
Figure 3.2.1: A physical data model for a library
US@lS
user id
use,_n ••me
user_address:
phonll_numb.,
email_address
other_user_details
13
3.3.1 Description of the Database Developed
~ M em ber T a b le - it h a s S IX c o lu m n s (M e m b e r - lD , M em - N am e, P ro fe s s io n ,
M e m _ A d d re s s , M e m _ C o n t_ N u m b e r, M e m _ D a te ) h o ld in g v a lu e s fo r M e m b e r ID ,
M e m b e r n a m e , P ro fe s s io n o f th e m e m b e r, M e m b e r A d d re s s , M e m b e r c o n ta c tin g
n u m b e r, M e m b e r e n try d a te .
\. M em ber ID - N um ber
M em N am e - T ext
P ro fe s s io n - T ext
M em A d d re s s - M em o
M em C o n t N u m b e r-T e x t
M em D a te - D a te /T im e
~ B o o k T a b le - it h a s s e v e n c o lu m n s (B o o k _ ID , B o o k _ N a m e , B ook_T ype, A u th o r,
B ook ID -N u m b e r
B ook N am e - T ext
B o o k _ T y p e -T e x t
A u th o r -T e x t
C o p ie s - N um ber
D a te _ E n try - D a te /T im e
~ F in e T a b le - it has S IX c o lu m n s (F in e _ ID , M e m _ ID , T ra n s _ ID , R e t_ ID ,
F in e A m o u n t, D a te F in e ).
F in e ID - A u to N u m b e r
14
•
F in e A m o u n t -N u m b e r
~ T ra n s a c tio n T a b le - it has fo u r c o lu m n s (T ra n s_ ID , M e m _ lD , B o o k _ ID ,
D a te Issu e )
~ R e tu rn T a b le - it h a s th re e c o lu m n s (R e U D , T ra n s _ ID , D a te _ R e tu rn )
Relationship
MeftJer_ID
M e r n }• • •" ,
Profession
M em _M ae"
M e r n j:C < U u m e r
Mem_Date DO Mem_ID
1
00 TranJD
R e lJ D
F i:1 e A m o u n t
D a le ] in e
!kd....1l
-
B ook_N am e
B o o k _ T lP "
1
Pubf<am
C q lie s
D a le _ E r tr y
F ig u re 3 .3 .1 : R e la tio n s h ip o f T a b le s
T h e s e s e ts o f e x a m p le d a ta fo r th e fiv e ta b le s a re s h o w n b e lo w :
15
M e m b e r ta b le :
B o o k ta b le :
2 D a ta b a se M a n a g em en t D a ta b a se R aghu M cG ra w - I 2 2 -M a r-0 3
F in e ta b le :
F in e_ ID M em _1D T ra n s_ ID R eU D F in eA m o u n t D a te_ F in e
2 I 14 3 6 2 6 -M a r-0 3
3 I 14 3 3 2 6 -M a r-0 3
4 2 15 4 8 2 6 -M a r-0 3
T r a n s a c tio n ta b le :
2 2 2 2 2 -M a r-0 3
3 2 2 2 2 -M a r-0 3
4 I I 2 2 -M a r-0 3
5 2 1 2 2 -M a r-0 3
6 2 2 2 6 -M a r-0 3
7 I 2 2 2 -M a r-0 3
8 3 2 2 2 -M a r-0 3
9 2 I 1 5 -M a r-0 3
10 I I 2 2 -M a r-0 3
11 2 1 2 2 -M a r-0 3
12 I I 2 8 -M a r-0 3
16
.J.
R e tu rn ta b le :
Rctum_ID Tran_ID Date_Return
I 12 2 6 -M a r-0 3
2 13 2 9 -M a r-0 3
3 14 2 6 -M a r-0 3
4 15 2 6 -M a r-0 3
5 16 2 9 -M a r-0 3
6 17 3 1 -M a r-0 3
in th e p ro je c t.
17
y
Chapter 4
Software Design
4.1 Definition
" b lu e p rin t" fo r c o n s tru c tin g s o ftw a re . In itia lly , th e b lu e p rin t d e p ic ts a h o lis tic v ie w of
and b e h a v io u ra l re q u ire m e n ts .
F ig u re 4 .1 : Home page
18
O " velO p lllen t ofth e tlb rd ry " 1,m agem en t S Y lO tem [M em b en h lp F orm ) _ ." " '- ~ '! i i i ? i i
M e m b e r D e ta il I n f o r m a tio n
M•••. IO: 11
0_ fSls;;:~;i;.;:=======:::J
A d d - e n : 1 4 1 A G ~ A O G d .W e s tk 8 W 5 1 ~ .
D haka 125
______ r:J
,..
M_
C ortedN ..-nber{tt
D.
19'11$G 4'-
1 3 I2 2 J2 O O 3 -' _I
--'
F ig u re 4 .2 : L o c a tio n p a g e re v e a ls M e m b e r in fo rm a tio n
.J 19
D e v e lo p m e n t o r th e L IL r a r y " 1 < ln a l;J e m e n t S Y ite m - (H o o k D e ta il In fo r m a tio n fo rm ) _
B o o k D e ta il I n f o r m a tio n
B o o k T w e : I P r D lJ a T lI I 'W I g ,~ .!1
A I .6 o r ll~ I L , . Bryn
"""""'"
Noof Cqlin:
I!T.T"'." •••••
12
;;;:::=========:;;;;:=====:J
CqliB
F ig u r e 4 .3 : L o c a tio n p a g e r e v e a ls B o o k in f o r m a tio n
• .1
20
.•. _- B o o k Issu e
B o a k IO : ]1 --=.J
!JII!!ll'" ------------1lIIIIII
rSo::le<:tion
Twe---------,
B o o k D e ta il In fo rm a tio n
"""""O M rl------a::l.
r ~B ookTp
r ••••••••
-,
~I'li
B " 'T _ ~ ~ ~
OK I '""" I
21
Dt:vduplilent Ilf 'he l,brdry "1dndgement System - (Return Book] ~
••• _ H o I>
R e tu r n B o o k
Enlerl_lD: , I
----
"-I
. .l a u e O e t * - - - - - - - - - - - - - - - - - - - ~
I D"""_I o. of RiIIUn: I II
fm e , ifa n y .
>
22
Dl':\lelopml:"nt of the lIbrary Manageml':nt System Report ~-_ ~_ ~ ~-_ -_ ====...:....... .,.....,.,.....~
) X
•••••••
SH'
1
I''''''' 3 n I~ ~ I , d'
~~I'1J"
- -.
D e ta ils M e m b e r I n f o n n a tlo n
F ig u r e 4 .6 : R e p o r t s h o w in g d e ta il M e m b e r in f o r m a tio n
23
-.,
D etails M tm b er In fo n n atlo n
M_erm: 3
M._llr Na.!: M d. R etaul H asan
Pn •••• a: S""''''
A u....: SM m oti, D hob
P".: 5129369
F ig u re 4 .7 : R ep o rt sh o w in g in d iv id u al M em b er in fo rm atio n
>
24
J x ~ 9 1!lXl% :::J IJ I~ ~ 1_•......
' '" I ~ ~I • II"
" •.•••• 1
IIookW :
B ookT ".: ~
A_~r.Lylo fuym I
P'1IIII•••• : Teclun!dil.
N oo f C o o "': 2
25
O e ve lo p n te n t o f th e L .b rd ryM d lld q e n te n t S yste m R e p o rt ----------==-__ -~ --=---=-=-~_-=- -.:;,& i& x
Ix ~ ~ ltlX l% 31J I~ ~ I t of 1
P t_1
26
Development o f th e llb ta ry M anagem ent S y s te m Report ~ _ -- _- =-==-=-- .- ~M- -
,.•.
J X
PI ••••• I
::J
S 9I' ••..•. IJ I~ ~ 1 1 'e ll
~ ~ olJ"
'
In fo n o a tio n
la_Date
•. ,
28-Mar-03
• .. ~
F ig u re 4 .1 0 : R e p o rt sh o w in g d a ily re tu rn e d B o o k (s)
27
"
Software testing is a critical elem ent of software quality assurance and represents the
Tests have been planned before testing begins. During developing the application, the
traces have been kept where and under what conditions will be perform ed. All the tests
are traceable to the librarian requirem ents. The software Seagate Crystal Report has been
M inim um configurations of the hardware required for the developed software are
described below:
Requirements Details
Processor 1. Recom m ended Processor: Pentium III or above
recom m ended)
2. M inim al installation: 13 GB
28
..•
4.5 Documentation and User's Manual Creation
Documentation is the process of making the whole work in a document (like a file
in a Microsoft Word). It helps the future system analyst or programmer to change
or update the system.
.•.
'
29
Chapter 5
5.1 Conclusion
a p p re c ia te d fo r th e fo llo w e rs to g iv e s o m e th in g b e tte r.
5.2 Recommendations
d u e to its p la tfo rm in d e p e n d e n c y .
2) In th is s o ftw a re th e re is n o p ro v is io n o n p a ssw o rd s y s te m . It c a n b e a d o p te d in th e
s y s te m .
30
J
R e fe r e n c e s
31
A p p en d ix
frm A b ou t.frm
O ption E xplicit
P riv a te S u b C o m m a n d l_ C lic k O
U n lo a d Me
End Sub
P riv a te S u b c m d C lo s e _ C lic k O
U n lo a d Me
End Sub
P riv a te S u b c m d N e w _ C lic k O
, On Error OoTo eIT _cm dN ew _C lick
If c m d N e w .C a p tio n ~ " A d d N e w M e m b e r" T hen
rs M e m .A d d N e w
cm dN ew .C aption = "Save"
E ls e
rsM em .U pdatc
rsM em .M oveL ast
cm dN ew .C aption = "A dd N ew M em ber"
E n d If
End Sub
P riv a te S u b c m d N e x t_ C lic k O
If N o t rs M e m .E O F T hen
rsM cm .M oveN ext
E ls e
P riv a te S u b c m d P re v _ C lic k O
If N o ! rs M e m .B O F T hen
rsM em .M oveP revious
E ls e
, -i-
)
'f M sg B o x " Y o u a re in F irst R eco rd " , v b O K O n ly , m o d C o n tro l.m sg T itlc
End If
End Sub
D im o T ex t A s T ex tB o x
'B in d th e text b oxes to th e d ata p rovid er
F or E ach oT ext In M e.field s
S et o T ex t.D a ta S o u rce = rsM em
N ext
End Sub
Option Explicit
- II -
'I End Sub
P riv ate S u b F o rm _ L o ad ()
C alen d arl.D ay ~ D ay (D ate)
C alen d arl.M o n th ~ M o n th (D ate)
C alendarl.Y ear = Y ear(D atc)
End Sub
D im oT ext A s T extB ox
'B ind the text boxes to the data provider
F o r E aeh o T ex tln M e.field s
Set oT ext.D ataSourcc = rsM em
N ext
End Sub
E n d If
End Sub
If N o t rsM em .B O F T h en
rsM em .M ovePrevious
E lse
M sg B o x "V o u a re in F ir s t R e c o r d " , v b O K O n ly , m o d C o n tr o l.m s g T itle
End If
End Sub
- III -
fields(lndex).Text ~ CStr(Val(fields(lndex)))
End If
End Sub
cmbBookType.Clear
Case 0
fN am e = "B ook_T ype"
SeiLabeI ~ "Book Type"
C ase I
fN am e = "A uthor"
SelLa bel = "A uthor N am e"
C ase 2
fN am e = "Publication"
SelL abel = "Publication N am e"
Case 3
fN am e = "B ook_N am e"
SelL abel = "B ook N am e"
End Select
End If
rsVaLOpen "selecl " & tName & " from tbIBookDetails Order by " & IName, DBCon.condb,
adO penStatic, adL ockO ptim istic
frm ID R eport.frm
O ption E xplicit
- iv-
\
D im r s lD A s A D O D B .R e c o r d s e t
S e t r s lD = N e w A D O D B .R e c o r d s e t
rs/D .O pen strS Q L . D B C on.condb, adO penS tatic, adL ockO ptim istic
W hile N ot rsID .E O F
r s lD .M o v e N e x t
W end
C om boJ.L istIndex ~ 0
L abel I.C aption ~ IblC aption
E nd S ub
f r m M a in .f r m
O p t io n E x p lic it
E nd S ub
. v.
Private Sub mnuExit_CliekO
DBCon.CloseConnection
End Sub
frm M em ber.frm
Option Explicit
Dim WithE vents rsM em As ADODB.Recordset
- VI -
)
rsM em .M oveN cxt
E ls e
M sgBox "Y ou are in Last R ecord", vbO K O nly, m odC ontrol.m sgTitlc
E n d lf
End Sub
P riv a te S u b e m d P re v _ C lie k O
If N o t rs M e m .B O F T hen
rsM em .M ovePrevious
E ls e
M sgBox "Y ou are in First R ecord", vbO K O nly, m odC ontrol.m sgTitlc
E n d If
End Sub
End Sub
P riv a te S u b c m d U p d a te _ C lic k O
rsM em .U pdate
End Sub
P riv a te S u b F o rm _ L o a d O
Set rsM em = N ew A D O D B.R ecordset
rsM em .O pen "select * from tblM em berD etails O rder by M em ber_JD ", D BC on.condb, adO pcnStatic,
adLockO ptim istic
D im oText A s TextBox
'Bind the text boxes to the data provider
For E aeh oT ext In M e .tie ld s
Set oText.D ataSource = rsM cm
N ext
'# # -'1 '1 '1 -# # ' M c d iu m d a te (U S ). E x a m p le : 2 0 -M a y -9 2
End Sub
frm O pen.frm
O ption Explicit
P riv a te S u b F o rm L oadO
End Sub
frm R eport.frm
O p tio n E x p lic it
D im c rx R e p o rt A s C R A X D R T .R e p o rt
D im c rx S u b R e p o rt A s C R A X D R T .R e p o rt
- vii .
.1
D im i A s In te g e r
F o r E a c h c rx D a ta b a s e T a b le In c rx R e p o rt.D a ta b a s e .T a b le s
c rx D a ta b a s e T a b le .L o c a tio n = A p p .P a th & " \m d b s \L ib ra ry M a n a g c m e n tS y s .m d b "
N e x t c rx D a ta b a s e T a b le
End Sub
End Sub
P riv a te S u b F o n n _ L o a d O
D im c u rR A s S trin g , R c p In d e x A s In te g e r
c u rR = m o d C o n tro l.C u rrR e p o rt
If c u rR ~ "D IB " T h e n
R e p ln d c x ~ 1
E ise lf c u rR ~ "D R B " T h e n
R e p ln d e x ~ 2
E lse lf c u rR = "D M L " T h e n
R e p ln d e x ~ 3
E lse lf c u rR ~ "IM I" T h e n
R e p ln d e x ~ 4
E lse lf c u rR ~ "D B L " T h e n
R e p ln d e x ~ 5
E ise lf c u rR ~ "1 8 1 " T h e n
R e p ln d c x ~ 6
E n d If
S c tS u b R e p o rtL o a c tio n
C R V ic w e r 1 .R e p o rtS o u rc e = c rx R e p o rt
'c a ll fo rm re s iz e to v ie w re p o rt
F o rm _ R e s iz e
- V111 -
\
C R V iew er I. V icw R cp o rt
S crcen .M o u scP o in ter = 0
End Sub
P riv a te S u b F o n n _ R csizeO
C R V ie w e rl.T o p ~ 0
C R V ie w e rl.L e l\ ~ 0
C R V icw er I.H eig h t = S ca leH cig h t
C R V ie w e rl.W id th ~ S c a lc W id th
End Sub
Issu eB o o k .frm
O p tio n E x p licit
D im W ith E v cn ts rslssu e I\s A D O D B .R cco rd set
D im A d d N cw T ra n A s B o o lea n
P riv a te S u b c m d B o o k F in d _ C lic k O
frm F in d B o o k .S h o w I
End Sub
P riv a te S u b c m d C lo s c _ C lic k O
U n lo a d Me
End Sub
P riv a te S u b c m d O K _ C lic k O
S et rslssu e " '"N ew A D O D B .R eco rd set
rslssu e.O p cn " select * fro m tb lT ra n sa ctio n " , D B C o n .co n d b , a d O p e n S ta tic , a d L o ck O p tim istic
rslssu c.A d d N cw
rs ls s u e .fie ld s (" M e m _ ID " ) ~ V a l(lx tM c m (O ).T e x t)
rs ls s u e .fie ld s (" B o o k _ ID " ) ~ V a l(tx tM e m ( I ).T e x t)
rs ls s u e .lie ld s (" D a te _ Is s u e " ) ~ C D a te (tx tM e m (2 ).T e x t)
rslssu e. U p d a te
A d d N cw T ra n = T ru e
rslssu e.M o v eL a st
U n lo a d Me
End Sub
P riv a te S u b F o rm _ L o a d O
tx tM e m (2 ).T e x t ~ D a te
A d d N e w T ra n ~ F a ls e
End Sub
P riv a te S u b L a b e l8 _ C lic k O
End Sub
If A d d N e w T ra n ~ T ru e T h e n
M sgB ox " Y o u r Is s u e ID : "+ C S tr(rs ls s u e .fic ld s (" T ra n s _ ID " )). v b O K O n ly , m o d C o n tro l.m s g T itle
M sg B o x " Y o u h a v cto retu rn b o o k o n o r b efo re" + C S tr(D a teR et) + ". O th erw ise y o u h a v e to p a y
fin e " + C S tr(m o d C o n tro l.F in e A m t) + " Tk. p e rd a y " , v b O K O n ly , m o d C o n tro l.m s g T itlc
) A ddN ew T ran = F alse
rsR e t.O p e n "S E L E C T ' FROM tb lR e tu rn " , D B C o n .c o n d b , a d O p e n S ta tic , a d L o c k O p tim istic
rsR cL A ddN ew
rsR ct.ficlds("T ran _'D " ) = rslssuc.ficlds( "T rans_10")
rsR eL fields("D atc_R ctum ") = D atcR et
rsR et.U pdatc
r s R e L C lo s c
Set rsR ct = N othing
E n d If
End Sub
P r iv a te S u b tx tM e m _ K e y P r e s s (ln d c x I\s In te g e r , K e y A s c ii A s In te g e r )
If In d e x ~ 0 A n d K e y A sc ii ~ 13 T hen
D im rsM em F ind A s A D O D B .R ccordset
O ption E xplicit
D im rsB o o k A s A D O D B .R c c o rd se t
D im rsM em A s A D O D B .R ecordset
D im rsT ra n A s A D O D B .R e c o rd se t
D im rsR etum A s A D O D B .R ecordset
D im F ine A s Single
P riv a te S u b c m d C lo se _ C lic k O
U n lo a d M e
End Sub
P riv a te S u b c m d O K _ C lic k O
D im rsF ine A s A D O D B .R ccordset
If F in e > 0 T hen
Set rsF ine = N ew A D O D B .R ecordset
rsF inc.O pen "select'" from tbIF inc", D B C on.condb, adO penStatic, adL ockO ptim istic
rsF inc.A ddN ew
rsF in e .fie ld s(" M e m _ ID " ) ~ V a l(m c m F ie ld (O ).T e x t)
rsF in c .fic ld s(" T ra n _ ID " ) ~ rsR e tu rn .!ie ld s(" T ra n _ ID " )
rsfin c .tie ld s(" R e t_ ID " ) = rsR e tu m .tie ld s(" R e tu rn _ ID " )
rsF inc.ficlds(U F ineA m ount") = F ine
• x •
)
)
rsfin c.ficld s(n D a tc_ F in e" ) = D a te
rs F in e .U p d a te
E n d If
U n lo a d Me
End Sub
E n d If
End Sub
End Sub
IfIn d e x ~ 0 A n d K e y A s c ii ~ 13 T hen
D im rsM em F in d A s A D O D 1 3 .R eco rd set
Dim days As Integer
'R etu rn P a rt
S et rsR etu rn = N ew A D O D B .R eco rd set
rs R e tu rn .O p c n " S e le c t' fro m tb lR e tu rn w h e re T ra n _ ID ~" & T rim (tx tM e m (O ).T e x t),
D B C o n .co n d b , a d O p en S ta tic, a d L o ck O p tim istic
rs R c tu rn .fic ld s (" D a tc _ R c tu rn " ) ~ D a te
rsR etu m .U p d a te
rsT ra n .O p en " S elect * fro m tb lT ra n sa ctio n w h ere T ra n sJ D =" & rsR etu rn .fieJ d s(" T ra n _ ID " ).
D B C o n .c o n d b , a d O p e n S ta tie , a d L o c k O p tim is tie
- x i-
IssueField(O ).Tcxt ~ rsTran./ields("D atc_Issuc")
IssueFicld( I ).Tcxt ~ D ate
IssucField(2).Text ~ Fine
'M e m b e r part
S et rsM em = N ew A D O D B .R c c o r d s e t
, Book Part
S et rsB ook = N ew A D O D B .R e c o r d s e t
rsB o o k.O p en "S elect * fro m tb IB o o kD ctails w h ere B o o k_ID =" & rs T ra n .tie ld s ("B o o k _ ID "),
D BCon.condb, adO penStatic, adLockO ptim istic
BookField(O ).Text ~ rsBook./ields("Book_lD ")
BookField( I ).Text ~ rsBook./ields("Book_N am e")
BookField(2).Text ~ rsBook./iclds("A uthor")
BookField(3).Text ~ rsBook.lields("Book_ Type")
BookField(4).Tcxt ~ rsBook.liclds("Publication")
End If
End If
End Sub
- xii -