VB+SQL书店图书管理系统(任务书+开题报告+论文) 第11页
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select sum([实收金额]) as [总金额] from [售书记录] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
SUMBook = CInt(Adodc1.Recordset!总金额)
Else
SUMBook = 0
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [会员标准] from [会员政策] where [会员级别]='★☆☆☆☆'"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
BiaoZhun = CInt(Adodc1.Recordset!会员标准)
If SUMBook >= BiaoZhun Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [会员表] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset!会员等级 = "★☆☆☆☆"
Adodc1.Recordset.Update
End If
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [会员标准] from [会员政策] where [会员级别]='★★☆☆☆'"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
BiaoZhun = CInt(Adodc1.Recordset!会员标准)
If SUMBook >= BiaoZhun Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [会员表] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset!会员等级 = "★★☆☆☆"
Adodc1.Recordset.Update
End If
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [会员标准] from [会员政策] where [会员级别]='★★★☆☆'"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
BiaoZhun = CInt(Adodc1.Recordset!会员标准)
If SUMBook >= BiaoZhun Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [会员表] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset!会员等级 = "★★★☆☆"
Adodc1.Recordset.Update
End If
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [会员标准] from [会员政策] where [会员级别]='★★★★☆'"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
BiaoZhun = CInt(Adodc1.Recordset!会员标准)
If SUMBook >= BiaoZhun Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [会员表] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset!会员等级 = "★★★★☆"
Adodc1.Recordset.Update
End If
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [会员标准] from [会员政策] where [会员级别]='★★★★★'"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
BiaoZhun = CInt(Adodc1.Recordset!会员标准)
If SUMBook >= BiaoZhun Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [会员表] where [会员卡号]=""" & HYKaHao & """"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset!会员等级 = "★★★★★"
Adodc1.Recordset.Update
End If
End If
CommitTrans
HYShengJi = False
Exit Function
errEnd:
Rollback
HYShengJi = True
Screen.MousePointer = vbDefault
MsgBox "检查会员是否应升级时操作失败!", vbOKOnly + vbExclamation, "图书销售"
CmdOK.Enabled = True
End Function
模块名:CmdSellBook_Click
<< 上一页 [11] [12] [13] [14] [15] [16] 下一页