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

📄 frm_dpcx.frm

📁 采用VB编写的学生订票管理系统 有详细的代码~解压后可以直接使用!~附有使用说明
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form Frm_dpcx 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "订票查询"
   ClientHeight    =   4980
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8370
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   4980
   ScaleWidth      =   8370
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "车次信息"
      Height          =   1305
      Left            =   45
      TabIndex        =   1
      Top             =   105
      Width           =   8250
      Begin VB.CommandButton Command4 
         Caption         =   "退出"
         Height          =   375
         Left            =   5850
         TabIndex        =   11
         Top             =   795
         Width           =   795
      End
      Begin VB.CommandButton Command3 
         Caption         =   "查询"
         Height          =   375
         Left            =   3195
         TabIndex        =   10
         Top             =   750
         Width           =   795
      End
      Begin VB.TextBox Text1 
         Height          =   390
         Left            =   1440
         TabIndex        =   9
         Top             =   720
         Width           =   1695
      End
      Begin VB.OptionButton Option3 
         Caption         =   "按学号查询"
         Height          =   300
         Left            =   105
         TabIndex        =   8
         Top             =   750
         Width           =   1275
      End
      Begin VB.OptionButton Option2 
         Caption         =   "按日期查询"
         Height          =   180
         Left            =   4080
         TabIndex        =   7
         Top             =   300
         Width           =   1290
      End
      Begin VB.OptionButton Option1 
         Caption         =   "按车次查询"
         Height          =   285
         Left            =   90
         TabIndex        =   6
         Top             =   240
         Width           =   1320
      End
      Begin VB.CommandButton Command2 
         Caption         =   "查询"
         Height          =   375
         Left            =   7260
         TabIndex        =   5
         Top             =   180
         Width           =   795
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   375
         Left            =   3210
         TabIndex        =   3
         Top             =   180
         Width           =   795
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1440
         TabIndex        =   2
         Top             =   210
         Width           =   1740
      End
      Begin MSComCtl2.DTPicker DTP1 
         Height          =   345
         Left            =   5385
         TabIndex        =   4
         Top             =   210
         Width           =   1725
         _ExtentX        =   3043
         _ExtentY        =   609
         _Version        =   393216
         Format          =   70123521
         CurrentDate     =   39436
      End
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MS1 
      Height          =   3330
      Left            =   0
      TabIndex        =   0
      Top             =   1530
      Width           =   8325
      _ExtentX        =   14684
      _ExtentY        =   5874
      _Version        =   393216
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   360
      Left            =   285
      Top             =   6705
      Width           =   2535
      _ExtentX        =   4471
      _ExtentY        =   635
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "Frm_dpcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
    rs.Open "select * from tb_cpyd where 车次='" & Combo1.Text & "'and 备注='订票'", cnn, adOpenKeyset
    Set MS1.DataSource = rs
    rs.Close
End Sub
Private Sub Command2_Click()
Dim rs As New ADODB.Recordset
    rs.Open "select * from tb_cpyd where 乘坐日期='" & DTP1.Value & "' and 备注='订票'", cnn, adOpenKeyset, adLockOptimistic
    Set MS1.DataSource = rs
    rs.Close
End Sub
Private Sub Command3_Click()
  Dim rs As New ADODB.Recordset
  rs.Open "select * from tb_cpyd where 学号='" & Text1.Text & "'and 备注='订票'", cnn, adOpenKeyset, adLockOptimistic
  Set MS1.DataSource = rs
End Sub
Private Sub Command4_Click()
    Unload Me
    Frm_main.Show
End Sub
Private Sub Form_Load()
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
    rs.Open "select distinct 车次 from tb_cpyd", cnn, adOpenKeyset
    If rs.RecordCount > 0 Then
        For i = 1 To rs.RecordCount
            Combo1.AddItem rs.Fields("车次").Value
            rs.MoveNext
        Next i
    End If
    rs.Close
    rs1.Open "select * from tb_cpyd where 备注='订票'", cnn, adOpenKeyset, adLockOptimistic
    Set MS1.DataSource = rs1
    rs1.Close
    Combo1.Enabled = True
    Command1.Enabled = True
    DTP1.Enabled = False
    DTP1.Value = Date
    Command2.Enabled = False
    Text1.Enabled = False
    Command3.Enabled = False
End Sub
Private Sub Option1_Click()
    Combo1.Enabled = True
    Command1.Enabled = True
    DTP1.Enabled = False
    Command2.Enabled = False
    Text1.Enabled = False
    Command3.Enabled = False
End Sub
Private Sub Option2_Click()
    DTP1.Enabled = True
    Command2.Enabled = True
    Command1.Enabled = False
    Text1.Enabled = False
    Command3.Enabled = False
    Combo1.Enabled = False
End Sub
Private Sub option3_click()
    Text1.Enabled = True
    Command3.Enabled = True
    Combo1.Enabled = False
    Command1.Enabled = False
    DTP1.Enabled = False
    Command2.Enabled = False
End Sub

⌨️ 快捷键说明

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