⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmhelp.frm

📁 用VB6.0编写的关于车辆运输调度的系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmHelp 
   Caption         =   "Download order's Product"
   ClientHeight    =   6060
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6525
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6060
   ScaleWidth      =   6525
   StartUpPosition =   2  'CenterScreen
   Begin MSComctlLib.ListView lsvProc 
      Height          =   5895
      Left            =   15
      TabIndex        =   0
      Top             =   120
      Width           =   6495
      _ExtentX        =   11456
      _ExtentY        =   10398
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
End
Attribute VB_Name = "frmHelp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public lprocode As Long, lcuscode As Long
Public sprodesc As String, scusdesc As String
Public lsalonum As Long, lpicknum As Long, lsalolin As Long
Public dquantity As Double, smeaunit As String

Private Sub Form_Load()

    Me.Left = 1500
    Me.Top = 1500
       
    Call Inilsv
    
    Call setOrderInfo(lprocode)
    
End Sub


Private Sub Inilsv()
    
    With lsvProc
        .FullRowSelect = True
        .MultiSelect = False
        .LabelEdit = lvwManual
        
        .ColumnHeaders.Add , "K1", "No", 400
        .ColumnHeaders.Add , "K2", "Product Code", 1500
        .ColumnHeaders.Add , "K3", "Product Desc", .Width - 2000
'        .ColumnHeaders.Add , "K3", "Customer Code", 1600
'        .ColumnHeaders.Add , "K4", "Customer Desc", 2000
'        .ColumnHeaders.Add , "K5", "Order Number", 1500
'        .ColumnHeaders.Add , "K6", "Pick Slip Number", 1900
'        .ColumnHeaders.Add , "K7", "Order Line Number", 2000
'        .ColumnHeaders.Add , "K8", "Quantity", 1200
'        .ColumnHeaders.Add , "K9", "Unit of Measurement", 2200
    
    End With
    
    
End Sub

Private Sub setOrderInfo(ByVal lprocode As Long)
Dim sSQL As String, sprocode As String
Dim ItemX As ListItem
Dim rstOrderInfo As Recordset
Dim iCount As Long
    
  If lprocode = 0 Then
    sSQL = "select distinct a.itecode,a.itedesc from Orderd a,appite b where a.itecode=b.itecode and a.salotyp='DO' order by a.itecode"
  Else
    sSQL = "select distinct a.itecode,a.itedesc from Orderd a,appite b where a.itecode=b.itecode and a.salotyp='DO' and a.itecode=" & lprocode & " order by a.itecode"
  End If
    Set rstOrderInfo = Acs_cnt.Execute(sSQL)

    With rstOrderInfo
    Do While Not .EOF
        iCount = iCount + 1
        Set ItemX = lsvProc.ListItems.Add(, "K" & iCount, iCount)
        ItemX.SubItems(1) = .Fields("itecode")
        ItemX.SubItems(2) = .Fields("itedesc")
'        ItemX.SubItems(2) = .Fields("cuscode")
'        ItemX.SubItems(3) = .Fields("cusdesc")
'        ItemX.SubItems(4) = .Fields("salonum")
'        ItemX.SubItems(5) = .Fields("picknum")
'        ItemX.SubItems(6) = .Fields("salolin")
'        ItemX.SubItems(7) = .Fields("sugoqty")
'        ItemX.SubItems(8) = .Fields("meaunit")
        .MoveNext
    Loop
    End With

    rstOrderInfo.Close
    Set rstOrderInfo = Nothing

    If lsvProc.ListItems.Count > 0 Then
        lsvProc.ListItems(1).Selected = True
    End If
    
End Sub

Private Sub Image1_Click()

End Sub

Private Sub lsvProc_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
    lsvProc.SortKey = ColumnHeader.Index - 1
'    lsvProc.SortOrder = lvwAscending
    lsvProc.Sorted = True
End Sub

Private Sub lsvProc_DblClick()

    If lsvProc.ListItems.Count > 0 Then
        If lsvProc.SelectedItem.Index > 0 Then
            lprocode = lsvProc.SelectedItem.SubItems(1)
            sprodesc = lsvProc.SelectedItem.SubItems(2)
'            lcuscode = lsvProc.SelectedItem.SubItems(2)
'            scusdesc = lsvProc.SelectedItem.SubItems(3)
'            lsalonum = lsvProc.SelectedItem.SubItems(4)
'            lpicknum = lsvProc.SelectedItem.SubItems(5)
'            lsalolin = lsvProc.SelectedItem.SubItems(6)
'            dquantity = lsvProc.SelectedItem.SubItems(7)
'            smeaunit = lsvProc.SelectedItem.SubItems(8)
            
        End If
    End If

    Unload Me

End Sub

Private Sub lsvProc_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then
        Call lsvProc_DblClick
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -