期刊信息管理系统-源编程代码-VB毕业设计_第1页
期刊信息管理系统-源编程代码-VB毕业设计_第2页
期刊信息管理系统-源编程代码-VB毕业设计_第3页
期刊信息管理系统-源编程代码-VB毕业设计_第4页
期刊信息管理系统-源编程代码-VB毕业设计_第5页
免费预览已结束,剩余11页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 期刊信息管理系统代码维护Private Sub Co米米and1_Click(Index As Integer)If Index = 0 ThenIf UserNa米e.Text = lyz And PassWord = 123 Then米DIFor米1.ShowUnload 米eElse米sgBox 你输入的 用户明或密码错误,请重新输入!For米1.ShowUserNa米e.Text = PassWord = End IfEnd IfIf Index = 1 Then EndEnd SubPrivate Sub Label1_Click()End SubPrivate Sub Label

2、2_Click()End SubPrivate Conn As ADODB.ConnectionPrivate RS As ADODB.RecordsetPrivate Sub Co米米and1_Click()Di米 a As IntegerDi米 str As StringDi米 st As StringDi米 sta As StringSet RS.ActiveConnection = ConnRS.LockType = adLockOpti米isticRS.CursorType = adOpenKeysetstr = select * fro米 readers where 读者编号 =

3、& Text2.TextRS.Open strRS.Fields(已借刊数) = RS.Fields(已借刊数) + 1RS.Fields(备注) = Text5.TextRS.UpdateRS.Closest = select * fro米 米agazineinfo where 月份 = & Text9.Text & and 书号= & Text1.TextRS.Open stRS.Fields(开始期号) = Text3.TextRS.Fields(借出标记) = 借出RS.Fields(借出次数) = RS.Fields(借出次数) + 1RS.Fields(结束期号) = RS.Fie

4、lds(部门) = Text4.TextRS.Fields(备注) = Text5.TextRS.UpdateRS.Closesta = select * fro米 borrowreturn RS.Open staRS.AddNewRS.Fields(书号) = Text1.TextRS.Fields(读者编号) = Text2.TextRS.Fields(借期) = Text3.TextRS.Fields(月份) = Text9.TextRS.Fields(是否含盘) = Text8.TextRS.Fields(部门) = Text4.TextRS.Fields(备注) = Text6.Te

5、xtRS.UpdateRS.CloseAdodc1.RefreshAdodc3.RefreshAdodc2.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub Co米米and3_Click()If Adodc1.Recordset.BOF Or Text1.Text = E米pty Then米sgBox 这本书不存在ElseAdodc1.Co米米andType = ad厘米dTextAdodc1.RecordSource = select 书号,刊名,是否含盘,入库标记,月份,借出

6、标记 fro米 米agazineinfo where 借出标记=未借出 and 书号= & & Text1.Text & ;Adodc1.RefreshText4.Text = Text1.TextText5.Text = str(Date)Text7.Text = Text8.TextEnd IfEnd SubPrivate Sub Co米米and4_Click()Adodc4.RecordSource = select * fro米 readers where 读者编号= & Text2.TextAdodc4.RefreshAdodc3.RecordSource = select * fr

7、o米 readers where 读者编号= & Text2.TextAdodc3.RefreshDi米 str As StringSet RS.ActiveConnection = ConnRS.CursorType = adOpenForwardOnlystr = select * fro米 readers where 读者编号 = & Text2.TextRS.Open strLabel8.Caption = 5 - RS.Fields(已借刊数)RS.Fields(姓名) = Text3.TextRS.Fields(部门) = Text4.TextRS.Fields(备注) = Tex

8、t5.TextRS.UpdateRS.CloseIf Label8.Caption 1 Then米sgBox 该读者已借满期刊,不能再借!for米10.ShowEnd IfAdodc1.Recordset.UpdateAdodc1.RefreshEnd SubPrivate Sub Co米米and5_Click()Text1.Text = End SubPrivate Sub Co米米and6_Click()Adodc1.RecordSource = select * fro米 米agazineinfoAdodc1.RefreshEnd SubPrivate Sub Co米米and7_Clic

9、k()End SubPrivate Sub For米_Load()Set Conn = New ADODB.ConnectionSet RS = New RecordsetSet co米米 = New ADODB.Co米米andConn.CursorLocation = adUseClientConn.Open dsn=lyz, , Text3.Text = str(Date)End SubPrivate Conn As ADODB.ConnectionPrivate RS As ADODB.RecordsetPrivate Sub Co米米and1_Click()Di米 str As Str

10、ingDi米 s As StringSet RS.ActiveConnection = ConnRS.LockType = adLockOpti米isticRS.CursorType = adOpenKeysetstr = select * fro米 readers where 读者编号 = & Text2.TextRS.Open strRS.Fields(已借刊数) = RS.Fields(已借刊数) - 1RS.Fields(备注) = Text5.TextRS.UpdateRS.Closes = select * fro米 borrowreturn where 书号 = & Text1.

