Project On Library Management System: (I) Moham Mad Shakil Ansari 06
Project On Library Management System: (I) Moham Mad Shakil Ansari 06
Prepared By:
(i)Moham mad Shakil Ansari 06
TABLES
There are three tables in this project, i.e. (i)Book_Det (ii)Member_Det (iii)Issue
Book_Det: Stores information of all the books in the library.It has following description:Name Null? Type
----------------------------------------- -------- ------------BOOK_ID BOOK_ISBNNO BOOK_NAME BOOK_EDITION BOOK_AUTHOR BOOK_PUBLISHER BOOK_DEPT BOOK_PRICE NOT NULL VARCHAR2(4) NOT NULL VARCHAR2(15) VARCHAR2(50) VARCHAR2(4) VARCHAR2(15) VARCHAR2(15) VARCHAR2(6) NUMBER(4)
1.
Member_Det: Stores information of all the Members in Library. It has following description:Name Null? Type
----------------------------------------- -------- -------------MEM_ID MEM_NAME MEM_ADD MEM_PH MEM_FEE MEM_RENDATE NOT NULL VARCHAR2(4) VARCHAR2(50) VARCHAR2(100) NUMBER(10) NUMBER(4) DATE
2.
Issue: Stores information related to the Books Issued by the members in the library. It has following description:Name Null? Type
----------------------------------------- -------- -----------MEM_ID BOOK_ID DT_OF_ISSUE DT_OF_RETURN VARCHAR2(4) VARCHAR2(4) DATE DATE
LIBRARY
H AS
ADDR ESS FE E
CONTA INS
MEMBERS
DT_OF_R ET
MEM_ID
REN_DA TE
ISS UE
BOOKS
AUTH OR PUBLIS HER PRIC E
BOOK_ID BOOK_NA ME
PROBLEM STATEMENT
The library is an important module for any educational institute. Library may contain thousands of books, and its management is a very tough job. The care should be taken for proper distribution of the resources. It should be managed in a manner so that its resources are used efficiently and conveniently. For this rules and rights should be provided to each user. Manual management of such a large system is a very tedious job and errors may occur sometimes. This may affect the integrity and consistency of the system resulting in an improper resource distribution. Here we have provided a full-fledged library management system like adding new members & Books to the library, deleting members & Books. The issue and return facility of Books is provided with a fine if Books are not returned before the return Date.Seaching facility of Books and Members is also provided along with the Reports of Books and Members, which will change the conventional manual management with a computerized library management system. We have tried our best to provide efficient and convenient transitory operations for librarian and users.
LOGIN FORM
End Sub Private Sub mnuissbk_Click() frmissue.Show End Sub Private Sub mnumdet_Click() datmem_det.Show End Sub Private Sub mnuMemdet_Click() frmaddmembers.Show End Sub Private Sub mnurbook_Click() frmreturn.Show End Sub Private Sub mnusearchBooks_Click() frmsearchbk.Show End Sub Private Sub mnusmem_Click() frmsearchmem.Show End Sub
Adomdet.Recordset.AddNew txtmid.SetFocus End Sub Private Sub cmdmdel_Click() frmdelmemb.Show End Sub Private Sub cmdmsearch_Click() frmsearchmem.Show End Sub Private Sub cmdsave_Click() cmdmadd.Visible = True cmdsave.Visible = False Adomdet.Recordset.Fields("MEM_ID").Value = txtmid.Text Adomdet.Recordset.Fields("MEM_NAME").Value = txtmname.Text Adomdet.Recordset.Fields("MEM_ADD").Value = txtmadd.Text Adomdet.Recordset.Fields("MEM_PH").Value = txtmphno.Text Adomdet.Recordset.Fields("MEM_FEE").Value = txtmfees.Text Adomdet.Recordset.Fields("MEM_RENDATE").Value = txtmrenDate.Text Adomdet.Recordset.Update Adomdet.Refresh End Sub Private Sub Form_Load() cmdsave.Visible = False End Sub
Bookdet.Recordset.Fields("Book_Name").Value = txtbname.Text Bookdet.Recordset.Fields("Book_Edition").Value = txtbedition.Text Bookdet.Recordset.Fields("Book_Author").Value = txtbauthor.Text Bookdet.Recordset.Fields("Book_Publisher").Value = txtbpub.Text Bookdet.Recordset.Fields("Book_Dept").Value = txtbdept.Text Bookdet.Recordset.Fields("Book_Price").Value = txtbrs.Text Bookdet.Recordset.Update Bookdet.Refresh End Sub Private Sub cmdbsearch_Click() Unload Me frmsearchbk.Show End Sub Private Sub cmdclose_Click() Unload Me End Sub Private Sub Form_Load() cmdbsave.Visible = False End Sub
Adodelb.Recordset.Filter = "Book_ID = '" & strSearch & "'" Else Adodelb.Recordset.Filter = "BOOK_ISBNNO = '" & strSearch & "'" End If If (Adodelb.Recordset.BOF = True And Adodelb.Recordset.EOF = True) Then MsgBox "No Book found" Exit Sub Else MsgBox ("Book Found") frmaddbk.Bookdet.Enabled = False frmaddbk.Show frmaddbk.txtbid.Text = Adodelb.Recordset.Fields("Book_ID").Value frmaddbk.txtbisbn.Text = Adodelb.Recordset.Fields("BOOK_ISBNNO").Value frmaddbk.txtbname.Text = Adodelb.Recordset.Fields("BOOK_NAME").Value frmaddbk.txtbedition.Text = Adodelb.Recordset.Fields("BOOK_EDITION").Value frmaddbk.txtbauthor.Text = Adodelb.Recordset.Fields("BOOK_AUTHOR").Value frmaddbk.txtbpub.Text = Adodelb.Recordset.Fields("BOOK_PUBLISHER").Value frmaddbk.txtbrs.Text = Adodelb.Recordset.Fields("BOOK_PRICE").Value frmaddbk.Caption = "DELETED BOOK DETAILS" frmaddbk.lbltitle.Caption = "Deleted Book Details" frmaddbk.Height = 4980 frmaddbk.Left = 0 frmaddbk.Width = 6090 frmaddbk.Bookdet.Visible = False frmaddbk.cmdbsave.Visible = False frmaddbk.cmdbadd.Visible = False frmaddbk.cmdbdel.Visible = False frmaddbk.cmdbsearch.Visible = False frmaddbk.cmdclose.Visible = False
Adodelb.Recordset.Delete adAffectCurrent End If End If End Sub Private Sub Form_Load() Adodelb.Visible = False Text1.Visible = False End Sub Private Sub optbkid_Click() If optbkid.Value = True Then lblisbn.Visible = False txtisbn.Visible = False lblbID.Visible = True txtid.Visible = True End If End Sub Private Sub optisbn_Click() If optisbn.Value = True Then lblbID.Visible = False txtid.Visible = False lblisbn.Visible = True txtisbn.Visible = True End If End Sub
frmaddmembers.txtmid.Text = Adomdelete.Recordset.Fields("MEM_ID").Value frmaddmembers.txtmname.Text = Adomdelete.Recordset.Fields("MEM_NAME").Value frmaddmembers.txtmadd.Text = Adomdelete.Recordset.Fields("MEM_ADD").Value frmaddmembers.txtmphno.Text = Adomdelete.Recordset.Fields("MEM_PH").Value frmaddmembers.txtmfees.Text = Adomdelete.Recordset.Fields("MEM_FEE").Value frmaddmembers.txtmrenDate.Text = Adomdelete.Recordset.Fields("MEM_RENDATE").Value frmaddmembers.Caption = "DELETED MEMBER DETAILS" frmaddmembers.lbltitle.Caption = "Member Details" frmaddmembers.Height = 4620 frmaddmembers.Left = 0 frmaddmembers.Width = 5760 frmaddmembers.Adomdet.Visible = False frmaddmembers.cmdsave.Visible = False frmaddmembers.cmdmadd.Visible = False frmaddmembers.cmdmdel.Visible = False frmaddmembers.cmdmsearch.Visible = False frmaddmembers.cmdclose.Visible = False Adomdelete.Recordset.Delete adAffectCurrent End If End If End Sub
MsgBox "No Member found" Exit Sub Else MsgBox ("Member Found") frmaddmembers.Adomdet.Enabled = False frmaddmembers.Show frmaddmembers.txtmid.Text = adoms.Recordset.Fields("MEM_ID").Value frmaddmembers.txtmname.Text = adoms.Recordset.Fields("MEM_NAME").Value frmaddmembers.txtmadd.Text = adoms.Recordset.Fields("MEM_ADD").Value frmaddmembers.txtmphno.Text = adoms.Recordset.Fields("MEM_PH").Value frmaddmembers.txtmfees.Text = adoms.Recordset.Fields("MEM_FEE").Value frmaddmembers.txtmrenDate.Text = adoms.Recordset.Fields("MEM_RENDATE").Value frmaddmembers.Caption = "SEARCHED MEMBER DETAILS" frmaddmembers.lbltitle.Caption = "Searched Member Details" frmaddmembers.Height = 4620 frmaddmembers.Left = 0 frmaddmembers.Width = 5760 frmaddmembers.Adomdet.Visible = False frmaddmembers.cmdsave.Visible = False frmaddmembers.cmdmadd.Visible = False frmaddmembers.cmdmdel.Visible = False frmaddmembers.cmdmsearch.Visible = False frmaddmembers.cmdclose.Visible = False End If End If End Sub
Else If (temp = True) Then adobS.Recordset.Filter = "Book_ID = '" & strSearch & "'" Else adobS.Recordset.Filter = "BOOK_ISBNNO = '" & strSearch & "'" End If If (adobS.Recordset.BOF = True And adobS.Recordset.EOF = True) Then MsgBox "No Book found" Exit Sub Else MsgBox ("Book Found") frmaddbk.Bookdet.Enabled = False frmaddbk.Show frmaddbk.txtbid.Text = adobS.Recordset.Fields("Book_ID").Value frmaddbk.txtbisbn.Text = adobS.Recordset.Fields("BOOK_ISBNNO").Value frmaddbk.txtbname.Text = adobS.Recordset.Fields("BOOK_NAME").Value frmaddbk.txtbedition.Text = adobS.Recordset.Fields("BOOK_EDITION").Value frmaddbk.txtbauthor.Text = adobS.Recordset.Fields("BOOK_AUTHOR").Value frmaddbk.txtbpub.Text = adobS.Recordset.Fields("BOOK_PUBLISHER").Value frmaddbk.txtbrs.Text = adobS.Recordset.Fields("BOOK_PRICE").Value frmaddbk.Caption = "SEARCHED BOOK DETAILS" frmaddbk.lbltitle.Caption = "Searched Book Details" frmaddbk.Height = 4980 frmaddbk.Left = 0 frmaddbk.Width = 6090 frmaddbk.Bookdet.Visible = False frmaddbk.cmdbsave.Visible = False frmaddbk.cmdbadd.Visible = False frmaddbk.cmdbdel.Visible = False frmaddbk.cmdbsearch.Visible = False
frmaddbk.cmdclose.Visible = False End If End If End Sub Private Sub Form_Load() Text1.Visible = False adobS.Visible = False End Sub Private Sub optbkids_Click() If optbkids.Value = True Then lblisbns.Visible = False txtisbns.Visible = False lblbids.Visible = True txtids.Visible = True End If End Sub Private Sub optisbns_Click() If optisbns.Value = True Then lblbids.Visible = False txtids.Visible = False lblisbns.Visible = True txtisbns.Visible = True End If End Sub
MsgBox "Matching Member ID or Book ID not found in Book or Member Table", , "Issue Book" Exit Sub Else adob.Recordset.Filter = "MEM_ID='" & strSearch1 & "'" adob.Recordset.Filter = "BOOK_ID = '" & strsearch2 & "'" If (adob.Recordset.BOF = True And adob.Recordset.EOF = True) Then MsgBox "You can Issue This Books", , "Issue Book" adob.Recordset.AddNew adob.Recordset.Fields("MEM_ID").Value = txtmid.Text adob.Recordset.Fields("BOOK_ID").Value = txtbid.Text adob.Recordset.Fields("DT_OF_ISSUE").Value = txtissdate.Text adob.Recordset.Fields("DT_OF_RETURN").Value = txtrdate.Text adob.Recordset.Update adob.Refresh MsgBox "Book Issued Successfully!!!", , "Issue Books" txtmid.Text = "" txtbid.Text = "" txtrdate.Text = "" txtissdate.Text = "" txtmid.SetFocus Else MsgBox ("You cannot issue this Book,It is being already issued") End If End If End If End Sub Private Sub cmdreturn_Click() Unload Me frmreturn.Show
End Sub Private Sub txtbid_LostFocus() issuedet.Recordset.Filter = "Book_ID = '" & txtbid.Text & "'" Set dtabdet.DataSource = issuedet End Sub Private Sub txtissdate_GotFocus() txtissdate.Text = Date End Sub Private Sub txtmid_LostFocus() adoomemdet.Recordset.Filter = "MEM_ID = '" & txtmid.Text & "'" Set dtagrdmdet.DataSource = adoomemdet End Sub Private Sub txtrdate_GotFocus() Dim retdate As Date retdate = Date + 7 txtrdate.Text = retdate End Sub
adob.Recordset.Filter = "MEM_ID='" & strSearch1 & "'" adob.Recordset.Filter = "BOOK_ID = '" & strsearch2 & "'" If (adob.Recordset.BOF = True And adob.Recordset.EOF = True) Then MsgBox "You can Issue This Books " Else issuedate = adob.Recordset.Fields("DT_OF_ISSUE").Value rdate = adob.Recordset.Fields("DT_OF_RETURN").Value Dim datedf, fine As Integer datedf = DateDiff("d", rdate, Now) If (datedf) > 7 Then fine = Abs(2 * (datedf - 7)) MsgBox ("Fine is Rs " & fine) End If adob.Recordset.Delete adAffectCurrent MsgBox ("You have successfully Returned the Book") End If End If End Sub Private Sub txtbid_LostFocus() issuedet.Recordset.Filter = "Book_ID = '" & txtbid.Text & "'" Set dtabdet.DataSource = issuedet End Sub Private Sub txtmid_LostFocus() adoomemdet.Recordset.Filter = "MEM_ID = '" & txtmid.Text & "'" Set dtagrdmdet.DataSource = adoomemdet End Sub
MEMBER REPORT
BOOK REPORT