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

VB销售管理系统(11)

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

计算机毕业设计续上代码:

以下是引用片段:

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

Private Sub Form_Activate()
'让当前窗体最大化
Me.WindowState = 2
Call btn添加_Click
End Sub

Private Sub Form_Load()
'初始化当前窗体的一些控件
Me.DTPicker1.Value = Format(Date, "yyyy-mm-dd")
Me.DTPicker2.Value = Format(Date, "yyyy-mm-dd")
End Sub

Private Sub Form_Resize()
'动态改变窗体上控件的布局和大小
Call FormFace(Me, TopPicture, KKShape)
Me.Picture3.Move 0, Me.Picture3.Top, Me.Picture3.Width, Me.Height - Me.Picture3.Top
Me.ddd.Move Me.Picture3.Width - 15, Me.ddd.Top, Me.Width - Me.Picture3.Width, Me.Height - Me.ddd.Top
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()
Call ddd_DblClick
End Sub

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

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

【联系方式】

【本站信誉】

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