Вы находитесь на странице: 1из 6

EXNO: 13 LIBRARY MANAGEMENT SYSTEM

PROBLEM STATEMENT:

The purpose of library management system is mainly to provide automation to the library. The
library system buys the necessary book and does updates in the system. The Librarian can assign
a unique id and password for the new members. The members can login the system with this.
The new books can be entered into the system and assigned with a unique book id. When the
book is issued, the issue date and the due date is updated automatically. When the book is
returned fine amount is calculated based on number of days from the due date.

DATABASE DESIGN:
LIBRARY MANAGEMENT SYSTEM

UML DIAGRAMS

STATECHART DIAGRAM

CLASS DIAGRAM
DEPLOYMENT DIAGRAM

PACKAGE DIAGRAM:
MDI FORM:
Private Sub entry_Click()
Form1.Show
End Sub
Private Sub issue_Click()
cmdok.Show
End Sub
Private Sub MDIForm_Load()
initialize
End Sub
Private Sub return_Click()
Form4.Show
End Sub
Private Sub user_Click()
Form2.Show
End Sub

FORM 1:
Private Sub cmdsave_Click()
query = "insert into login ( studentid , rollno , name , branch ) values (" & txtid & " , '" & txtrollno & "' , '
" & txtname & " ' , ' " & txtbranch & " ' )"
Set rs = db.Execute(query)
End Sub
Private Sub cmdexit_Click()
Unload Me
End Sub

FORM 2:
Private Sub cmdupdate_Click()
query = "insert into book ( bookno , name , author , cost ) values (" & txtbookno & " , ' " & txtname & " ' ,
' " & txtauthor & " ' , " & txtcost & " )"
Set rs = db.Execute(query)
End Sub

FORM 3:
Private Sub cmdok_Click()
query = "insert into issue ( studentid , bookid , issuedate , duedate,returned ) values (" & txtid & " , " &
txtbookno & " , '" & txtissue & "' ,'" & txtdue & "','no')"
Set rs = db.Execute(query)
End Sub
Private Sub txtbookno_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtissue.Text = Date
txtdue.Text = DateAdd("d", 15, Date)
cmdok.SetFocus
End If
End Sub
Private Sub txtid_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
query = "select count(*) from issue where studentid=" & txtid & " and returned='no'"
Set rs = db.Execute(query)
If rs(0) >= 3 Then
MsgBox ("student has already borrowed three books")
txtid.SetFocus
Else
txtbookno.SetFocus
End If
End If
End Sub

FORM 4:
Private Sub cmdreturn_Click()
query = "select * from issue where studentid=" & txtid & " and bookid='" & txtbookno & "' and
returned='no'"
Set rs = db.Execute(query)
txtissue = rs("issuedate")
txtreturn = rs("duedate")
duedate = CDate(rs("duedate"))
txtfine = 0
If DateDiff("d", duedate, Date) > 0 Then
txtfine = DateDiff("d", duedate, Date)
End If

End Sub
Private Sub cmdreturnbook_Click()
query = "update issue set returned='yes' where studentid=" & txtid & " and bookid='" & txtbookno & "'"
db.Execute (query)
End Sub

OUTPUT

Вам также может понравиться