美容院管理系统论文

图6-3 前台管理界面

2. 该模块实现代码

Private Sub Combo2_Click() On Error Resume Next

rst.Open \项目名称='\'\

If rst.RecordCount = 0 Then

MsgBox \没有要查询的记录!\提示\ rst.Close Exit Sub End If

Text4(0).Text = rst.Fields(\项目编号\ Text4(1).Text = rst.Fields(\价格\ Text4(2).Text = rst.Fields(\会员打折\rst.Close End Sub

Private Sub Command1_Click() On Error Resume Next

If Text1(0).Text = \ MsgBox \请将选择会员!\提示\

Exit Sub End If

If Text9.Text = \ MsgBox \请将信息填写完整\提示\ Exit Sub End If

rst.Open \ rst.AddNew

rst.Fields(\收费员\ rst.Fields(\总费用\ rst.Fields(\消费项目\ rst.Fields(\会员编号\ rst.Fields(\会员姓名\ rst.Fields(\收费时间\ rst.Update rst.Close

rst.Open \会员编号='\Cnn, adOpenKeyset, adLockOptimistic

rst.Fields(\消费总额\消费总额\ rst.Update rst.Close

MsgBox \收费成功成功!\提示\

Text5.Text = \End Sub

Private Sub Command2_Click() If Text5 = \

MsgBox \缺少必要收费字段,请查证!\提示\ Exit Sub End If

Text9.Text = Val(Text4(1)) * Val(Text5) / 10 End Sub

Private Sub Command3_Click() On Error Resume Next If Combo1.Text = \

MsgBox \请选择要查询的字段!\提示\ Combo1.SetFocus Exit Sub End If

If Text2.Text = \

MsgBox \请输入要查询的条件!\提示\ Text2.SetFocus Exit Sub End If

If Combo1.Text = \会员编号\

rst.Open \* From huiyuan where 会员编号='\+ Trim(Text2.Text) + \

If rst.RecordCount = 0 Then

MsgBox \没有要查询的记录!\提示\ rst.Close Exit Sub End If

Text1(0).Text = rst.Fields(\会员编号\ Text1(1).Text = rst.Fields(\会员名称\ Text1(2).Text = rst.Fields(\电话\ Combo3.Text = rst.Fields(\性别\ Text1(3).Text = rst.Fields(\消费总额\ Text1(4).Text = rst.Fields(\家庭住址\

'-------------------------------------------检查会员等级 If Val(rst.Fields(\消费总额\ Text3.Text = \初级会员\

ElseIf Val(rst.Fields(\消费总额\消费总额\

Text3.Text = \普通会员\

ElseIf Val(rst.Fields(\消费总额\消费总额\

Text3.Text = \高级会员\

ElseIf Val(rst.Fields(\消费总额\ Text3.Text = \特级会员\

End If rst.Close

ElseIf Combo1.Text = \会员名称\

rst.Open \* From huiyuan where 会员名称='\+ Trim(Text2.Text) + \

If rst.RecordCount = 0 Then

MsgBox \没有要查询的记录!\提示\ rst.Close Exit Sub End If

Text1(0).Text = rst.Fields(\会员编号\ Text1(1).Text = rst.Fields(\会员姓名\ Text1(2).Text = rst.Fields(\电话\ Combo3.Text = rst.Fields(\性别\ Text1(3).Text = rst.Fields(\消费总额\ Text1(4).Text = rst.Fields(\家庭地址\

'-------------------------------------------检查会员等级 If Val(rst.Fields(\消费总额\ Text3.Text = \初级会员\

ElseIf Val(rst.Fields(\消费总额\消费总额\

Text3.Text = \普通会员\

ElseIf Val(rst.Fields(\消费总额\消费总额\

Text3.Text = \高级会员\

ElseIf Val(rst.Fields(\消费总额\ Text3.Text = \特级会员\ End If rst.Close Else

MsgBox \请选择要查询的正确字段!\提示\End If End Sub

Private Sub Command4_Click()

联系客服:779662525#qq.com(#替换为@)