vb企业库存管理系统论文(流程图+ER图+概述) 第6页
将记录加入现有库存表中
设备入库表.Text9.Text = CInt(设备入库表.Text9.Text) + CInt(Text2.Text)
设备入库表.Text9.Refresh
J = 设备入库表.Text9
设备入库表.Adodc1.Recordset.MoveFirst
设备入库表.Adodc1.Recordset.Fields.Refresh
设备入库表.DataGrid1.Refresh
MsgBox "现有库存量为:" & J
Else
STR = "现有库存表中无此设备!" & vbCrLf & "请在设备代码表和现有库存表中手动添加记录!!"
MsgBox STR
Load frm现有库存表
frm现有库存表.Show
Call frm现有库存表.Command1_Click
FrmAddNewEqu.Text1.Text = frmInput.Text1.Text
FrmAddNewEqu.Text2.Text = frmInput.Text2.Text
Load frm设备代码表
frm设备代码表.Show
End If
End Sub
Private Sub cmdDelete_Click( ) 删除入库表中记录
On Error GoTo DeleteErr
Dim YesNo As String
YesNo = MsgBox("删除", vbYesNo, "删除记录")
If YesNo = vbYes Then
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Else
Exit Sub
End If
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdUpdate_Click( ) 更新纪录程序
On Error GoTo UpdateErr
datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub毕业论文
http://www.751com.cn/5..2.4 出库模块实现
Private Sub Command1_Click( )设备出库程序
Dim i, J, k As Integer
Dim STR As String
frm设备出库表.Adodc1.RecordSource = "select * from 现有库存表 where 设备号='" & Text1.Text & "'"
frm设备出库表.Adodc1.Refresh
frm设备出库表.DataGrid1.Refresh
If IsNumeric(Text2) = False Then
MsgBox "数量必须是数字!"
Exit Sub
End If
If Text1.Text = "" Or Text2 = "" Or Combo1.Text = "" Or Text4 = "" Or Text5 = "" Or Text6 = "" Or Text7 = "" Then
MsgBox "请输入完整信息!"
Exit Sub
ElseIf frm设备出库表.Adodc1.Recordset.RecordCount <= 0 Then
STR = "现有库存表中无此设备!请检查输入是否正确!!"
MsgBox STR
Exit Sub
Else
frm设备出库表.datPrimaryRS.Recordset.Fields("设备号") = Text1.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("出库数量") = Text2.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("出库时间") = Combo1.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("经手人") = Text4.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("领取人") = Text5.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("使用部门") = Text6.Text
frm设备出库表.datPrimaryRS.Recordset.Fields("用途") = Text7.Text
MsgBox "已经成功存入设备出库表库!"
End If
If frm设备出库表.Adodc1.Recordset.RecordCount > 0 Then
k = CInt(frm设备出库表.Text9.Text) - CInt(Text2.Text)
If k >= 0 Then
frm设备出库表.Text9.Text = CInt(frm设备出库表.Text9.Text) - CInt(Text2.Text)
frm设备出库表.Text9.Refresh
J = frm设备出库表.Text9
frm设备出库表.Adodc1.Recordset.MoveFirst
frm设备出库表.Adodc1.Recordset.Fields.Refresh
frm设备出库表.DataGrid1.Refresh
MsgBox "现有库存量为:" & J
Else
MsgBox "现有库存量不足!请输入合适数量!!"
Exit Sub
End If
Else
STR = "现有库存表中无此设备!请检查输入是否正确!!"
MsgBox STR
End If
End Sub毕业论文
http://www.751com.cn/Private Sub cmdDelete_Click( )删除出库记录
On Error GoTo DeleteErr
Dim YesNo As String
YesNo = MsgBox("删除", vbYesNo, "删除记录")
If YesNo = vbYes Then
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Else
Exit Sub
End If
DeleteErr:
MsgBox Err.Description
End Sub
更新记录程序同入库的更新程序相同,在此略
5.2.5设备采购模块实现,程序略
5.2.6现有模块实现,程序略5.2.7设备代码模块实现
主要程序
Private Sub cmdAdd_Click( ) 添加设备
On Error GoTo AddErr
datPrimaryRS.Recordset.AddNew
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
5.2.8 库存报警模块实现
上一页 [1] [2] [3] [4] [5] [6]
vb企业库存管理系统论文(流程图+ER图+概述) 第6页下载如图片无法显示或论文不完整,请联系qq752018766