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

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

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

计算机毕业设计查询信息管理模块介绍:

4.3.3 查询信息管理
由于采购信息查询和销售信息查询类似,下面以采购信息查询的程序实现为例进行说明。
(1)frmSellFind(采购信息查询)
此页面可以通过选择、输入查询条件进行查询,列表中显示采购日期、供应商名称、总数量、总金额、记录人、备注,统计信息中显示业务笔数、总数量和总金额

以下是引用片段:

Private Sub btn添加_Click()
'1.设置表格样式和标题
'2.以不同的查询模式更新显示列表
'3.计算业务量,总金额和交费金额
'1
Dim arrName()
    arrName = Array("采购代码", "采购日期", "供应商名称", "总数量", "总金额", "记录人", "备注")
Dim arrColwidth()
    arrColwidth = Array(0, 3000, 3000, 2500, 2000, 2000, 3000)
ddd.Cols = 7
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 = 27
'2
Call UpdateDDD(ddd, ExecSql("select cgid,cgrq,khmc,zsl,zje,jlr,bz from cgdj " _
     & " where cgrq>='" & Me.DTPicker1.Value & "' and cgrq<='" & Me.DTPicker2.Value & "' " _
     & " and khmc like '" & Me.Text1.Text & "%' and jlr like '" & Me.Text2.Text & "%' order by cgrq desc "))
'3
Me.Text3.Text = 0
Me.Text4.Text = 0
Me.Text5.Text = 0
For i = 1 To ddd.Rows - 1
    If ddd.TextMatrix(i, 0) <> "" Then
       Me.Text3.Text = Val(Me.Text3.Text) + 1
    End If
    If ddd.TextMatrix(i, 4) <> "" Then
       Me.Text4.Text = Val(Me.Text4.Text) + Val(ddd.TextMatrix(i, 3))
    End If
    If ddd.TextMatrix(i, 5) <> "" Then
       Me.Text5.Text = Val(Me.Text5.Text) + Val(ddd.TextMatrix(i, 4))
    End If
Next
End Sub

Private Sub ddd_DblClick()
'1.当选择一笔业务时,显示其详细的信息(业务信息和商品信息)
'注:信息显示模式为调用 Sql Server数据库中的视图
'2.循环显示商品信息
'1
If ddd.TextMatrix(ddd.Row, 0) = "" Then Exit Sub
frmCgdjMx.Text2.Tag = Trim(ddd.TextMatrix(ddd.Row, 0))
frmCgdjMx.Text2.Text = Trim(ddd.TextMatrix(ddd.Row, 0))
frmCgdjMx.DTPicker1.Value = Trim(ddd.TextMatrix(ddd.Row, 1))
frmCgdjMx.Text3.Text = Trim(ddd.TextMatrix(ddd.Row, 2))
frmCgdjMx.Text1.Text = Trim(ddd.TextMatrix(ddd.Row, 6))
frmCgdjMx.Text7.Text = Trim(ddd.TextMatrix(ddd.Row, 3))
frmCgdjMx.Text6.Text = Trim(ddd.TextMatrix(ddd.Row, 4))
frmCgdjMx.Text4.Text = Trim(ddd.TextMatrix(ddd.Row, 5))
Dim rs As New ADODB.Recordset
'2
Set rs = ExecSql("select * from V_采购登记 where cgid='" & Trim(ddd.TextMatrix(ddd.Row, 0)) & "'")
With rs
     If .RecordCount > 0 Then
        Dim i As Long
        Dim ii  As Long
        i = 1
        Do Until .EOF
           For ii = 0 To frmCgdjMx.ddd.Cols - 1
               frmCgdjMx.ddd.TextMatrix(i, ii) = " " & Trim(.Fields(ii).Value)
           Next
           .MoveNext
           i = i + 1
        Loop
     End If
End With
frmCgdjMx.UserControl13.Enabled = False
frmCgdjMx.UserControl12.Enabled = False
frmCgdjMx.UserControl14.Enabled = False
frmCgdjMx.UserControl15.Enabled = False
frmCgdjMx.Show 1
End Sub

Private Sub ddd_RowColChange()
'高亮度显示当前的选择记录
Call MoveRow(ddd, ddd.Row)
End Sub

<责任编辑:计算机毕业设计网(http://www.xiaoniu168.com)>

【联系方式】

【本站信誉】

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