




免费预览已结束,剩余29页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
VF图书管理系统源代码Private Sub Command1_Click() Dim U As Boolean, P As Boolean, Ok As Boolean With Adodc1 .Refresh Do While Not .Recordset.EOF U = .Recordset.Fields(0).Value = Text1.Text P = .Recordset.Fields(1).Value = Text2.Text If U And P Then e = Text1.Text k = Text2.Text Ok = True Exit Do Else .Recordset.MoveNext End If Loop End With If Ok Then MsgBox 登录成功, , 提示 Form2.Show Unload Me Else MsgBox 登录失败, , 提示 End IfEnd SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Label3_Click()End SubPrivate Sub Command1_Click()Dim U As Boolean With Adodc1 .Refresh Do While Not .Recordset.EOF If Combo1.Text = 编号 Then U = .Recordset.Fields(0).Value = Text7.Text If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If If Combo1.Text = 书名 Then U = .Recordset.Fields(1).Value = Text7.Text If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If If Combo1.Text = 作者 Then U = .Recordset.Fields(2).Value = Text7.Text 字段0为用户名称 If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If If Combo1.Text = 出版社 Then U = .Recordset.Fields(3).Value = Text7.Text 字段0为用户名称 If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If If Combo1.Text = 出版年代 Then U = .Recordset.Fields(4).Value = Text7.Text 字段0为用户名称 If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If If Combo1.Text = 是否借出 Then U = .Recordset.Fields(5).Value = Text7.Text 字段0为用户名称 If U Then Text1.Text = .Recordset.Fields(0).Value Text2.Text = .Recordset.Fields(1).Value Text3.Text = .Recordset.Fields(2).Value Text4.Text = .Recordset.Fields(3).Value Text5.Text = .Recordset.Fields(4).Value Text6.Text = .Recordset.Fields(5).Value Text7.Text = Exit Do Else .Recordset.MoveNext End If End If Loop End With If Adodc1.Recordset.EOF Then MsgBox 没找到相关记录, , 提示 Text1.Text = Text2.Text = Text3.Text = Text4.Text = Text5.Text = Text6.Text = Text7.Text = End If End SubPrivate Sub Command2_Click() Unload Me Form2.ShowEnd SubPrivate Sub Command3_Click()EndEnd SubPrivate Sub Form_Load()End SubDim U As BooleanPrivate Sub Command1_Click()With Adodc1 .Refresh Do While Not .Recordset.EOF U = .Recordset.Fields(0).Value = Text1.Text If U Then Label3.Caption = .Recordset.Fields(1).Value Label5.Caption = .Recordset.Fields(5).Value Label7.Caption = .Recordset.Fields(2).Value Text1.Text = Exit Do Else .Recordset.MoveNext End If LoopEnd WithEnd SubPrivate Sub Command2_Click()Dim P As BooleanWith Adodc2 .Refresh Do While Not .Recordset.EOF P = .Recordset.Fields(0).Value = Text2.Text If P Then Label12.Caption = .Recordset.Fields(1).Value Label13.Caption = .Recordset.Fields(2).Value Label14.Caption = .Recordset.Fields(5).Value Label16.Caption = .Recordset.Fields(0).Value Text2.Text = Exit Do Else .Recordset.MoveNext End If LoopEnd WithEnd SubPrivate Sub Command3_Click()If Label3.Caption = Or Label12.Caption = ThenMsgBox 未登录学生或学生信息不能借书,请先登录!, , 提示Else If Label14.Caption = 是 Then MsgBox 此书已被借出,请更换其它书籍!, , 提示 Else Dim i As Boolean With Adodc1 .Refresh Do While Not .Recordset.EOF i = .Recordset.Fields(0).Value = U If i Then If Label5.Caption = 无 Then .Recordset.Fields(5) = Label16.Caption Label5.Caption = Label16.Caption .Recordset.Fields(2) = Date .Recordset.Update Label7.Caption = .Recordset.Fields(2).Value MsgBox 借书成功,欢迎下次再来!, , 提示 Adodc2.Recordset.Fields(5) = 是 Adodc2.Recordset.Update Label14.Caption = Adodc2.Recordset.Fields(5).Value Else MsgBox 每人限借一本图书,请还书后再借, , 提示 End If Exit Do Else .Recordset.MoveNext End If Loop End With End IfEnd IfEnd SubPrivate Sub Command4_Click()Unload MeForm2.ShowEnd SubPrivate Sub Command5_Click()EndEnd SubPrivate Sub Command1_Click()Dim U As BooleanWith Adodc1 .Refresh Do While Not .Recordset.EOF U = .Recordset.Fields(0).Value = Text1.Text If U Then Label3.Caption = .Recordset.Fields(1).Value Label5.Caption = .Recordset.Fields(5).Value Label7.Caption = .Recordset.Fields(2).Value Text1.Text = Exit Do Else .Recordset.MoveNext End If LoopEnd WithEnd SubPrivate Sub Command2_Click()Dim P As BooleanWith Adodc2 .Refresh Do While Not .Recordset.EOF P = .Recordset.Fields(0).Value = Text2.Text If P Then Label12.Caption = .Recordset.Fields(1).Value Label13.Caption = .Recordset.Fields(2).Value Label14.Caption = .Recordset.Fields(5).Value Label16.Caption = .Recordset.Fields(0).Value Text2.Text = Exit Do Else .Recordset.MoveNext End If LoopEnd WithEnd SubPrivate Sub Command3_Click()If Label3.Caption = Or Label12.Caption = ThenMsgBox 未登录学生或学生信息不能还书,请先登录!, , 提示Else Dim i As Boolean, j As Boolean Do While Not Adodc2.Recordset.EOF And Not Adodc1.Recordset.EOF i = Adodc2.Recordset.Fields(0).Value = Label5.Caption j = Adodc1.Recordset.Fields(5).Value = Label16.Caption If i And j Then Dim sj As Date Dim qx As Long sj = Date qx = sj - Adodc1.Recordset.Fields(2).Value If qx 30 Then Show Label17.Visible = True Picture1.Visible = True Picture1.Print qx - 30 End If Adodc1.Recordset.Fields(5) = 无 Adodc1.Recordset.Fields(2) = 1111 - 1 - 1 Adodc1.Recordset.Update Adodc2.Recordset.Fields(5) = 否 Adodc2.Recordset.Update Label14.Caption = 否 Label5.Caption = 无 Label7.Caption = 1111 - 1 - 1 MsgBox 还书成功,欢迎你再次借书, , 提示 Exit Do Else Adodc2.Recordset.MoveNext Adodc1.Recordset.MoveNext End If Loop End If End SubPrivate Sub Command4_Click()Unload MeForm2.ShowEnd SubPrivate Sub Command5_Click()EndEnd SubPrivate Sub Form_Load()End SubPrivate Sub Command1_Click()Dim U As BooleanWith Adodc1 .Refresh Do While Not .Recordset.EOF U = .Recordset.Fields(0).Value = Text1.Text If U Then Label3.Caption = .Recordset.Fields(1).Value Label5.Caption = .Recordset.Fields(5).Value Label7.Caption = .Recordset.Fields(2).Value Text1.Text = Exit Do Else .Recordset.MoveNext End If Loop If .Recordset.EOF Then MsgBox 输入错误,请重新输入, , 提示 Text1.Text = End If End WithEnd SubPrivate Sub Command2_Click()Adodc1.Recordset.Fields(2) = DateAdodc1.Recordset.UpdateLabel7.Caption = Adodc1.Recordset.Fields(2).ValueEnd SubPrivate Sub Command4_Click()Unload MeForm5.ShowEnd SubPrivate Sub Command5_Click()EndEnd SubPrivate Sub Form_Load()End SubPrivate Sub Command1_Click()panduan = MsgBox(挂失成功后将删除挂失图书信息,是否确认挂失!, 48 + 1, 提示)If panduan = 1 ThenAdodc1.Recordset.DeleteMsgBox 挂失成功,请赔偿图书损失, , 提示Dim U As Boolean Adodc2.Refresh Do While Not Adodc2.Recordset.EOF U = Adodc2.Recordset.Fields(5).Value = Label6.Caption If U Then Adodc2.Recordset.Fields(2) = 1111 - 1 - 1 Adodc2.Recordset.Fields(5) = 无 Adodc2.Recordset.Update Exit Do Else Adodc2.Recordset.MoveNext End If LoopLabel7.Caption = Label6.Caption = Label8.Caption = Label9.Caption = Text1.Text = End If End SubPrivate Sub Command2_Click()Dim P As BooleanWith Adodc1 .Refresh Do While Not .Recordset.EOF P = .Recordset.Fields(0).Value = Text1.Text If P Then Label7.Caption = Trim(.Recordset.Fields(1).Value & ) Label8.Caption = Trim(.Recordset.Fields(2).Value & ) Label9.Caption = Trim(.Recordset.Fields(5).Value & ) Label6.Caption = Trim(.Recordset.Fields(0).Value & ) Exit Do Else .Recordset.MoveNext End If Loop If .Recordset.EOF Then MsgBox 输入错误,请重新输入, , 提示 Text1.Text = End If End WithEnd SubPrivate Sub Command3_Click()Unload MeForm5.ShowEnd SubPrivate Sub Command4_Click()EndEnd SubPrivate Sub Form_Load()End SubPrivate Sub cmdadd_Click() On Error Resume Next If cmdadd.Caption = 添 加 Then Adodc1.Recordset.AddNew Text1.SetFocus cmdadd.Caption = 确 定 Cmdgx.Caption = 取 消 cmdfirst.Enabled = False cmdprevious.Enabled = False cmdnext.Enabled = False cmdlast.Enabled = False cmddel.Enabled = False Else cmdadd.Caption = 添 加 Cmdgx.Caption = 更 新 Adodc1.Recordset.Update Adodc1.Recordset.MoveLast cmdfirst.Enabled = True cmdprevious.Enabled = True cmdlast.Enabled = True cmddel.Enabled = True End IfEnd SubPrivate Sub cmddel_Click() On Error Resume Next If MsgBox(是否真的删除?, 48 + 1, 提示) = 1 Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End IfEnd SubPrivate Sub cmdfirst_Click() cmdprevious.Enabled = False cmdnext.Enabled = True Adodc1.Recordset.MoveFirst End SubPrivate Sub cmdlast_Click() cmdnext.Enabled = False cmdprevious.Enabled = True Adodc1.Recordset.MoveLast End SubPrivate Sub cmdnext_Click() On Error Resume Next Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast cmdnext.Enabled = False cmdlast.Enabled = False End If cmdprevious.Enabled = True cmdfirst.Enabled = True End SubPrivate Sub cmdprevious_Click() On Error Resume Next Adodc1.Recordset.MovePrevious If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst cmdprevious.Enabled = False cmdfirst.Enabled = False End If cmdnext.Enabled = True cmdlast.Enabled = True End SubPrivate Sub Cmdgx_Click()If Cmdgx.Caption = 取消 Then Unload Me Form7.ShowElse: Adodc1.Recordset.UpdateMsgBox 更新完毕, , 提示End IfEnd SubPrivate Sub Command1_Click()Unload MeForm6.ShowEnd SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Form_Load() cmdprevious.Enabled = False End SubPrivate Sub Command1_Click()If MsgBox(是否切换用户, 48 + 1, 提示) = 1 ThenDim U As Boolean, P As Boolean, Ok As Boolean With Adodc1 .Refresh Do While Not .Recordset.EOF U = .Recordset.Fields(0).Value = Text1.Text P = .Recordset.Fields(1).Value = Text2.Text If U And P Then Ok = True Exit Do Else .Recordset.MoveNext End If Loop End With If Ok Then MsgBox 切换用户成功, , 提示 e = Text1.Text Label4.Caption = e k = Text2.Text Text1.Text = Text2.Text = Else MsgBox 用户名或密码错误,请检查后重新输入, , 提示 Text1.Text = Text2.Text = End IfEnd IfEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Form_Load()Label4.Caption = eEnd SubPrivate Sub Text1_Change()End SubPrivate Sub Command1_Click()Dim U As BooleanWith Adodc1 .Refresh Do While Not .Recordset.EOF U = k = Text1.Text If U Then If Text2.Text = Text3.Text Then .Recordset.Fields(1) = Text2.Text .Recordset.Update MsgBox 密码修改成功,请重新登录, , 提示 Unload Me Form1.Show Else MsgBox 两次输入的密码不一致,请重新输入!, , 提示 Text2.Text = Text3.Text = End If Exit Do Else .Recordset.MoveNext End If Loop End With If Not U Then MsgBox 原口令错误,请重新输入, , 提示 Text1.Text = Text2.Text = Text3.Text = End IfEnd SubPrivate Sub Command2_Click()Unload MeForm6.ShowEnd SubPrivate Sub Form_Load()Label5.Caption = eEnd SubPrivate Sub Command1_Click()Unload MeForm6.ShowEnd SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Form_Load()End SubPrivate Sub Timer1_Timer()RandomizeLabel1.ForeColor = QBColor(Rnd() * 15)End SubPrivate Sub Command5_Click()Unload MeForm11.ShowEnd SubPrivate Sub Command6_Click()Unload MeForm12.ShowEnd SubPrivate Sub Command7_Click()Unload MeForm10.ShowEnd SubPrivate Sub Label1_Click()End SubPrivate Sub Label2_DblClick()Form3.ShowUnload MeEnd SubPrivate Sub Label2_Click()Label1.Caption = 能对图书信息和读者信息进行设置,双击进入。End SubPrivate Sub Label3_DblClick()Form4.ShowUnload MeEnd SubPrivate Sub Label4_DblClick()Form5.ShowUnload MeEnd SubPrivate Sub Label3_Click()Label1.Caption = 能对新书信息入库和库存图书查询进行操作,双击进入。End SubPrivate Sub Label4_Click()Label1.Caption = 包括“读者借书管理”,“读者还书管理”,“读者续借管理”,“图书丢失管理”进行操作,双击进入。End SubPrivate Sub Label5_Click()Label1.Caption = 能对“用户管理”,“更换操作员”,“更换口令”,“系统设置”进行操作,双击进入。End SubPrivate Sub Command8_Click()Unload MeEnd SubPrivate Sub Label5_DblClick()Form6.ShowUnload MeEnd SubPrivate Sub Command1_Click()Unload MeEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Label1_Click()Label3.Caption = 对图书信息进行操作,双击进入。End SubPrivate Sub Label1_DblClick()Unload MeForm7.ShowEnd SubPrivate Sub Label2_Click()Label3.Caption = 对读者信息进行操作,双击进入。End SubPrivate Sub Label2_DblClick()Unload MeForm8.ShowEnd SubPrivate Sub Command1_Click()Unload MeEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Form_Load()End SubPrivate Sub Label1_Click()Label3.Caption = 对新书进行信息入库的操作,双击进入。End SubPrivate Sub Label1_DblClick()Unload MeForm9.ShowEnd SubPrivate Sub Label2_Click()Label3.Caption = 对库存中的图书进行查询,双击进入。End SubPrivate Sub Label2_DblClick()Unload MeForm10.ShowEnd SubPrivate Sub Command1_Click()Unload MeEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Form_Load()End SubPrivate Sub Label1_Click()Label5.Caption = 对读者借书进行操作,双击进入。End SubPrivate Sub Label1_DblClick()Unload MeForm11.ShowEnd SubPrivate Sub Label2_Click()Label5.Caption = 对读者还书进行操作,双击进入。End SubPrivate Sub Label2_DblClick()Unload MeForm12.ShowEnd SubPrivate Sub Label3_Click()Label5.Caption = 对读者续借进行操作,双击进入。End SubPrivate Sub Label3_DblClick()Unload MeForm13.ShowEnd SubPrivate Sub Label4_Click()Label5.Caption = 对图书丢失进行操作,双击进入。End SubPrivate Sub Label4_DblClick()Unload MeForm14.ShowEnd SubPrivate Sub Command1_Click()Unload MeEnd SubPrivate Sub Command2_Click()Unload MeForm2.ShowEnd SubPrivate Sub Label1_Click()Label5.Caption = 对用户进行管理操作,双击进入。End SubPrivate Sub Label1_DblClick()Unload MeForm15.ShowEnd SubPrivate Sub Label2_Click()Label5.Caption = 可更换本系统操作员,双击进入。End SubPrivate Sub Label2_DblClick()Unload MeForm16.ShowEnd SubPrivate Sub Label3_Click()Label5.Caption = 更换操作员口令,双击进入。End SubPrivate Sub Label3_DblClick()Unload MeForm17.ShowEnd SubPri
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 设备拆除合同范本合集
- 果园招标合同范本
- 超市策划设计合同范本
- 规培医生合同范本
- 冷冻章鱼采购合同范本
- 橱柜销售标准合同范本
- 学校维修栏杆合同范本
- 做校园广告合同范本
- 社区安全知识培训课件信息
- 中介租房正规合同范本
- 知识题库-人社劳动知识竞赛测试题及答案(十二)
- 2024年《企业战略管理》期末考试复习题库(含答案)
- 中华民族共同体概论课件第十一讲中华一家与中华民族格局底定(清前中期)课件
- GB/T 25849-2024移动式升降工作平台设计、计算、安全要求和试验方法
- 中国流行音乐的发展史
- 《中国成人肥厚型心肌病诊断与治疗指南-2023》更新要点解读
- 高一学生职业生涯规划课件
- 完整版老旧小区改造工程施工组织设计方案
- 人教版六年级语文下册期末复习卷及答案(5套)
- 海南省监理计费
- 2018年山东中考语文现代文之说明文阅读10篇
评论
0/150
提交评论