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

VB图书管理系统毕业论文 第12页

更新时间:2009-8-15:  来源:毕业论文
VB图书管理系统毕业论文 第12页
If Check5.Value = vbChecked Then
   If Trim(sql) = "" Then
      sql = "书籍编号='" & Trim(Text4.Text & " ") & "'"
   Else
      sql = sql & "and  书籍编号='" & Trim(Text4.Text & " ") & "'"
   End If
End If
If Trim(sql) = "" Then
   MsgBox "请选择查询方式!", vbOKOnly + vbExclamation
   Exit Sub
End If
sql = "select * from 书籍信息 where " & sql
rs_findbook.CursorLocation = adUseClient
rs_findbook.Open sql, conn, adOpenKeyset, adLockPessimistic
DataGrid1.AllowAddNew = False
DataGrid1.AllowDelete = False
DataGrid1.AllowUpdate = False
Set DataGrid1.DataSource = rs_findbook
'rs_findbook.Close
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If Trim(book_num) = "" Then
   MsgBox "请选择要借阅的图书!", vbOKOnly + vbExclamation
   Exit Sub
End If
If panduan = "是" Then
   MsgBox "此书已被借出!", vbOKOnly + vbExclamation
   Exit Sub
End If
frmborrowbook.Show
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
book_num = DataGrid1.Columns(0).CellValue(DataGrid1.Bookmark)
panduan = DataGrid1.Columns(7).CellValue(DataGrid1.Bookmark)
End Sub
Private Sub Form_Load()
Dim rs_find As New ADODB.Recordset
Dim sql As String
sql = "select * from 图书类别"
rs_find.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_find.MoveFirst
If Not rs_find.EOF Then
   Do While Not rs_find.EOF
      Combo1.AddItem rs_find.Fields(0)
      rs_find.MoveNext
   Loop
   Combo1.ListIndex = 0
End If
rs_find.Close
End Sub
7、文件名 frmaddreaderstyle(frmaddreaderstyle.frm)
功能说明:添加读者的类别。
源代码:
Option Explicit
Dim rs_readerstyle As New ADODB.Recordset
Private Sub Command1_Click()
Dim sql As String
If Trim(Text1.Text) = "" Then
   MsgBox "读者种类不能为空", vbOKOnly + vbExclamation, ""
   Text1.SetFocus
   Exit Sub
End If
If Trim(Text2.Text) = "" Then
   MsgBox "借书数量不能为空", vbOKOnly + vbExclamation, ""
   Text2.SetFocus
   Exit Sub
End If
If Trim(Text3.Text) = "" Then
   MsgBox "借书期限不能为空", vbOKOnly + vbExclamation, ""
   Text3.SetFocus
   Exit Sub
End If
If Trim(Text4.Text) = "" Then
   MsgBox "有限期限不能为空", vbOKOnly + vbExclamation, ""
   Text4.SetFocus
   Exit Sub
End If
sql = "select * from 读者类别 where 种类名称='" & Text1.Text & "'"
rs_readerstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs_readerstyle.EOF Then
   rs_readerstyle.AddNew
   rs_readerstyle.Fields(0) = Trim(Text1.Text)
   rs_readerstyle.Fields(1) = CInt(Text2.Text)
   rs_readerstyle.Fields(2) = CInt(Text3.Text)
   rs_readerstyle.Fields(3) = CInt(Text4.Text)
   rs_readerstyle.Update
   MsgBox "添加读者类别成功!", vbOKOnly, ""
   rs_readerstyle.Close
   Text1 = ""
   Text2 = ""
   Text3 = ""
   Text4 = ""
Else
   MsgBox "读者类别重复!", vbOKOnly + vbExclamation, ""
   Text1.SetFocus
   Text1.Text = ""
   rs_readerstyle.Close
   Exit Sub
End If
End Sub
8、文件名 frmmodifyreaderstyle(form)
功能说明:读者类别管理,可以查询、删除、修改读者的信息。
源代码:
Option Explicit
Dim rs_reader As New ADODB.Recordset
Private Sub cmdcancel_Click()
   rs_reader.CancelUpdate
   DataGrid1.Refresh
   DataGrid1.AllowAddNew = False
   DataGrid1.AllowUpdate = False
   cmdmodify.Enabled = True
   cmddel.Enabled = True

 << 上一页  [11] [12] [13] [14] [15] [16] 下一页

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

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