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

📄 frmcpucard.frm

📁 一个完整的非接触IC卡会员管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmCpuCard 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "发卡"
   ClientHeight    =   6470
   ClientLeft      =   30
   ClientTop       =   420
   ClientWidth     =   7530
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6470
   ScaleWidth      =   7530
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdAdd 
      Caption         =   "发卡"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5760
      TabIndex        =   7
      Top             =   240
      Width           =   1575
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5760
      TabIndex        =   6
      Top             =   720
      Width           =   1575
   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          =   1570
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   5050
      Begin VB.TextBox txtName 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   370
         Left            =   1800
         TabIndex        =   8
         Top             =   960
         Width           =   2170
      End
      Begin VB.TextBox txtNewUserID 
         Alignment       =   1  'Right Justify
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1800
         MaxLength       =   8
         TabIndex        =   3
         Text            =   "00000000"
         Top             =   480
         Width           =   2170
      End
      Begin VB.Label Label3 
         Caption         =   "卡号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   260
         Left            =   360
         TabIndex        =   5
         Top             =   480
         Width           =   1810
      End
      Begin VB.Label Label1 
         Caption         =   "姓名:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   260
         Left            =   360
         TabIndex        =   4
         Top             =   960
         Width           =   1100
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   370
      Left            =   5760
      TabIndex        =   0
      Top             =   1320
      Width           =   1575
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   3850
      Left            =   240
      TabIndex        =   1
      Top             =   2400
      Width           =   7090
      _ExtentX        =   12506
      _ExtentY        =   6791
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   11.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
End
Attribute VB_Name = "frmCpuCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim pscard As New ADODB.Recordset '本地临时库
Dim rs As New ADODB.Recordset
Dim pssql As String
Dim M1Key As String
Dim data32 As String * 32
Dim databuff32 As String * 32
Dim txtMoney As Currency
Dim pbout(3) As Byte

Private Sub cmdAdd_Click() '新增管理用户

On Error GoTo err:
    
    If txtNewUserID <> "" And txtname.Text <> "" Then
        If MsgBox("请将新的M1卡放在读写器上!", vbQuestion + vbYesNo, "提示") <> vbYes Then
            Exit Sub
        End If
        
        Set rs = GetRecordset(maSys_db, "select *  from LinkUser_Dict where M1_CardID='" & Trim(txtNewUserID) & "'")
        If Not (rs.EOF And rs.BOF) Then
            MsgBox "该卡号在数据库中已经存在,请检查!", vbInformation + vbOKOnly, "提示"
        Else
''            M1Key = "ffffffffffff"
''            For i = 0 To 3
''                st = rf_load_key_hex(ByVal icdev, 0, 14, ByVal M1Key)
''                If st = 0 Then Exit For
''            Next
''''            If MsgBox("确认要发行卡号为" & txtNewUserID & "的新卡吗?", vbQuestion + vbYesNo, "提示") <> vbYes Then
''''                 Exit Sub
''''            End If
            txtMoney = 0
            M1Key = "e0e1e2e3e4e5"
            For i = 0 To 3
                st = rf_load_key_hex(ByVal icdev, 0, 14, ByVal M1Key)
                If st = 0 Then Exit For
            Next
            
            For i = 0 To 3
                st = rf_card(ByVal icdev, 1, pbout(0))
                If st = 0 Then Exit For
            Next
            
            For i = 0 To 3
                st = rf_authentication(ByVal icdev, 0, 14)  '验正14扇区密码
                If st = 0 Then Exit For
                If i = 3 And st <> 0 Then
                      MsgBox "验证密钥错误,请检查!", vbInformation + vbOKOnly, "提示"
                      Exit Sub
                End If

⌨️ 快捷键说明

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