毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

VB图书管理系统源代码 第2页

更新时间:2009-7-10:  来源:毕业论文
VB图书管理系统源代码 第2页
 Dim dlg As 出版社信息
            dlg = New 出版社信息
            dlg.ShowDialog()
        Else
            MessageBox.Show("登录失败!", "登录", MessageBoxButtons.OK, _
            MessageBoxIcon.Stop)
        End If
    End Sub
    Private Sub btn_借阅信息_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_借阅信息.Click
        If UserCheck(sender, e) Then
            Dim dlg As 借阅信息
            dlg = New 借阅信息
            dlg.ShowDialog()
        Else
            MessageBox.Show("登录失败!", "登录", MessageBoxButtons.OK, _
            MessageBoxIcon.Stop)
        End If
End Sub
Private Sub btn_退出_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_退出.Click
        End
    End Sub
    Private Sub btn_查询_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_查询.Click
        If UserCheck(sender, e) Then
            Dim dlg As 综合查询
            dlg = New 综合查询
            dlg.ShowDialog()
        Else
            MessageBox.Show("登录失败!", "登录", MessageBoxButtons.OK, _
            MessageBoxIcon.Stop)
        End If
    End Sub
    Private Sub btn_报表_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_报表.Click
        If UserCheck(sender, e) Then
            Dim dlg As 报表窗体
            dlg = New 报表窗体
            dlg.ShowDialog()
        Else
            MessageBox.Show("登录失败!", "登录", MessageBoxButtons.OK, _
            MessageBoxIcon.Stop)
        End If
    End Sub
    Private Sub btn_管理者信息_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_管理者信息.Click
        If UserCheck(sender, e) Then
            Dim dlg As 管理者信息
            dlg = New 管理者信息
            dlg.ShowDialog()
        Else
            MessageBox.Show("登录失败!", "登录", MessageBoxButtons.OK, _
            MessageBoxIcon.Stop)
        End If
    End Sub
    Private Sub Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel2.Paint
    End Sub
End Class
附1.2读者信息窗体设计代码如下:
Public Class 读者信息
    Inherits System.Windows.Forms.Form
#Region " Windows 窗体设计器生成的代码 "
‘此处省略主窗体设计代码
#End Region
    Private Sub GroupBox_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox.Enter
    End Sub
    Private Sub edit证号_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles edit证号.TextChanged
    End Sub
    Private Sub OleDbDataAdapter1_RowUpdated(ByVal sender As System.Object, ByVal e As System.Data.OleDb.OleDbRowUpdatedEventArgs) Handles OleDbDataAdapter1.RowUpdated
    End Sub
    Private Sub 读者信息_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Me.LoadDataSet()
        Catch eLoad As System.Exception
            System.Windows.Forms.MessageBox.Show(eLoad.Message)
        End Try
        Me.objLib读者信息_PositionChanged()
    End Sub
    Public Sub LoadDataSet()
        Dim objDataSetTemp As 图书馆管理.Lib读者信息
        objDataSetTemp = New 图书馆管理.Lib读者信息
        '临时数据集objDataSetTemp保存从FillDataSet()函数调用中返回的记录
        '如果未出错则填充到主数据集 "objLib读者信息"中
        Try
            Me.FillDataSet(objDataSetTemp)
        Catch eFillDataSet As System.Exception
            Throw eFillDataSet
        End Try
        Try
            objLib读者信息.Clear()
            objLib读者信息.Merge(objDataSetTemp)
        Catch eLoadMerge As System.Exception
            Throw eLoadMerge
        End Try
    End Sub
    Public Sub FillDataSet(ByVal dataSet As 图书馆管理.Lib读者信息)
        '实现打开连接,将OleDbDataAdapter1中的数据添加到数据集,关闭连接。
        dataSet.EnforceConstraints = False
        Try
            Me.OleDbConnection1.Open()
            Me.OleDbDataAdapter1.Fill(dataSet)
        Catch fillException As System.Exception
            Throw fillException
        Finally
            dataSet.EnforceConstraints = True
            Me.OleDbConnection1.Close()
        End Try
    End Sub
    Private Sub objLib读者信息_PositionChanged()
        Me.lblNavLocation.Text = (((Me.BindingContext(objLib读者信息, _
"读者信息").Position + 1).ToString + "的") _
+ Me.BindingContext(objLib读者信息, "读者信息").Count.ToString)
    End Sub
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        '首先清除控件中的内容然后调用AddNew方法添加新记录如果出错显示信息
        '调用函数显示记录数和当前记录位置
        Try
            Me.BindingContext(objLib读者信息, "读者信息").EndCurrentEdit()
            Me.BindingContext(objLib读者信息, "读者信息").AddNew()
        Catch eEndEdit As System.Exception
            System.Windows.Forms.MessageBox.Show(eEndEdit.Message)
        End Try
        Me.objLib读者信息_PositionChanged()
    End Sub
    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

VB图书管理系统源代码 第2页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。