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

📄 zhuxiao.frm

📁 此系统实现了火车票订票系统的部分功能
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form zhuxiao 
   BackColor       =   &H80000010&
   Caption         =   "注销乘客信息"
   ClientHeight    =   5925
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   6885
   LinkTopic       =   "Form4"
   ScaleHeight     =   5925
   ScaleWidth      =   6885
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command3 
      Caption         =   "返回主界面"
      Height          =   495
      Left            =   5280
      TabIndex        =   8
      Top             =   4320
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid2 
      Height          =   735
      Left            =   2520
      TabIndex        =   7
      Top             =   840
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   1296
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "显示"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2520
      TabIndex        =   6
      Top             =   120
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H80000017&
      Caption         =   "注销"
      Height          =   495
      Left            =   5640
      TabIndex        =   5
      Top             =   3360
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   5640
      TabIndex        =   3
      Top             =   2400
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      DragMode        =   1  'Automatic
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   1720
      _Version        =   393216
      FocusRect       =   2
      GridLinesFixed  =   3
      MergeCells      =   4
      Appearance      =   0
   End
   Begin VB.Label Label3 
      Caption         =   "乘客订票信息"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   360
      TabIndex        =   4
      Top             =   120
      Width           =   1935
   End
   Begin VB.Label Label2 
      Caption         =   "请输入要注销的用户名:"
      Height          =   495
      Left            =   5640
      TabIndex        =   2
      Top             =   1440
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "根据上表情况对未订票的用户进行注销"
      Height          =   1935
      Left            =   5040
      TabIndex        =   1
      Top             =   1440
      Width           =   495
   End
End
Attribute VB_Name = "zhuxiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim rst As ADODB.Recordset
Dim cmd As ADODB.Command

Private Sub Command1_Click()
 Form_Load
 Dim RST3 As New ADODB.Recordset
 If Text1.Text = "" Then
    MsgBox "不能为空!", vbOKOnly + vbExclamation, "警告!"
 Else
     Set RST3 = conn.Execute("exec zhuxiao '" & Text1.Text & "'")
     MsgBox "删除成功!", vbOKOnly + vbExclamation, "提示!"
     conn.Close
 End If
End Sub

Private Sub Command2_Click()
  Form_Load
  Dim RST1 As New ADODB.Recordset
  Dim RST2 As New ADODB.Recordset
  Set RST1 = conn.Execute("exec seleuser1")
  With MSFlexGrid1
      .CellAlignment = 4
      .Rows = 2
      .Cols = 2
      .TextMatrix(1, 0) = "身份证"
      .TextMatrix(1, 1) = "订票次数"
    While RST1.EOF = False
      .CellAlignment = 4
      .Rows = .Rows + 1
      .TextMatrix(.Rows - 1, 0) = RST1.Fields(0)
      .TextMatrix(.Rows - 1, 1) = RST1.Fields(1)
      RST1.MoveNext
    Wend
    RST1.Close
   End With
  Set RST2 = conn.Execute("exec seluser2")
  With MSFlexGrid2
     .CellAlignment = 4
     .Rows = 2
     .Cols = 2
     .TextMatrix(1, 0) = "身份证"
     .TextMatrix(1, 1) = "订票次数"
   While RST2.EOF = False
     .CellAlignment = 4
     .Rows = .Rows + 1
     .TextMatrix(.Rows - 1, 0) = RST2.Fields(0)
     .TextMatrix(.Rows - 1, 1) = RST2.Fields(1)
     RST2.MoveNext
    Wend
   RST2.Close
  End With
  conn.Close
End Sub

Private Sub Command3_Click()
 Unload Me
End Sub

Private Sub Form_Load()
 Dim ConnectString As String
   Set conn = New ADODB.Connection
   ConnectString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" _
   & "Persist Security Info=False;Initial Catalog=陈念;" _
   & "Data Source=3302A68391D44A0"
   conn.CursorLocation = adUseClient
   conn.Open ConnectString
End Sub

⌨️ 快捷键说明

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