版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、声明:本作品完全由个人创作,对于应付老师留得软件大作业很有帮助(西工大),本作品仅供个人交流学习,不建议作为商业用途,否则后果自负。由于vb软件还有很多参数的设定,在此不变于抓图。因此如果读者完全按照本文档所示结果可能出错,请设置data控件的数据库连接(本作品用access数据库,需要时读者自行建立)以上两个图是程序运行后的部分截图数据库截图(图上的各个名字必须与之对应)Form1截图Form1的代码:Public yonghu As String, mima As StringPublic jibie As Integer 用户的身份级别Dim r0 As Single x0,y0为圆心坐
2、标Dim r1 As Single, r2 As Single, r3 As Single r0圆半径,r1时钟刻度外圈半径Dim r4 As Single r2时钟长刻度内圈半径,r3时钟短刻度内半径Dim r5 As Single, r6 As Single, r7 As Single r4时钟标注文字半径,r5时钟时针半径,r6时钟分针半径Dim x0 As Single, y0 As Single r7时钟秒针半径Private Sub bangzhu_Click()Form9.ShowEnd SubPrivate Sub bumen_Click()Form6.ShowEnd SubP
3、rivate Sub fangcha_Click()Form2.ShowEnd SubPrivate Sub Form_Load()Label1.Top = 1000 初始化两个标签的位置Label2.Top = 1000dingwei 将时针,秒针和分针定位到圆心位置jibie = -1yonghu = mima = End SubPrivate Sub guanli_Click()Form14.ShowEnd SubPrivate Sub Timer1_Timer() 利用定时时钟采用文字的移动Label1.Top = Label1.Top + 10Label2.Top = Label2.
4、Top + 10If Label1.Top = 4700 Then 当文字移到底部时采用重新符值将文字移到顶部Label1.Top = 1000Label2.Top = 1000End If keduEnd SubPrivate Sub dingwei() 将时针,秒针和分针定位到圆心位置x0 = Shape1.Left + Shape1.Width / 2y0 = Shape1.Top + Shape1.Height / 2r0 = Shape1.Width / 2r1 = r0r2 = r0 * 0.85r3 = r0 * 0.9r4 = r0 * 0.75r5 = r0 * 0.48r6
5、 = r0 * 0.56r7 = r0 * 0.65Line1.X1 = x0Line2.X1 = x0Line3.X1 = x0Line1.Y1 = y0Line2.Y1 = y0Line3.Y1 = y0End SubPrivate Sub kedu() 绘制时钟刻度Dim i As Single, du As SingleDim X1 As Single, Y1 As Single, X2 As Single, Y2 As SingleFor i = 0 To 354 Step 6du = i * 3.14159 / 180X1 = x0 + r1 * Sin(du)Y1 = y0 -
6、r1 * Cos(du)X2 = x0 + r3 * Sin(du)Y2 = y0 - r3 * Cos(du)Form1.Line (X1, Y1)-(X2, Y2), RGB(0, 0, 200)Next iFor i = 30 To 360 Step 30du = i * 3.14159 / 180Form1.DrawWidth = IIf(i Mod 90 = 0, 3, 2)X1 = x0 + r1 * Sin(du)Y1 = y0 - r1 * Cos(du)X2 = x0 + r2 * Sin(du)Y2 = y0 - r2 * Cos(du)Form1.Line (X1, Y1
7、)-(X2, Y2), RGB(0, 0, 200)X1 = x0 + r4 * Sin(du)Y1 = y0 - r4 * Cos(du)Form1.CurrentX = X1 - 150Form1.CurrentY = Y1 - 100Form1.Print i 30Next iEnd SubPrivate Sub Timer2_Timer() 达到指针的动态效果Dim s1 As Single, m1 As Single, h1 As Single, an1 As Single, an2 As Singles1 = Second(Now)m1 = Minute(Now)h1 = Hour
8、(Now)h1 = h1 Mod 12m1 = m1 + s1 / 60h1 = h1 + m1 / 60an2 = h1 * 3.3 / 6Line1.X2 = x0 + r5 * Sin(an2)Line1.Y2 = y0 - r5 * Cos(an2)an1 = m1 * 3.14159 / 30Line2.X2 = x0 + r6 * Sin(an1)Line2.Y2 = y0 - r6 * Cos(an1)an1 = s1 * 3.14159 / 30Line3.X2 = x0 + r7 * Sin(an1)Line3.Y2 = y0 - r7 * Cos(an1)End SubPr
9、ivate Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.IndexCase 2:Form10.ShowCase 4:Form11.ShowCase 6:Form12.ShowCase 8:Form13.ShowEnd SelectEnd SubPrivate Sub yuangongxx_Click()Form5.ShowEnd SubPrivate Sub yuding_Click()Form3.ShowEnd SubForm2截图Form2代码Private Sub Comma
10、nd1_Click() 上一个Data1.Recordset.MovePreviousIf Data1.Recordset.BOF ThenData1.Recordset.MoveLastEnd IfEnd SubPrivate Sub Command2_Click() 下一个Data1.Recordset.MoveNextIf Data1.Recordset.EOF ThenData1.Recordset.MoveFirstEnd IfEnd SubPrivate Sub Command3_Click() 查询If Option1.Value = True ThenData1.RecordS
11、ource = select * from 房间信息 where 房间信息.房间类型= 天Data1.RefreshEnd IfIf Option2.Value = True ThenData1.RecordSource = select * from 房间信息 where 房间信息.房间类型= 地Data1.RefreshEnd IfIf Option3.Value = True ThenData1.RecordSource = select * from 房间信息 where 房间信息.房间类型= 人Data1.RefreshEnd IfIf Option4.Value = True Th
12、enData1.RecordSource = 房间信息Data1.RefreshEnd IfCommand1.Enabled = TrueCommand2.Enabled = TrueEnd SubPrivate Sub Command4_Click() 结束Unload MeEnd SubPrivate Sub Form_Load()Text1.Enabled = FalseText2.Enabled = FalseText3.Enabled = FalseText4.Enabled = False Data1.DatabaseName = App.Path & 酒店管理系统.mdbEnd
13、SubPrivate Sub Option1_Click() 天Command1.Enabled = FalseCommand2.Enabled = FalseEnd SubPrivate Sub Option2_Click() 地Command1.Enabled = FalseCommand2.Enabled = FalseEnd SubPrivate Sub Option3_Click() 人Command1.Enabled = FalseCommand2.Enabled = FalseEnd SubPrivate Sub Option4_Click() 全部Command1.Enable
14、d = FalseCommand2.Enabled = FalseEnd SubForm3代码Private Sub Command1_Click() querenDim a As StringDim b As IntegerIf Text1.Text = Or Text2.Text = Or Text3.Text = Or Text4.Text = Or Text5.Text = Or Text6.Text = ThenMsgBox 信息不完善, , 提示ElseIf Option6.Value = True Or Option5.Value = True Then If Form16.ji
15、eguo = 0 Then MsgBox 如果您是会员或内部人员请先登录!, , 提示 Form16.Show End If If Form16.jieguo = 1 Then b = 1 End IfElseb = 1End IfIf b ThenData1.Recordset.AddNewData1.Recordset.Fields(姓名) = Text5.TextData1.Recordset.Fields(房间号) = Text1.TextData1.Recordset.Fields(预定入住时间) = Text2.TextData1.Recordset.Fields(居住时间) =
16、Text3.TextData1.Recordset.Fields(缴纳定金) = Text4.TextData1.Recordset.Fields(性别) = Text6.TextIf Option1.Value = True Thena = 天End IfIf Option2.Value = True Thena = 地End IfIf Option3.Value = True Thena = 人End IfData2.RecordSource = select * from 房间信息 where 房间信息.房间类型= & a & and 房间信息.房间号= & Text1.Text & a
17、nd 房间信息.状态=可用Data2.RefreshIf Data2.Recordset.EOF ThenMsgBox 无此房间或此房间不可用, , 提示Data1.UpdateControlsElseIf Option1.Value = True ThenData1.Recordset.Fields(房间类型) = 天a = 天End IfIf Option2.Value = True ThenData1.Recordset.Fields(房间类型) = 地a = 地End IfIf Option3.Value = True ThenData1.Recordset.Fields(房间类型)
18、= 人a = 人End IfIf Option4.Value = True ThenData1.Recordset.Fields(身份) = 普通End IfIf Option5.Value = True ThenData1.Recordset.Fields(身份) = 会员End IfIf Option6.Value = True ThenData1.Recordset.Fields(身份) = 内部人员End IfData2.RecordSource = select 房间信息.状态 from 房间信息 where 房间信息.房间类型= & a & and 房间信息.房间号= & Text
19、1.Text & Data2.Recordset.EditData2.Recordset.Fields(状态) = 预定Data2.Recordset.UpdateData1.UpdateRecordData1.RefreshMsgBox 预订成功!, , 提示Form16.jieguo = 0End IfEnd IfEnd IfEnd SubPrivate Sub Command2_Click() quxiaoData1.UpdateControlsData2.UpdateControlsUnload MeEnd SubPrivate Sub Command3_Click() 尚不是会员马上
20、注册Form4.ShowEnd SubPrivate Sub Form_Load()Data1.DatabaseName = App.Path & 酒店管理系统.mdbData2.DatabaseName = App.Path & 酒店管理系统.mdbb = 0Form16.jieguo = 0End SubForm4代码Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordse
21、t)End SubPrivate Sub Command1_Click() tijiaoDim a As Stringa = Text1.TextIf Text1.Text Then If Text3.Text = Text2.Text Then Data1.RecordSource = select * from 会员信息 where 会员信息.账号= & a & Data1.Refresh If Data1.Recordset.EOF Then Data1.Recordset.AddNew Data1.Recordset.Fields(账号) = Text1.Text Data1.Reco
22、rdset.Fields(密码) = Text2.Text Data1.Recordset.Fields(邮箱) = Text4.Text Data1.UpdateRecord Else MsgBox 此账号已被别人占用, , 提示 此处用于将会员信息输入数据库 GoTo ba End If MsgBox 恭喜您顺利成为本酒店会员, , Unload Me Else MsgBox 两次输入密码不相符, , 提示 End IfElseMsgBox 帐号不能为空, , 提示End Ifba:End SubPrivate Sub Command2_Click() quexiaoData1.Updat
23、eControlsUnload MeEnd SubPrivate Sub Form_Load()Data1.DatabaseName = App.Path & 酒店管理系统.mdbEnd SubForm5代码Private Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()Data1.RecordSource = select 员工信息.姓名,员工信息.部门,员工信息.职位 from 员工信息End SubPrivate Sub Command1_Click() liao jie lUnload MeEnd SubPrivat
24、e Sub Command2_Click() shang yi geAdodc1.Recordset.MovePreviousIf Adodc1.Recordset.BOF ThenAdodc1.Recordset.MoveLastEnd IfEnd SubPrivate Sub Command3_Click() xia yi geAdodc1.Recordset.MoveNextIf Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveFirstEnd IfEnd SubForm7代码Private Sub Command1_Click() zeng
25、tianData1.Recordset.AddNewText1.Enabled = TrueText2.Enabled = TrueText3.Enabled = TrueText4.Enabled = TrueText5.Enabled = TrueCommand4.Enabled = TrueCommand5.Enabled = TrueEnd SubPrivate Sub Command2_Click() xiu gaiData1.Recordset.EditText1.Enabled = TrueText2.Enabled = TrueText3.Enabled = TrueText4
26、.Enabled = TrueText5.Enabled = TrueCommand4.Enabled = TrueCommand5.Enabled = TrueEnd SubPrivate Sub Command3_Click() shan chuDim a As Integera = MsgBox(确认删除吗, vbYesNo, 提示)If a = vbYes ThenData1.Recordset.DeleteData1.Recordset.MoveFirstEnd IfEnd SubPrivate Sub Command4_Click() fang qiData1.UpdateCont
27、rolsText1.Enabled = FalseText2.Enabled = FalseText3.Enabled = FalseText4.Enabled = FalseText5.Enabled = FalseCommand4.Enabled = FalseCommand5.Enabled = FalseData1.Recordset.MoveFirstEnd SubPrivate Sub Command5_Click() que renData1.Recordset.UpdateText1.Enabled = FalseText2.Enabled = FalseText3.Enabl
28、ed = FalseText4.Enabled = FalseText5.Enabled = FalseCommand4.Enabled = FalseCommand5.Enabled = FalseData1.Recordset.MoveFirstEnd SubPrivate Sub Form_Load()Data1.DatabaseName = App.Path & 酒店管理系统.mdbEnd SubForm8代码Public jies As StringPrivate Sub dxx_Click()Form19.ShowEnd SubPrivate Sub fangzong_Click(
29、)Form20.ShowEnd SubPrivate Sub Form_Load()Label1.Caption = Form1.yonghu + 欢迎您End SubPrivate Sub jiesuan_Click()Form22.ShowEnd SubPrivate Sub Label1_Click()End SubPrivate Sub Label2_Click() zhu xiaoUnload MeForm17.HideForm19.HideForm18.HideForm23.HideForm20.HideForm21.HideForm15.HideForm22.HideForm24
30、.HideForm7.HideEnd SubPrivate Sub lishi_Click()Form23.ShowEnd SubPrivate Sub mimaxiugai_Click()Form24.ShowEnd SubPrivate Sub ruzhu_Click()Form21.ShowEnd SubPrivate Sub yd_Click()Form18.ShowEnd SubPrivate Sub ygwanzheng_Click()Form17.ShowEnd SubPrivate Sub zh_Click()Form15.ShowEnd SubPrivate Sub zhin
31、eng_Click()Form7.ShowEnd SubForm9代码Private Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()Text1.Text = 本系统为本人独立编写,所有密码均为000,在使用过程中可自行更改。End SubForm10代码Dim a As IntegerPrivate Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()Dim b As String, c As String, d As String, e As String
32、, f As Stringb = 秦岭野生大酒店创办于2010,其创始人为著名企业家王秦岭先生。秦岭野生大酒店总部位于秦岭北麓。南有美丽c = 富饶的秦岭。在这里你可以享受纯正的家养野生美味,不是野生胜似野生。本酒店所提供的任何食品绝对安全d = 卫生。价格也绝对合理公道。 秦岭野生大酒店在全国范围内有十个子公司,近万员工,是名副其实的大企业。e = 每个子公司具有六个下属部门,各个部门团结协作共同保障了公司正常运转。 f = 酒店设有天地人三种不同的客房,可供不同阶层的旅客选择,三种客房不同的价位,相同的服务。给旅途劳累的您家的感觉。毫无疑问,秦岭野生大酒店是您结束旅途后最好的选择。Text
33、1.Text = b + c + d + e + fEnd SubPrivate Sub Timer1_Timer()If a = 0 ThenPrint: PrintFontName = 宋体 字体类型为宋体FontSize = 19 字体大小Print 秦岭野生大酒店简介a = 0a = 1End IfEnd SubForm11代码Private Sub Command1_Click()Adodc1.RecordSource = select 公司业绩.月份,公司业绩.收入 from 公司业绩 where 公司业绩.年份= & Text1.Text & group by 公司业绩.月份,公
34、司业绩.收入 order by 公司业绩.月份Adodc1.RefreshIf Adodc1.Recordset.EOF ThenMsgBox 无此年份, , 提示Adodc1.RecordSource = select 公司业绩.月份,公司业绩.收入 from 公司业绩 where 公司业绩.年份=2009 group by 公司业绩.月份,公司业绩.收入 order by 公司业绩.月份Adodc1.RefreshText1.Text = 2009End IfEnd SubPrivate Sub Form_Load()Adodc1.RecordSource = select 公司业绩.月份
35、,公司业绩.收入 from 公司业绩 where 公司业绩.年份=2009 group by 公司业绩.月份,公司业绩.收入 order by 月份 descEnd SubForm12代码无代码Form13代码Private Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()End SubForm14代码Private Sub Command1_Click() que renForm1.yonghu = Text1.TextForm1.mima = Text2.TextData1.RecordSource = select *
36、 from 员工信息,董事会信息 where 员工信息.姓名 = & Form1.yonghu & and 员工信息.密码 = & Form1.mima & or 董事会信息.姓名 = & Form1.yonghu & and 董事会信息.密码 = & Form1.mima & Data1.RefreshIf Not Data1.Recordset.EOF Then 此处用来和数据库进行比较 记得给form1.jibie赋值Unload Me Form8.ShowElseUnload Mei = MsgBox(对不起您输入的帐号和密码不符, , 提示)End IfEnd SubPrivate
37、Sub Command2_Click() qu xiaoUnload MeEnd SubPrivate Sub Form_Load() Data1.DatabaseName = App.Path & 酒店管理系统.mdbLabel3.Caption = 公司管理界面只有公司内部人员方可进入如果您为公司内部人员请输入您的用户名和密码 End SubForm15代码Dim cnn As ADODB.Connection 记录集对象Dim rs As New ADODB.Recordset 数据库连接对象Private Sub Command1_Click() shou gers.MoveFirst
38、fuzhiEnd SubPrivate Sub Command2_Click() xia yi gers.MoveNextIf rs.EOF Then rs.MoveFirst End If fuzhiEnd SubPrivate Sub Command3_Click() shang yi gers.MovePreviousIf rs.BOF Then rs.MoveLast End If fuzhiEnd SubPrivate Sub Command4_Click() mo weirs.MoveLastfuzhiEnd SubPrivate Sub Command5_Click() jie
39、shuUnload MeEnd SubPrivate Sub Command6_Click() cha xunDim leixing As String, duixing As String, shuru1 As String, shijan As String, a As Stringshuru1 = InputBox$(请输入查找目标, 查找框)If Option1.Value = True Thenleixing = = & shuru1 & End IfIf Option2.Value = True Thenleixing = like % & shuru1 & %End IfIf O
40、ption3.Value = True Thenduixiang = 姓名 End IfIf Option4.Value = True Thenduixiang = 性别 End IfIf Option5.Value = True Thenduixiang = 住房类型 End IfIf Option6.Value = True Thenduixiang = 证件号 End IfIf Option7.Value = True Thenduixiang = 房间号 End IfIf Option8.Value = True ThenSet cnn = New ADODB.Connection c
41、nn.Open provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & 酒店管理系统.mdb;Persist Security Info=False Set rs = New ADODB.Recordsetrs.Open select * from 当前住户信息 where 当前住户信息. & duixiang & leixing, cnn, adOpenDynamic, adLockBatchOptimisticIf rs.EOF And rs.BOF Then MsgBox 无您要查找的信息, , 提示 Command1.Ena
42、bled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Else Command1.Enabled = True Command2.Enabled = True Command3.Enabled = True Command4.Enabled = True fuzhi End IfEnd IfIf Option9.Value = True ThenSet cnn = New ADODB.Connection cnn.Open provider=Microsoft.Jet.OL
43、EDB.4.0;Data Source= & App.Path & 酒店管理系统.mdb;Persist Security Info=False Set rs = New ADODB.Recordsetrs.Open select * from 历史住户信息 where 历史住户信息. & duixiang & leixing, cnn, adOpenDynamic, adLockBatchOptimisticIf rs.EOF And rs.BOF Then MsgBox 无您要查找的信息, , 提示 Else fuzhi End IfEnd IfEnd SubPrivate Sub Com
44、mand7_Click() qu xiaoSet cnn = New ADODB.Connection cnn.Open provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & 酒店管理系统.mdb;Persist Security Info=False Set rs = New ADODB.Recordset rs.Open select * from 当前住户信息, cnn, adOpenDynamic, adLockBatchOptimistic If rs.EOF And rs.BOF Then MsgBox 无您要查找的信
45、息, , 提示 Else fuzhi End IfEnd SubPrivate Sub Form_Load()Set cnn = New ADODB.Connection cnn.Open provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & 酒店管理系统.mdb;Persist Security Info=False Set rs = New ADODB.Recordset rs.Open select * from 当前住户信息, cnn, adOpenDynamic, adLockBatchOptimistic If rs.
46、EOF And rs.BOF Then MsgBox 无您要查找的信息, , 提示 Else fuzhi End IfEnd SubPrivate Sub fuzhi()Text8.Text = rs.Fields(证件号)Text7.Text = rs.Fields(性别)Text6.Text = rs.Fields(缴纳金额)Text5.Text = rs.Fields(姓名)Text4.Text = rs.Fields(居住时间)Text3.Text = rs.Fields(入住时间)Text2.Text = rs.Fields(房间号)Text1.Text = rs.Fields(房间
47、类型)Text9.Text = rs.Fields(住户身份)End SubForm16代码Public jieguo As IntegerPrivate Sub Command1_Click() que dingIf Form3.Option5.Value ThenAdodc1.RecordSource = select * from 会员信息 where 账号 = & Text1.Text & and 密码 = & Text2.Text & Adodc1.RefreshEnd IfIf Form3.Option6.Value ThenAdodc1.RecordSource = select
48、 * from 员工信息 where 姓名 = & Text1.Text & and 密码 = & Text2.Text & Adodc1.Refresh If Adodc1.Recordset.EOF Then Adodc1.RecordSource = select * from 董事会信息 where 姓名 = & Text1.Text & and 密码 = & Text2.Text & Adodc1.Refresh End IfEnd IfIf Adodc1.Recordset.EOF ThenMsgBox 账号与密码不符, , 提示jieguo = 0Unload MeElsejie
49、guo = 1MsgBox 登录成功, , 提示Unload MeEnd IfEnd SubPrivate Sub Command2_Click() qu xiaoUnload MeEnd SubPrivate Sub Form_Load()jieguo = 0End SubForm17代码Dim a As Integer, b As IntegerPrivate Sub Command1_Click() shou geAdodc1.Recordset.MoveFirstEnd SubPrivate Sub Command10_Click() que renIf Text1.Text = Or
50、 Text2.Text = Or Text3.Text = Or Text4.Text = Or Text5.Text = Or Text5.Text = Or Text7.Text = ThenMsgBox 信息不完善, , 提示ElseAdodc1.Recordset.UpdateBatchText1.Enabled = FalseText2.Enabled = FalseText3.Enabled = FalseText4.Enabled = FalseText5.Enabled = FalseText6.Enabled = FalseText7.Enabled = FalseComma
51、nd1.Enabled = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand6.Enabled = TrueCommand7.Enabled = TrueCommand8.Enabled = TrueCommand4.Enabled = TrueCommand9.Enabled = FalseCommand10.Enabled = FalseIf b = 1 ThenMsgBox 添加成功请立即修改密码初始密码为0, , 提示b = 0End IfEnd IfEnd SubPrivate Sub Command2_Click()
52、 shang yi geAdodc1.Recordset.MovePreviousIf Adodc1.Recordset.BOF ThenAdodc1.Recordset.MoveLastEnd IfEnd SubPrivate Sub Command3_Click() xia yi geAdodc1.Recordset.MoveNextIf Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveFirstEnd IfEnd SubPrivate Sub Command4_Click() mo xiangAdodc1.Recordset.MoveLastE
53、nd SubPrivate Sub Command5_Click() jie shuUnload MeEnd SubPrivate Sub Command6_Click() zeng tianb = 1Adodc1.Recordset.AddNewCommand1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = FalseCommand6.Enabled = FalseCommand7.Enabled = FalseCommand8.Enabled = FalseCommand9
54、.Enabled = TrueCommand10.Enabled = TrueText1.Enabled = TrueText2.Enabled = TrueText3.Enabled = TrueText4.Enabled = TrueText5.Enabled = TrueText6.Enabled = TrueText7.Enabled = TrueEnd SubPrivate Sub Command7_Click() xiu gaiText1.Enabled = TrueText2.Enabled = TrueText3.Enabled = TrueText4.Enabled = Tr
55、ueText5.Enabled = TrueText6.Enabled = TrueText7.Enabled = TrueCommand1.Enabled = FalseCommand2.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = FalseCommand6.Enabled = FalseCommand7.Enabled = FalseCommand8.Enabled = FalseCommand9.Enabled = TrueCommand10.Enabled = TrueEnd SubPrivate Sub Comm
56、and8_Click() shan chua = MsgBox(确认删除吗?, vbYesNo, 提示)If a = vbYes ThenAdodc1.Recordset.DeleteAdodc1.Recordset.MoveNextIf Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveFirstEnd IfElseAdodc1.Recordset.CancelUpdateEnd IfEnd SubPrivate Sub Command9_Click() fang qib = 0Adodc1.Recordset.CancelUpdateAdodc1.
57、Recordset.MoveFirstText1.Enabled = FalseText2.Enabled = FalseText3.Enabled = FalseText4.Enabled = FalseText5.Enabled = FalseText6.Enabled = FalseText7.Enabled = FalseCommand1.Enabled = TrueCommand2.Enabled = TrueCommand3.Enabled = TrueCommand4.Enabled = TrueCommand6.Enabled = TrueCommand7.Enabled =
58、TrueCommand8.Enabled = TrueCommand9.Enabled = FalseCommand10.Enabled = FalseEnd SubPrivate Sub Form_Load()Command9.Enabled = FalseCommand10.Enabled = Falseb = 0End SubForm18代码Dim rs As ADODB.RecordsetDim d As Integer, X As Integer, b As Integer, ef As IntegerDim cnn As ADODB.ConnectionPrivate Sub Co
59、mmand1_Click() shou xiangrs.MoveFirstfuzhiEnd SubPrivate Sub Command10_Click() que renIf Text1.Text = Or Text2.Text = Or Text3.Text = Or Text4.Text = Or Text5.Text = Or Text5.Text = ThenMsgBox 信息不完善, , 提示ElseData1.RecordSource = select * from 房间信息 where 房间信息.房间类型 = & Text2.Text & and 房间信息.房间号= & Tex
60、t3.Text & Data1.RefreshIf d = 1 And Data1.Recordset.Fields(状态) 可用 Or Data1.Recordset.EOF ThenMsgBox 房间不存在或不可用, , 提示 Else rs.Fields(姓名) = Text1.Textrs.Fields(房间类型) = Text2.Textrs.Fields(房间号) = Text3.Textrs.Fields(预定入住时间) = Text4.Textrs.Fields(居住时间) = Text5.Textrs.Fields(身份) = Text6.Textrs.Fields(缴纳定金
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年新款安全生产培训记录表模板下载
- 环保污泥合同范本
- 施工合同范本发包方承包方
- 临街餐饮店铺转让合同范本
- 房屋认定合同范本
- 商品摄影合同范本
- 合作社车辆出租合同范本
- 贴膜合同范本
- 2024建筑效果设计与咨询协议
- 包干简易合同范本
- 心脏骤停急救-课件
- XX医院康复科建设方案
- 出差申请表(模板)
- 中药材技术创新中心的可行性研究报告
- 有机合成化学(山东联盟)知到章节答案智慧树2023年青岛科技大学
- 商标法题库1(答案)
- TMF自智网络白皮书4.0
- 电视剧《国家孩子》观影分享会PPT三千孤儿入内蒙一段流淌着民族大爱的共和国往事PPT课件(带内容)
- 所水力除焦设备介绍
- 改革开放英语介绍-课件
- pet考试历届真题和答案
评论
0/150
提交评论