資源描述:
《期刊信息管理系統(tǒng)vb+sql代碼維護(hù)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、期刊信息管理系統(tǒng)——代碼維護(hù)PrivateSubCommand1_Click(IndexAsInteger)IfIndex=0ThenIfUserName.Text="lyz"AndPassWord="123"ThenMDIForm1.ShowUnloadMeElseMsgBox"你輸入的用戶明或密碼錯(cuò)誤,請(qǐng)重新輸入!"Form1.ShowUserName.Text=""PassWord=""EndIfEndIfIfIndex=1ThenEndEndSubPrivateSubLabel1_Click()EndSubPrivateSubLabel2_C
2、lick()EndSubPrivateConnAsADODB.ConnectionPrivateRSAsADODB.RecordsetPrivateSubCommand1_Click()DimaAsIntegerDimstrAsStringDimstAsStringDimstaAsStringSetRS.ActiveConnection=ConnRS.LockType=adLockOptimisticRS.CursorType=adOpenKeysetstr="select*fromreaderswhere讀者編號(hào)="&Text2.TextRS.Op
3、enstrRS.Fields("已借刊數(shù)")=RS.Fields("已借刊數(shù)")+1'RS.Fields("備注")=Text5.TextRS.Update-17-期刊信息管理系統(tǒng)——代碼維護(hù)RS.Closest="select*frommagazineinfowhere月份="&Text9.Text&"and書號(hào)="&Text1.TextRS.OpenstRS.Fields("開始期號(hào)")=Text3.TextRS.Fields("借出標(biāo)記")="借出"RS.Fields("借出次數(shù)")=RS.Fields("借出次數(shù)")+1RS.Fields("
4、結(jié)束期號(hào)")=""'RS.Fields("部門")=Text4.Text'RS.Fields("備注")=Text5.TextRS.UpdateRS.Closesta="select*fromborrow@return"RS.OpenstaRS.AddNewRS.Fields("書號(hào)")=Text1.TextRS.Fields("讀者編號(hào)")=Text2.TextRS.Fields("借期")=Text3.TextRS.Fields("月份")=Text9.TextRS.Fields("是否含盤")=Text8.Text'RS.Fields("部門"
5、)=Text4.TextRS.Fields("備注")=Text6.TextRS.UpdateRS.CloseAdodc1.RefreshAdodc3.RefreshAdodc2.RefreshEndSubPrivateSubCommand2_Click()MDIForm1.ShowUnloadMeEndSubPrivateSubCommand3_Click()IfAdodc1.Recordset.BOFOrText1.Text=EmptyThenMsgBox"這本書不存在"ElseAdodc1.CommandType=adCmdTextAdodc1
6、.RecordSource="select書號(hào),刊名,是否含盤,入庫(kù)標(biāo)記,月份,借出標(biāo)記frommagazineinfowhere借出標(biāo)記='未借出'and書號(hào)="&"'"&Text1.Text&"';"-17-期刊信息管理系統(tǒng)——代碼維護(hù)Adodc1.RefreshText4.Text=Text1.TextText5.Text=str(Date)Text7.Text=Text8.TextEndIfEndSubPrivateSubCommand4_Click()Adodc4.RecordSource="select*fromreaderswhere讀
7、者編號(hào)="&Text2.TextAdodc4.RefreshAdodc3.RecordSource="select*fromreaderswhere讀者編號(hào)="&Text2.TextAdodc3.RefreshDimstrAsStringSetRS.ActiveConnection=ConnRS.CursorType=adOpenForwardOnlystr="select*fromreaderswhere讀者編號(hào)="&Text2.TextRS.OpenstrLabel8.Caption=5-RS.Fields("已借刊數(shù)")'RS.Fields("
8、姓名")=Text3.Text'RS.Fields("部門")=Text4.Text'RS.Fields("