毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

VB+SQL书店图书管理系统(任务书+开题报告+论文) 第16页

更新时间:2010-5-3:  来源:毕业论文
VB+SQL书店图书管理系统(任务书+开题报告+论文) 第16页
Adodc1.Recordset!姓名 = TxtUName.Text
If OptionMan.Value Then
    Adodc1.Recordset!性别 = "男"
Else
    Adodc1.Recordset!性别 = "女"
End If
Adodc1.Recordset!地址 = TxtUDiZhi.Text
Adodc1.Recordset!手机 = TxtUDanWei.Text
Adodc1.Recordset!电子邮件 = TxtUMail.Text
Adodc1.Recordset!电话 = TxtUDianHua.Text
Adodc1.Recordset!人生格言 = TxtUMemo.Text
Adodc1.Recordset!创建日期 = Now()
Adodc1.Recordset.Update

Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "Admin"
Adodc1.Refresh

Adodc1.Recordset.AddNew
Adodc1.Recordset!用户ID = TxtCard.Text
Adodc1.Recordset!用户密码 = TxtCard.Text
Adodc1.Recordset!用户身份 = ComboShenFen.Text
Adodc1.Recordset.Update

CommitTrans

MsgBox "恭喜你,注册成功!" & vbCrLf & "员工的帐号和密码就是你填写的员工帐号!" & vbCrLf & "请员工自行修改密码或立即修改密码。", vbOKOnly + vbQuestion, "注册成功"
TxtCard.Text = ""
TxtUName.Text = ""
TxtUDanWei.Text = ""
TxtUDiZhi.Text = ""
TxtUMail.Text = ""
TxtUDianHua.Text = ""
TxtUMemo.Text = ""
CmdRegMe.Enabled = True

Exit Sub

errEnd:
    Rollback
    MsgBox "注册失败,操作数据库发生错误!", vbOKOnly + vbExclamation, "注册失败"
    CmdRegMe.Enabled = True
End Sub

模块名:GetJinJia
模块原型:Public Function GetJinJia(bianHao As String) As String
代码:
Public Function GetJinJia(bianHao As String) As String
On Error GoTo errEnd

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select [单价] from [进书记录] where [图书编号]=""" & TuShuBianHao & """"
Adodc1.Refresh

If Adodc1.Recordset.RecordCount > 0 Then
    Adodc1.Recordset.MoveFirst
    GetJinJia = Adodc1.Recordset!单价 & ""
Else
    MsgBox "数据丢失,清重试!", vbOKOnly + vbExclamation, "办理退货"
    GetJinJia = ""
    Exit Function
End If

Exit Function
errEnd:
    MsgBox "找不到该品种的进价!", vbOKOnly + vbExclamation, "检索数据库出错"
    GetJinJia = ""
End Function

模块名:CmdTH_Click
模块原型:Private Sub CmdTH_Click()
代码:
Private Sub CmdTH_Click()
On Error GoTo errEnd
Dim QD As Integer

If TxtShuLiang.Text = "" Then
    MsgBox "请填写退货的数量.", vbOKOnly + vbExclamation, "办理退货"
    TxtShuLiang.SetFocus
    Exit Sub
End If

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from [Book] where [图书编号]=""" & TuShuBianHao & """"
Adodc1.Refresh

If Adodc1.Recordset.RecordCount = 0 Then
    MsgBox "数据丢失,清重试!", vbOKOnly + vbExclamation, "办理退货"
    Exit Sub
End If

Adodc1.Recordset.MoveFirst
If Adodc1.Recordset!库存量 - CInt(TxtShuLiang.Text) < 0 Then
    MsgBox "库存不足,没有足够的图书可以退回!", vbOKOnly + vbExclamation, "库存不足"
    TxtShuLiang.SetFocus
    TxtShuLiang.SelStart = 0
    TxtShuLiang.SelLength = Len(TxtShuLiang.Text)
    Exit Sub
End If

If TxtJinJia.Text = "" Then
    MsgBox "图书进价信息丢失,无法完成退货操作!", vbOKOnly + vbExclamation, "办理退货"
    TxtShuLiang.SetFocus
    Exit Sub
End If
If TxtJinE.Text = "" Then
    MsgBox "请填写退货金额.", vbOKOnly + vbExclamation, "办理退货"
    TxtJinE.SetFocus
    Exit Sub
End If
If TxtYuanYin.Text = "" Then
    MsgBox "请填写退货原因.", vbOKOnly + vbExclamation, "办理退货"
    TxtYuanYin.SetFocus
    Exit Sub
End If
If TxtMemo.Text = "" Then TxtMemo.Text = "无"

 << 上一页  [11] [12] [13] [14] [15] [16] 

VB+SQL书店图书管理系统(任务书+开题报告+论文) 第16页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。