11、Text & and 月份= & Text3.TextRS.Open sRS.Fields(还期) = Text6.TextRS.Fields(备注) = Text5.TextRS.UpdateRS.CloseAdodc2.RecordSource = select * fro米 readers where 读者编号 = & Text2.TextAdodc2.RefreshAdodc3.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub Co米米and3_Click()Di米 st

12、r As StringDi米 st As StringSet RS.ActiveConnection = ConnRS.LockType = adLockOpti米isticRS.CursorType = adOpenKeysetst = select * fro米 米agazineinfo where 书号 = & Text1.Text & and 月份= & Text3.TextRS.Open stRS.Fields(开始期号) = Text3.TextRS.Fields(借出标记) = 未借出RS.Fields(借出次数) = RS.Fields(借出次数) + 1RS.Fields(结

13、束期号) = Text6.TextRS.Fields(部门) = Text4.TextRS.Fields(备注) = Text5.TextRS.UpdateRS.CloseAdodc1.RefreshEnd SubPrivate Sub Co米米and4_Click()Set Conn = New ADODB.ConnectionSet RS = New ADODB.RecordsetConn.ConnectionString = dsn=lyz;uid=;pwd=Conn.OpenConn.Execute delete fro米 borrowreturn where 书号= & Text1.

14、TextAdodc1.RefreshAdodc3.RefreshEnd SubPrivate Sub For米_Load()Set Conn = New ADODB.ConnectionSet RS = New RecordsetSet co米米 = New ADODB.Co米米andConn.CursorLocation = adUseClientConn.Open dsn=lyz, , Text6.Text = str(Date)Text5.Text = str(Date)End SubPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.

15、EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pR

16、ecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()Adodc1.Recordset.AddNewCo米米and1.Enabled = FalseCo米米and3.Enabled = TrueEnd SubPrivate Sub Co米米and2_Click()Adodc1.Recordset.DeleteAdodc1.RefreshCo米米and2.Enabled = FalseEnd SubPrivate Sub Co米米and3_Click()Adodc1.Recordset.AddNewAdodc1.Refres

17、hCo米米and1.Enabled = TrueCo米米and3.Enabled = FalseEnd SubPrivate Sub Co米米and4_Click()Adodc1.Refreshfor米6.ShowUnload 米eEnd SubPrivate Sub DataGrid1_Click()Co米米and2.Enabled = TrueEnd SubPrivate Sub For米_Load()Co米米and3.Enabled = FalseCo米米and1.Enabled = FalseCo米米and2.Enabled = FalseAdodc1.Recordset.AddNew

18、End SubPrivate Sub Text2_Change()Co米米and3.Enabled = TrueEnd SubPrivate Sub Text2_Click()Co米米and3.Enabled = TrueEnd SubPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()If Adod

19、c1.Recordset.BOF Or Co米bo1.Text = E米pty Then米sgBox 您输入的 有误或期刊不存在ElseAdodc1.RecordSource = select 书号,刊名,借出次数,借出标记,月份,是否含盘 fro米 米agazineinfo where 刊名= & & Co米bo1.Text & ;Adodc1.RecordSource = select 书号,邮发代号,刊名,是否含盘,入库标记,月份,借出标记 fro米 米agazineinfo where 刊名= & & Co米bo1.Text & ;Adodc1.RefreshEnd IfEnd Sub

20、Private Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub For米_Load()Do While Adodc1.Recordset.EOF = FalseCo米bo1.AddIte米 Adodc1.Recordset(刊名)Adodc1.Recordset.米oveNextLoopEnd SubPrivate Sub Co米米and1_Click()If Adodc1.Recordset.BOF Or Co米bo1.Text = E米pty Then米sgBox 您确定删除吗?ElseAdodc1.Recordse

21、t.DeleteAdodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub For米_Load()End SubPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubP

22、rivate Sub Co米米and1_Click()Adodc1.Recordset.AddNewAdodc1.RefreshEnd SubPrivate Sub Co米米and4_Click()Adodc1.Recordset.AddNewEnd SubPrivate Sub Co米米and5_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub Label1_Click()End SubPrivate Conn As ADODB.ConnectionPrivate RS As

23、 ADODB.RecordsetPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()Set Conn = New ADODB.ConnectionSet RS = New ADODB.RecordsetConn.ConnectionString = dsn=lyz;uid=;pwd=Conn.Open

24、Conn.Execute delete fro米 readers where 读者编号= & Text1.TextText1.Text = Adodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Conn As ADODB.ConnectionPrivate RS As ADODB.RecordsetPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.Even

25、tStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()Adodc1.Co米米andType = ad厘米dTextAdodc1.RecordSource = select * fro米 readers where 读者编号= & Text1.TextAdodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()Di米 str As StringSet RS.ActiveConnection = ConnRS.LockType = adLockBa

26、tchOpti米isticRS.CursorType = adOpenKeysetstr = select * fro米 readers where 读者编号 = & Text1.TextRS.Open strRS.Fields(读者编号) = Text2.TextRS.Fields(姓名) = Text3.TextRS.Fields(部门) = Text4.TextRS.Fields(备注) = Text5.TextRS.UpdateRS.CloseAdodc1.Recordset.UpdateAdodc1.RefreshEnd SubPrivate Sub Co米米and3_Click()

27、米DIFor米1.ShowUnload 米eEnd SubPrivate Sub Co米米and4_Click()Adodc1.RecordSource = select * fro米 readers Adodc1.RefreshEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub For米_Load()Set Conn = New ADODB.ConnectionSet RS = New RecordsetSet co米米 = New ADODB.Co米米andConn.CursorLocation = adUseClientConn.

28、Open dsn=lyz, , End SubPrivate Sub Co米米and1_Click()Adodc1.RecordSource = select * fro米 readers where 读者编号= & Text1.TextAdodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Conn As ADODB.ConnectionPrivate RS As ADODB.RecordsetPrivat

29、e Sub Co米bo2_Click()Di米 str As StringSet RS.ActiveConnection = ConnRS.CursorType = adOpenForwardOnlystr = select * fro米 米agazinena米e where 刊名 = & & Text3.Text & ;RS.Open strRS.米oveFirstLabel13.Caption = RS.Fields(邮发代号)RS.CloseEnd SubPrivate Sub Co米米and1_Click()Text1.Text = Text3.Text = Co米bo2.Text =

30、 Label13.Caption = Label12.Caption = Text7.Text = Text8.Text = Text4.Text = Co米bo1.Text = Text2.Text = End SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub Co米米and4_Click()Di米 n As IntegerDi米 i As IntegerSet RS.ActiveConnection = ConnRS.LockType = adLockOpti米isticRS.CursorType

31、 = adOpenKeysetAdodc1.Recordset.AddNewIf Text8.Text = 12 Then n = 12If Text8.Text = 24 Then n = 24For i = 1 To nRS.Open select * fro米 米agazineinfoRS.AddNewRS.Fields(书号) = Text1.TextRS.Fields(刊名) = Text3.TextRS.Fields(入库标记) = Co米bo2.TextRS.Fields(邮发代号) = Label13.CaptionRS.Fields(月份) = iRS.Fields(开始月)

32、 = Text7.TextRS.Fields(结束月) = Text8.TextRS.Fields(单价) = Text4.TextRS.Fields(是否含盘) = Co米bo1.TextRS.Fields(备注) = Text2.TextRS.UpdateRS.CloseNext iAdodc1.RecordSource = select * fro米 米agazineinfo where 书号= & Text1.TextAdodc1.RefreshCo米米and4.Enabled = FalseEnd SubPrivate Sub For米_Load()Set Conn = New AD

33、ODB.ConnectionSet RS = New RecordsetSet co米米 = New ADODB.Co米米andConn.CursorLocation = adUseClientConn.Open dsn=lyz, , Co米米and4.Enabled = FalseEnd SubPrivate Sub Text1_Change()Co米米and4.Enabled = TrueEnd SubPrivate Conn As ADODB.ConnectionPrivate RS As ADODB.RecordsetPrivate Sub Co米米and1_Click()Set Co

34、nn = New ADODB.ConnectionSet RS = New ADODB.RecordsetConn.ConnectionString = dsn=lyz;uid=;pwd=Conn.OpenConn.Execute delete fro米 米agazineinfo where 书号= & Text1.TextText1.Text = Adodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Conn As ADODB.ConnectionPrivate RS As

35、ADODB.RecordsetPrivate Sub Adodc1_Will米ove(ByVal adReason As ADODB.EventReasonEnu米, adStatus As ADODB.EventStatusEnu米, ByVal pRecordset As ADODB.Recordset)End SubPrivate Sub Co米米and1_Click()Di米 str As StringSet RS.ActiveConnection = ConnRS.LockType = adLockBatchOpti米isticRS.CursorType = adOpenKeyset

36、str = select * fro米 readers where 读者编号 = & Text1.TextRS.Open strRS.Fields(读者编号) = Text2.TextRS.Fields(姓名) = Text3.TextRS.Fields(部门) = Text4.TextRS.Fields(备注) = Text5.TextRS.UpdateRS.CloseAdodc1.Recordset.UpdateAdodc1.RefreshEnd SubPrivate Sub Co米米and2_Click()米DIFor米1.ShowUnload 米eEnd SubPrivate Sub Co米米and4_Click()Adodc1.Co米米andType = ad厘米dTextAdodc1.RecordSource = select * fro米 米agazineinfo where 书号= & Text5.TextAdodc1.RefreshEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub For米_Load()Set Conn = New ADODB.ConnectionSet RS = New RecordsetSet co米米 = New AD

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论