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

📄 form1.frm

📁 这个是我们软件工程的课程设计成果
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0FFFF&
      Caption         =   "输入信息"
      Height          =   1935
      Left            =   600
      TabIndex        =   1
      Top             =   3600
      Width           =   8775
      Begin VB.PictureBox Picture2 
         BackColor       =   &H00FFC0FF&
         Height          =   615
         Left            =   7320
         Picture         =   "Form1.frx":08CA
         ScaleHeight     =   555
         ScaleWidth      =   555
         TabIndex        =   20
         Top             =   720
         Width           =   615
      End
      Begin MSDataListLib.DataCombo DataCombo3 
         Bindings        =   "Form1.frx":1194
         DataField       =   "列车类型"
         DataSource      =   "Adodc4"
         Height          =   315
         Left            =   5040
         TabIndex        =   19
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         BackColor       =   12648384
         ListField       =   "列车类型"
         Text            =   "DataCombo3"
      End
      Begin MSDataListLib.DataCombo DataCombo4 
         Bindings        =   "Form1.frx":11A9
         DataField       =   "座位类型"
         DataSource      =   "Adodc5"
         Height          =   315
         Left            =   5040
         TabIndex        =   16
         Top             =   840
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         BackColor       =   12648384
         ListField       =   "座位类型"
         Text            =   "DataCombo4"
      End
      Begin MSDataListLib.DataCombo DataCombo2 
         Bindings        =   "Form1.frx":11BE
         DataField       =   "终点站"
         DataSource      =   "Adodc3"
         Height          =   315
         Left            =   1080
         TabIndex        =   15
         Top             =   960
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         BackColor       =   12648384
         ListField       =   "终点站"
         Text            =   "DataCombo2"
      End
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "Form1.frx":11D3
         DataField       =   "起始站"
         DataSource      =   "Adodc2"
         Height          =   315
         Left            =   1080
         TabIndex        =   14
         Top             =   480
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   556
         _Version        =   393216
         BackColor       =   12648384
         ListField       =   "起始站"
         Text            =   "DataCombo1"
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   5040
         TabIndex        =   7
         Top             =   1320
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         CalendarBackColor=   12648384
         Format          =   58458113
         CurrentDate     =   39317
      End
      Begin VB.Label Label5 
         BackColor       =   &H00C0FFFF&
         Caption         =   "发车日期"
         Height          =   255
         Left            =   4080
         TabIndex        =   6
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label4 
         BackColor       =   &H00C0FFFF&
         Caption         =   "座位类型"
         Height          =   375
         Left            =   4080
         TabIndex        =   5
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label3 
         BackColor       =   &H00C0FFFF&
         Caption         =   "列车类型"
         Height          =   375
         Left            =   4080
         TabIndex        =   4
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label2 
         BackColor       =   &H00C0FFFF&
         Caption         =   "目的站"
         Height          =   375
         Left            =   360
         TabIndex        =   3
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0FFFF&
         Caption         =   "起始站"
         Height          =   375
         Left            =   360
         TabIndex        =   2
         Top             =   480
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "售票信息"
      Height          =   2775
      Left            =   600
      TabIndex        =   0
      Top             =   600
      Width           =   8775
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Form1.frx":11E8
         Height          =   2175
         Left            =   240
         TabIndex        =   13
         Top             =   360
         Width           =   8175
         _ExtentX        =   14420
         _ExtentY        =   3836
         _Version        =   393216
         AllowUpdate     =   0   'False
         BackColor       =   12648384
         ColumnHeaders   =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {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
         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
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.Image Image1 
      Height          =   11520
      Left            =   -1200
      Picture         =   "Form1.frx":11FD
      Top             =   -480
      Width           =   15360
   End
End
Attribute VB_Name = "ForSaleTicket"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public SaleOrBookSale As Boolean

Private Sub Command1_Click()
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
  MsgBox "没有车票!"
  Exit Sub
Else
 Adodc1.RecordSource = "Select * from 未售票登记表 where 起始站 =  '" & DataCombo1.Text _
  & "' and 终点站= '" & DataCombo2.Text & "'and 列车类型= '" & DataCombo3.Text & "' and 座位类型= '" & DataCombo4.Text _
   & "' and 车票状态 = '未售' and 发车时间 >= '" & DTPicker1.Value & "' and  发车时间 <= '" & DTPicker1.Value + 1 & "'"
 
 'Adodc1.RecordSource = "Select * from 未售票登记表 where 发车时间 >= '2005-9-5' and  发车时间 <= '2005-9-6'"
 Adodc1.Refresh

End If

End Sub

Private Sub Command2_Click()
 Dim str As String
 
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
  MsgBox "请选择表中要出售的车票!", vbOKOnly + vbExclamation, "警告"
  Exit Sub
End If
 
  str = Trim(Adodc1.Recordset.Fields(11))
  If str = "已售" Or str = "预售" Then
    MsgBox "车票已被出售!请重新选择!!!", vbOKOnly + vbExclamation, "警告"
    Exit Sub
 End If
 
SaleTicket.Text1 = Adodc1.Recordset.Fields(0)
SaleTicket.Text2 = Adodc1.Recordset.Fields(1)
SaleTicket.Text5 = Adodc1.Recordset.Fields(2)
SaleTicket.Text6 = Adodc1.Recordset.Fields(3)
SaleTicket.Text3 = Adodc1.Recordset.Fields(4)
SaleTicket.Text4 = Adodc1.Recordset.Fields(5)
SaleTicket.Text7 = Adodc1.Recordset.Fields(6)
SaleTicket.Text8 = Adodc1.Recordset.Fields(7)
SaleTicket.Text9 = Adodc1.Recordset.Fields(8)
SaleTicket.Text10 = Adodc1.Recordset.Fields(9)
SaleTicket.Show
End Sub

Private Sub Command3_Click()
Adodc1.RecordSource = "select * from 未售票登记表"
Adodc1.Refresh
End Sub

Private Sub Command4_Click()
Unload Me

End Sub

Private Sub Command5_Click()
Dim str As String
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
  MsgBox "请选择表中要出售的车票!", vbOKOnly + vbExclamation, "警告"
  Exit Sub
End If
str = Trim(Adodc1.Recordset.Fields(11))
  If str = "已售" Or str = "预售" Then
    MsgBox "车票已被出售!请重新选择!!!", vbOKOnly + vbExclamation, "警告"
    Exit Sub
 End If
ForBookTicket.Text6 = Adodc1.Recordset.Fields(0)
ForBookTicket.Text1 = Adodc1.Recordset.Fields(1)
ForBookTicket.Text4 = Adodc1.Recordset.Fields(2)
ForBookTicket.Text5 = Adodc1.Recordset.Fields(3)
ForBookTicket.Text2 = Adodc1.Recordset.Fields(4)
ForBookTicket.Text3 = Adodc1.Recordset.Fields(5)
ForBookTicket.Text7 = Adodc1.Recordset.Fields(6)
ForBookTicket.Text8 = Adodc1.Recordset.Fields(7)
ForBookTicket.Text9 = Adodc1.Recordset.Fields(8)
ForBookTicket.Text10 = Adodc1.Recordset.Fields(9)
ForBookTicket.Text11 = Adodc1.Recordset.Fields(8) - 2

ForBookTicket.Show

End Sub

⌨️ 快捷键说明

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