storehistory.frm

来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 654 行 · 第 1/2 页

FRM
654
字号
            Top             =   240
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "项    数:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   5
            Left            =   120
            TabIndex        =   13
            Top             =   2040
            Width           =   1215
         End
         Begin VB.Label BillName 
            Caption         =   "进货单号:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00800000&
            Height          =   255
            Index           =   0
            Left            =   120
            TabIndex        =   12
            Top             =   240
            Width           =   1215
         End
      End
      Begin MSComctlLib.ListView lstAddress 
         Height          =   6495
         Left            =   120
         TabIndex        =   19
         Top             =   480
         Width           =   9015
         _ExtentX        =   15901
         _ExtentY        =   11456
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         ForeColor       =   8388608
         BackColor       =   -2147483628
         BorderStyle     =   1
         Appearance      =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Name"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Address"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "City, State, Zip"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Notes"
            Object.Width           =   2540
         EndProperty
      End
      Begin MSComctlLib.ListView lstBillDocu 
         Height          =   3615
         Left            =   -74880
         TabIndex        =   20
         Top             =   3240
         Width           =   9855
         _ExtentX        =   17383
         _ExtentY        =   6376
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         _Version        =   393217
         ForeColor       =   8388608
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Name"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Address"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   2
            Text            =   "City, State, Zip"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   3
            Text            =   "Notes"
            Object.Width           =   2540
         EndProperty
      End
   End
End
Attribute VB_Name = "StoreHistory"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Dim NewRecord As Boolean
Dim LastSortIndex As Long, LastSortDir As Long
Private VarOption As Integer
Public lstAddressIndex As Long
Public ModifyBS As Boolean
Public lstBillDocuIndex As Long
Public BillStateBS As Integer
Public OrgRS As ChangeHistory


Private Sub cmdFind_Click()
 VarInitData.SearchClientData = 2
 ClientDataFind.Show 1
End Sub



Private Sub cmbCheckMan_KeyDown(KeyCode As Integer, Shift As Integer)
 cmbCheckMan.Text = ""
End Sub

Private Sub cmbCheckMan_KeyUp(KeyCode As Integer, Shift As Integer)
 cmbCheckMan.Text = ""
End Sub

Private Sub Command1_Click(Index As Integer)
 Dim i As Integer
 Dim TempRS As MYSQL_RS
 Dim TempVar As Long
 Dim TempSQL As String
 Dim TempBillType As Integer
 Select Case Index
  Case 0
    VarInitData.StoreBS = False
    SearchGoods13.Show 1
  Case 1
   TempSQL = VarInitData.DisplaySQLVal(31)
   VarInitData.LoadData lstAddress, TempSQL
  Case 6
   If lstAddress.SelectedItem Is Nothing Then Exit Sub
   VarCrystal.DispalyStoreDealReport lstAddress.SelectedItem.Text, 31

 End Select
 VarInitData.DealListView lstAddress, lstAddressIndex
End Sub
Private Sub Form_Activate()
    VarInitData.DealListView lstAddress, lstAddressIndex

End Sub

Private Sub Form_Load()
  Dim i As Integer
  Dim TempSQL As String
    VarInitData.InitBSE BSE1
    Frame2.Visible = False
    Frame2.Enabled = False
    lstBillDocu.Visible = False
    lstAddress.Visible = True
    Set OrgRS = New ChangeHistory
   ' OrgRs.KeyCount = 0
    VarInitData.LoadData lstAddress, VarInitData.DisplaySQLVal(31)
    
    TempSQL = "Select name From workertable "
    VarInitData.LoadData cmbCheckMan, TempSQL, 1
End Sub


Private Sub Form_Resize()
 If Me.ScaleHeight > 0 And Me.ScaleWidth > 0 Then
  frameInfo.left = Me.ScaleLeft
  frameInfo.tOp = Me.ScaleTop
  frameInfo.Width = Me.ScaleWidth
  SSStock.tOp = frameInfo.tOp + frameInfo.Height
  SSStock.left = Me.ScaleLeft + 70
  SSStock.Width = Me.ScaleWidth - 140
  SSStock.Height = Me.ScaleHeight - frameInfo.Height - 50    'Screen.Height - 2650
  lstAddress.tOp = 450
  lstAddress.left = 70
  lstAddress.Width = SSStock.Width - 140
  lstAddress.Height = SSStock.Height - 550
  Frame2.left = 70
  Frame2.tOp = 450
  Frame2.Width = SSStock.Width - 140
  lstBillDocu.tOp = Frame2.tOp + Frame2.Height
  lstBillDocu.left = 70
  lstBillDocu.Width = SSStock.Width - 140
  lstBillDocu.Height = SSStock.Height - Frame2.Height - 550
 End If
End Sub


Private Sub Form_Unload(Cancel As Integer)
 If BSE1.EngineStarted Then BSE1.EndSubClassing

End Sub











Private Sub lstAddress_ItemClick(ByVal Item As MSComctlLib.ListItem)
'Dim templong As Long
'Stop
lstAddressIndex = Item.Index
'templong = Item.Text
End Sub




Private Sub lstBillDocu_ItemClick(ByVal Item As MSComctlLib.ListItem)
 lstBillDocuIndex = Item.Index
 
End Sub



Private Sub SSStock_Click(PreviousTab As Integer)
 Dim TempSQL As String
 Dim TempStr As String
 Dim TempRS As MYSQL_RS
 Dim TempBillType As Integer
 Dim i As Integer
 If PreviousTab <> 0 Then
  For i = 0 To 1
   Command1(i).Visible = True
  Next i
  Frame2.Visible = False
  lstBillDocu.Visible = False
  lstAddress.Visible = True
  VarInitData.DealListView lstAddress, lstAddressIndex
 Else
  Frame2.Visible = True
  lstBillDocu.Visible = True
  lstAddress.Visible = False
  ClearFrame2
  If lstAddress.ListItems.Count > 0 Then
   TempStr = lstAddress.ListItems(lstAddressIndex).Text
  Else
   TempStr = ""
  End If
  TempSQL = VarInitData.DisplaySQLVal(32) & " Where billnum = " & Quote(TempStr)
  VarInitData.LoadData2 lstBillDocu, TempSQL, OrgRS
  VarInitData.DealListView lstBillDocu, lstBillDocuIndex
 ' If BillStateBS = 2 Then OrgRs.InitItem lstBillDocu.ListItems.Count
  If lstAddressIndex > 0 And lstAddress.ListItems.Count > 0 Then
    StoreHistory.lblBillNum = lstAddress.ListItems(lstAddressIndex).Text

    With lstAddress.ListItems(lstAddressIndex)
      DTDate.Value = .SubItems(1)
      StoreHistory.lblOperateMan = .SubItems(2)
      StoreHistory.cmbCheckMan = .SubItems(3)
      StoreHistory.lblGItemCount = .SubItems(4)
      StoreHistory.lblGCount = .SubItems(5)
      StoreHistory.lblGMoney = .SubItems(6)
    End With
  End If
 End If
End Sub
Private Sub ClearFrame2()
 With StoreHistory
  .lblBillNum = ""
  .lblGCount = "0"
  .lblGItemCount = "0"
  .lblOperateMan = ""
  .lblGMoney = "0"
  .cmbCheckMan = ""
  .DTDate = Date
 End With
End Sub

⌨️ 快捷键说明

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