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

📄 frmcardnohang.frm

📁 数据库管理系统的实习内容
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmCardnohang 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "一卡通解挂失操作"
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4590
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   4590
   Begin VB.CommandButton cmdRefresh 
      Caption         =   "刷新(&R)"
      Height          =   375
      Left            =   1920
      TabIndex        =   4
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "退出(&X)"
      Height          =   375
      Left            =   3360
      TabIndex        =   3
      Top             =   2400
      Width           =   855
   End
   Begin VB.CommandButton cmdNohang 
      Caption         =   "解挂失"
      Height          =   375
      Left            =   360
      TabIndex        =   2
      Top             =   2400
      Width           =   975
   End
   Begin VB.ComboBox comboStatue 
      Height          =   315
      Left            =   1560
      TabIndex        =   1
      Top             =   1440
      Width           =   2295
   End
   Begin VB.TextBox txtCardno 
      Height          =   375
      Left            =   1560
      TabIndex        =   0
      Top             =   720
      Width           =   2175
   End
   Begin VB.Frame Frame1 
      Caption         =   "解挂失信息"
      Height          =   1935
      Left            =   360
      TabIndex        =   5
      Top             =   240
      Width           =   3855
      Begin VB.Label Label1 
         Caption         =   "卡号"
         Height          =   375
         Left            =   360
         TabIndex        =   7
         Top             =   600
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "卡状态"
         Height          =   495
         Left            =   360
         TabIndex        =   6
         Top             =   1200
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frmCardnohang"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdNohang_Click()
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    Dim txtSQL As String
    
    If Not Testtxt(txtCardno.Text) Then
        MsgBox "请输入卡号!", vbOKOnly + vbExclamation, "提示您"
        txtCardno.SetFocus
        Exit Sub
    End If
    
    If Not IsNumeric(Trim(txtCardno.Text)) Then
        MsgBox "请输入数字!", vbOKOnly + vbExclamation, "提示您"
        Exit Sub
        txtCardno.SetFocus
    End If
    
    txtSQL = "select * from card_Info where card_ID='" & Trim(txtCardno) & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = True Then
            MsgBox "您的一卡通没有注册!", vbOKOnly + vbExclamation, "警告"
           txtCardno.SetFocus
           txtCardno.Text = ""
           txtCardno.SelStart = 0
           txtCardno.SelLength = Len(txtCardno)
           Exit Sub
    End If
    mrc.Close
    
    txtSQL = "select * from hang_Info where card_ID='" & Trim(txtCardno) & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = True Then
            MsgBox "您的一卡通没有挂失!", vbOKOnly + vbExclamation, "提示"
           txtCardno.SetFocus
           txtCardno.Text = ""
           txtCardno.SelStart = 0
           txtCardno.SelLength = Len(txtCardno)
            Exit Sub
    Else
    comboStatue.ListIndex = 0
    comboStatue.Enabled = False
    mrc.Delete
    mrc.Update
    mrc.Close
    MsgBox "您的一卡通解挂失成功!", vbOKOnly + vbExclamation, "恭喜"
   End If
   
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdRefresh_Click()
    txtCardno.Text = ""
    comboStatue.ListIndex = 1
    comboStatue.Enabled = False

End Sub



Private Sub Form_Load()
    Dim mrc As ADODB.Recordset
    Dim txtSQL As String
    Dim MsgText As String
    Dim i As Integer
    
    comboStatue.AddItem "正常"
    comboStatue.AddItem "挂失"
    comboStatue.ListIndex = 1
    comboStatue.Enabled = False
    
End Sub



Private Sub txtCard_Change()

End Sub

⌨️ 快捷键说明

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