Library Management VB Project Report
Library Management VB Project Report
LOGIN FORM
Public Class Form5
End If
End Sub
Private Sub
TextBox1_TextChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
TextBox1.TextChanged
End Sub
End Sub
End Class
MDI FORM
Imports System.Windows.Forms
Private Sub
InformationToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
InformationToolStripMenuItem.Click
Form1.Show()
End Sub
Private Sub
IssueToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
IssueToolStripMenuItem.Click
Form2.Show()
End Sub
Private Sub
ReturnToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
ReturnToolStripMenuItem.Click
Form3.Show()
End Sub
Private Sub MDIParent1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
BOOK INFORMATION FORM
Imports System.Data.OleDb
Public Class Form1
Dim con As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=D:\abc1\abc1\pplibraty\
book_info.mdb"
Dim ds As New DataSet
Dim da As New OleDbDataAdapter
Private Sub Button2_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles savebtn2.Click
Try
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub updatebtn_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
updatebtn.Click
Try
ds.Clear()
Dim QRY As String
QRY = "update RK SET
BOOK_NAME='" & BNAMETXT.Text & "',class
='" & CLASSTXT.Text & "',author = '" &
ATXT.Text & "' WHERE BOOK_ID=" &
BIDTXT.Text
da = New
OleDbDataAdapter(QRY, con)
da.Fill(ds)
MsgBox("RECORD UPDATED")
updatebtn.Enabled = False
0:
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
If ds.Tables(0).Rows.Count >
0 Then
BIDTXT.Text =
ds.Tables(0).Rows(0)(0)
BNAMETXT.Text =
ds.Tables(0).Rows(0)(1)
CLASSTXT.Text =
ds.Tables(0).Rows(0)(2)
ATXT.Text =
ds.Tables(0).Rows(0)(3)
updatebtn.Enabled = True
deletebtn3.Enabled =
True
Else
MsgBox("record not
search")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Catch ex As Exception
MsgBox(ex.Message)
End Try
BIDTXT.Clear()
BNAMETXT.Clear()
CLASSTXT.Text = ""
ATXT.Clear()
End Sub
Private Sub Form1_Load(ByVal sender
As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Sub
End Class
BOOK ISSUE
Imports System.Data.OleDb
MsgBox("record inserted")
cn.Close()
End Sub
End Sub
End Sub
End Sub
End Class
BOOK RETURN
Imports system.data.oledb
Try
Dim qry As String
da = New
OleDbDataAdapter(qry, con)
da.Fill(ds)
MsgBox("recored Inserted")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
If ds.Tables(0).Rows.Count >
0 Then
stu_id.Text =
ds.Tables(0).Rows(0)(0)
b_id.Text =
ds.Tables(0).Rows(0)(1)
dtp1.Value =
ds.Tables(0).Rows(0)(2)
Else
MsgBox("record not
search")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Dim d As TimeSpan
Dim d1 As Date
Dim i As Integer
d =
Date.Today.Subtract(dtp2.Value.Date)
i = -1 * d.Days
d1 =
dtp1.Value.Date.AddDays(7)
dtp2.Value = d1
dtxt.Text = i
ftxt.Text = Val(dtxt.Text) *
1
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Sub
End Class