自行车系统代码Word格式文档下载.docx
《自行车系统代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《自行车系统代码Word格式文档下载.docx(31页珍藏版)》请在冰豆网上搜索。
![自行车系统代码Word格式文档下载.docx](https://file1.bdocx.com/fileroot1/2023-1/7/93c6c2b3-b592-47de-8995-26114163c49c/93c6c2b3-b592-47de-8995-26114163c49c1.gif)
ElseIfb<
fafu111"
密码错误!
Text2.Text="
Text2.SetFocus
ElseIfc<
bThen
密码不一致!
Text3.Text="
ElseIfa="
Andb="
e=MsgBox("
登录成功!
!
vbOKCancel+64,"
登陆成功"
)Ife=vbOKThen
Form1.Hide
Form2.Show
Else
Text1.Text="
Text2.Text="
EndIf
EndSub
PrivateSubCommand2_Click()
End
PrivateSubTimer1_Timer()
Label1.Left=Label1.Left+20
IfLabel1.Left>
Me.WidthThenLabel1.Left=4440:
Timer1.Enabled=FalseEndSub
主窗体代码
PrivateSubcheliang1_Click()
Form5.Show
PrivateSubcheliang2_Click()
Form6.Show
PrivateSubchuzu_Click()
Form4.Show
PrivateSubkehuguanli1_Click()
Form7.Show
PrivateSubtongji_Click()
Form8.Show
PrivateSubxitong2_Click()
Form3.Show
PrivateSubxitong3_Click()
j=MsgBox("
确定要退出吗?
vbOKCancel+32,"
警告"
)
Ifj=vbOKThen
初始化窗体代码
SelectCaseCombo1.ListIndex
Case0
IfMsgBox("
真的要进行初始化吗?
vbYesNo,"
确认初始化操作"
)=vbYesThen
Calldeldata("
bike"
Combo1.ListIndex=-1
Case1
users"
Case2
book"
Case3
真的要进行系统初始化吗?
EndSelect
Form3.Hide
PrivateSubForm_Load()
出租处理代码
DimrsAsADODB.Recordset
IfTrim(Text1.Text)="
请先输入客户编号!
Command1.Enabled=True
sql="
select*fromuserswhere客户编号="
&
'
Trim(Text1.Text)&
Setrs=exesql(sql)
Ifrs.RecordCount=0Then
没有该客户"
ExitSub
Adodc1.RecordSource=sql
rs.Update
Text1.Text=rs.Fields("
客户编号"
).Value
Text2.Text=rs.Fields("
姓名"
Ifrs.Fields("
身份证号"
).Value<
ThenText4.Text=rs.Fields("
学生证号"
).ValueText3.Text=rs.Fields("
性别"
Text5.Text=rs.Fields("
手机号码"
rs.Close
Setrs=Nothing
Setconn=Nothing
Command1.Enabled=False
PrivateSubCommand10_Click()
i=MsgBox("
确认信息没有错了吗?
vbOKCancel+32,警告)Ifi=vbOKThen
Command10.Enabled=False
Command10.Enabled=True
PrivateSubCommand11_Click()
Frame4.Visible=False
PrivateSubCommand12_Click()
DimmeyAsString
IfText14.Text<
mey=Str(Val(Text15.Text)*Val(Combo3.Text)+Val(Text14.Text))Else
mey=Str(Val(Text15.Text)*Val(Combo3.Text))EndIf
Text9.Text=Format(mey,"
##0.0"
)&
元"
PrivateSubCommand13_Click()
w=MsgBox("
确定要删除吗?
删除后不可恢复"
vbOKCancel+32,警告)Ifw=vbOKThen
IfTrim(Text17.Text)<
select*frombookwhere订单号="
Trim(Text17.Text)&
Setrs=exesql(sql)
rs.Delete
Adodc3.Refresh
DataGrid1.Refresh
删除成功"
清空数据
Text17.Text="
Text4.Text="
Text5.Text="
Text6.Text="
Text7.Text="
Text8.Text="
Text9.Text="
Text10.Text="
Text11.Text="
Text13.Text="
Text14.Text="
Text15.Text="
PrivateSubCommand14_Click()
PrivateSubCommand15_Click()
Command2.Enabled=True
IfTrim(Text6.Text)="
请先输入车辆编号!
select*frombikewhere车辆编号="
Trim(Text6.Text)&
Ifrs.RecordCount=0ThenMsgBox"
车库并没有该车辆"
Text6.Text="
Text6.SetFocusExitSub
Adodc2.RecordSource=sql
Text7.Text=rs.Fields("
车辆型号"
Text8.Text=rs.Fields("
颜色"
Command2.Enabled=False
PrivateSubCommand3_Click()
Text11.Text=Now()
PrivateSubCommand4_Click()
Text13.Text=Now()
PrivateSubCommand5_Click()
IfText11.Text<
AndCombo3.Text<
DimsqlAsString
DimconnAsNewADODB.Connection
Setrs=NewADODB.Recordset
Setconn=NewADODB.Connection
conn.ConnectionString="
Provider=SQLOLEDB.1;
PersistSecurityInfo=False;
UserID=sa;
InitialCatalog=bbu;
DataSource="
GetName()
conn.Open
IfCommand1.Enabled<
FalseOrCommand2.Enabled<
FalseOrCommand10.Enabled<
FalseThen
有表单信息漏填或忘了点击“确定”"
ElseIfTrim(Text17.Text)<
rs.Opensql,conn,1,1
Ifrs.RecordCount<
0Then
判断是否重复
该订单编号已存在!
请重新填写"
Text17.SetFocus
select*frombook"
rs.Opensql,conn,3,2
rs.AddNew
rs.Fields("
订单号"
).Value=Trim(Text17.Text)
).Value=Trim$(Text1.Text)
证件号"
).Value=Trim(Text4.Text)
rs.Fields(”姓名”).Value=Trim(Text2.Text)
rs.Fields(”性别”).Value=Trim(Text3.Text)
手机号码"
).Value=Trim(Text5.Text)
车辆编号"
).Value=Trim(Text6.Text)
).Value=Trim(Text7.Text)
).Value=Trim(Text8.Text)
状态"
).Value="
出租"
出租时间"
).Value=Trim(Text11.Text)
IfCombo3.Text<
Thenrs.Fields("
单价"
).Value=Trim(Combo3.Text)
IfTrim(TextlO.Text)<
Thenrs.Fields(”押金”).Value=Trim(TextlO.Text)rs.Fields(”是否已入库"
否”
出租成功"
Command4.Enabled=True
Text15.Enabled=True
Text9.Enabled=True
Combo1.Enabled=True
Text14.Enabled=True
出租时间和单价不能为空!
!
PrivateSubCommand6_Click()
Frame4.Visible=True
PrivateSubCommand7_Click()
并没有该订单,请确认"
以可写方式打开记录集
IfOption1.Value=TrueThen
rs.Fields(”状态”).Value="
归还”
IfTrim(Text13.Text)<
归还时间"
).Value=Trim(Text13.Text)
IfCombo1.Text<
是否损坏"
).Value=Combo1.Text
IfCombo4.Text<
是否已入库"
).Value=Combo4.Text
IfText4.Text<
罚金"
).Value=Trim(Text14.Text)rs.Fields("
出租款"
).Value=Text9.Text
归还成功"
PrivateSubCommand8_Click()
IfTrim(Text16.Text)<
SelectCaseCombo2.ListIndex
Trim(Text16.Text)&
select*frombookwhere客户编号="
Case2
select*frombookwhere车辆编号="
EndSelect
Ifrs.EOF=TrueThen
不存在满足此条件的订单!
,请确认"
Text16.Text="
Text16.SetFocusrs.Close
Elsers.Update
Adodc3.RecordSource=sqlAdodc3.Refresh
请先填写条件"
PrivateSubCommand9_Click()
Combo2.Text="
Text16.Text="
PrivateSubDataGrid1_Click()
CallDataGrid1_GotFocus
PrivateSubDataGrid1_GotFocus()
IfDataGrid1.Columns("
ThenText17.Text=DataGrid1.Columns("
Text4.Text=rs.Fields("
Ifrs.Fields(”性别”).Value<
ThenText3.Text=rs.Fields("
性另U”).Value
车辆型号"
押金"
ThenText10.Text=rs.Fields("
押金”).Value
Text6.Text=rs.Fields("
颜色"
Combo3.Text=rs.Fields("