当前位置:跳过导航链接计算机毕业设计首页 : VB计算机毕业设计 : 详细内容

VB超市进销存管理系统(12)

来源:xiaoniu168.com 作者:本站原创 添加时间:2012-02-02 点击数:21099

计算机毕业设计采购查询模块介绍:

(2)frmCgdjMx(采购登记明细)
此模块可以查看已经登记过的采购明细,包括采购代码、采购商、采购日期,商品名称、商品类别、商品规格、计量单位、单价、数量、金额;总数量、总金额、录入人和备注。并可以将此单据作废。

以下是引用片段:

Private Sub Form_Load()
'设置表格标题和样式
Dim arrName()
    arrName = Array("商品代码", "商品名称", "商品类别", "商品规格", "计量单位", "单价(元)", "数量", "金额(元)")
Dim arrColwidth()
    arrColwidth = Array(0, 2000, 1500, 1000, 1000, 1000, 1500, 1500)
ddd.Cols = 8
ddd.Rows = 2
Dim i As Long
For i = 0 To ddd.Cols - 1
    ddd.ColWidth(i) = arrColwidth(i)
    ddd.TextMatrix(0, i) = arrName(i)
    ddd.TextMatrix(1, i) = ""
Next
ddd.Rows = 50
Me.DTPicker1.Value = Format(Date, "yyyy-mm-dd")
End Sub

Private Sub Form_Resize()
'设置窗体边框和标题
Call FormFace(Me, TopPicture, KKShape)
Call TopCaption(Me.TopPicture, Label2.Caption)
End Sub

Private Sub TopPicture_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'准备窗体移动标志
intOldX = X
intOldy = Y
boolMouseFlag = True
End Sub

Private Sub TopPicture_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'存储窗提议动前的left,top
Dim intLeft, intTop As Integer
intLeft = Me.Left
intTop = Me.Top
If Me.WindowState = 2 Then Exit Sub
If boolMouseFlag = True Then
    Me.Left = intLeft + (X - intOldX)
    Me.Top = intTop + (Y - intOldy)
End If
End Sub

Private Sub TopPicture_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'还原当前的窗体移动标志
boolMouseFlag = False
End Sub

Private Sub UserControl11_Click()
'关闭窗体
Unload Me
End Sub

Private Sub UserControl12_Click()
'校验信息的正确性
'存储结账信息
If Val(Me.Text7.Text) <= 0 Then
   MsgBox "当前没有任何的消费商品!"
   Exit Sub
End If
Call addData
Call frmCgdj.UpdateList
Unload Me
End Sub

Private Sub UserControl13_Click()
'设置frmSpXZ的窗体标志
Set frmObj = Me
frmSpXZ.Tag = "选择商品"
frmSpXZ.Show 1
End Sub

Private Sub addData()
'存储菜单主信息
'存储商品信息
'1
Call Exec_SqL("delete from cgdj where cgid='" & Me.Text2.Text & "'")
Call Exec_SqL("delete from cgmx where cgid='" & Me.Text2.Text & "'")
Call Exec_SqL("insert into cgdj (cgid,khmc,cgrq,zsl,zje,jlr,bz) " _
     & " values('" & Me.Text2.Text & "','" & Trim(Me.Text3.Text) & "'," _
     & "'" & Me.DTPicker1.Value & "'," & Val(Me.Text7.Text) & ", " _
     & " " & Val(Me.Text6.Text) & ",'" & strRyName & "','" & Me.Text1.Text & "')")
Dim i  As Long
'2
For i = 1 To ddd.Rows - 1
    If ddd.TextMatrix(i, 0) <> "" Then
       Call Exec_SqL("insert into cgmx (cgid,spid,sl,je) values('" & Me.Text2.Text & "'," _
        & " '" & Trim(ddd.TextMatrix(i, 0)) & "'," & Val(ddd.TextMatrix(i, ddd.Cols - 2)) & "," & Val(ddd.TextMatrix(i, ddd.Cols - 1)) & ")")
       Dim strresult As String
       strresult = UpdateKcmm(Trim(ddd.TextMatrix(i, 0)), "+", Val(ddd.TextMatrix(i, ddd.Cols - 2)), Val(ddd.TextMatrix(i, ddd.Cols - 1)), "")
       If strresult <> "OK" Then
          MsgBox strresult
          Exit Sub
       End If
    End If
Next
End Sub

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第13页为计算机毕业论文查询信息管理模块介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网
计算机毕业设计客服
计算机毕业论文客服在线 计算机毕业论文客服在线
计算机毕业论文在线,计算机毕业设计在线