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

📄 frmcollectioncurrent.frm

📁 一个完整的非接触IC卡会员管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{4C4DC282-32A7-11D6-ADC8-00106076638B}#1.0#0"; "WHT2.ocx"
Begin VB.Form frmCollectionCurrent 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "采集消费数据"
   ClientHeight    =   4995
   ClientLeft      =   30
   ClientTop       =   420
   ClientWidth     =   6675
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4995
   ScaleWidth      =   6675
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   1440
      TabIndex        =   11
      Text            =   "Combo1"
      Top             =   2280
      Width           =   2415
   End
   Begin MSComctlLib.ProgressBar PB 
      Height          =   375
      Left            =   120
      TabIndex        =   10
      Top             =   3720
      Width           =   6375
      _ExtentX        =   11245
      _ExtentY        =   661
      _Version        =   393216
      Appearance      =   1
   End
   Begin WHT2.WHTOCX2 WHTOCX21 
      Height          =   495
      Left            =   120
      TabIndex        =   9
      Top             =   4320
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   873
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "数据对象"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   972
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   6372
      Begin VB.OptionButton Option3 
         Caption         =   "手持机数据"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   4200
         TabIndex        =   13
         Top             =   360
         Width           =   1575
      End
      Begin VB.OptionButton Option2 
         Caption         =   "车载机联机数据"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   2040
         TabIndex        =   8
         Top             =   360
         Width           =   2535
      End
      Begin VB.OptionButton Option1 
         Caption         =   "采集器数据"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   360
         TabIndex        =   7
         Top             =   360
         Value           =   -1  'True
         Width           =   2295
      End
   End
   Begin VB.CheckBox Check2 
      Caption         =   "校对日期时间"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1800
      Value           =   1  'Checked
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出(&X)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3360
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   4320
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "采集(&G)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   4320
      Width           =   1215
   End
   Begin VB.PictureBox Picture2 
      Height          =   612
      Left            =   120
      ScaleHeight     =   555
      ScaleWidth      =   6315
      TabIndex        =   2
      Top             =   3000
      Width           =   6372
      Begin VB.Label txtMsg 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   252
         Left            =   0
         TabIndex        =   3
         Top             =   120
         Width           =   6372
      End
   End
   Begin VB.CheckBox Check1 
      Caption         =   "更新黑名单"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   1440
      Value           =   1  'Checked
      Width           =   1935
   End
   Begin VB.Label Label1 
      Caption         =   "通讯端口:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   12
      Top             =   2280
      Width           =   1335
   End
End
Attribute VB_Name = "frmCollectionCurrent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mlBaud As Long
Dim giCollectPort As Integer
Dim cur_tod_snt_path As String
Dim bf_tod_snt_path As String
Dim hCom As Long

Private Sub Command1_Click()
Dim psPCPathFile As String
Dim psBFPathFile As String
Dim psFileName As String
Dim psBlackPathFile As String
Dim piRet As Integer
On Error GoTo E

If Combo1.Text = "串口一" Then
    giCollectPort = 1
ElseIf Combo1.Text = "串口一" Then
    giCollectPort = 2
Else
    Exit Sub
End If

'If Option3.Value = True Then '采集手持机充值充次数据
'    Screen.MousePointer = 11
'    sfPath = Dir1.Path + "\"
'    sfName = "12345678901234567890123456789012345678901234567890"   '此值无意义,但长度要大于32
'
'    ltemp = GetHansetData(hCom, sfPath, sfName)
'    If ltemp = 0 Then
'        Label2(0).Caption = "采集当前数据成功" + Chr(10) + Chr(13) + "文件名:"
'        Text3.Text = sfName
'    Else
'        On Error Resume Next
'        MsgBox "采集当前文件错误!" + Chr(10) + Chr(13) + "错误ID:" + CStr(ltemp), , "提示"
'        Kill sfPath + sfName    '删除建立的文件
'    End If
'    Screen.MousePointer = 0
'End If

If Option2.Value = True Or Option3.Value = True Then '直接采集数据
    hCom = OpenComm(giCollectPort, 19200)
    If hCom >= 0 Then
        Dim sfPath As String
        Dim sfName As String
        Dim ltemp As Long
        
        Screen.MousePointer = 11
        If Check2 Then '校时
             Dim ss As String
             txtMsg = "开始校时!"
             ss = Format(Now, "yyyymmddhhmmss")
             ltemp = SetBusPosTime(hCom, ss)
             If ltemp = 0 Then
                txtMsg = "较时成功!"
             Else
                txtMsg = "较时错误!"
             End If
        End If
        
        sfPath = App.Path & "\bakup\cur\tod\"
        sfName = "12345678901234567890123456789012345678901234567890"   '此值无意义,但长度要大于32
        
        If Option3.Value = True Then
            txtMsg = "开始采集手持机充值数据,请等待..."
            ltemp = GetHansetData(hCom, sfPath, sfName)
            
        Else
            txtMsg = "开始采集车载机数据,请等待..."
            ltemp = GetCurData(hCom, sfPath, sfName)
        End If
        If ltemp = 0 Then
            txtMsg = "数据采集完毕!"
        Else
            On Error Resume Next

⌨️ 快捷键说明

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