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

📄 saleticket.frm

📁 这个是我们软件工程的课程设计成果
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Enabled         =   0   'False
         Height          =   375
         Left            =   960
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   405
         Left            =   960
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label13 
         BackColor       =   &H00FFC0C0&
         Caption         =   "( 元 )"
         Height          =   255
         Left            =   8400
         TabIndex        =   30
         Top             =   2040
         Width           =   375
      End
      Begin VB.Label Label12 
         BackColor       =   &H00FFC0C0&
         Caption         =   "车票折后价"
         Height          =   375
         Left            =   5400
         TabIndex        =   23
         Top             =   2040
         Width           =   975
      End
      Begin VB.Label Label11 
         BackColor       =   &H00FFC0C0&
         Caption         =   "乘客类型"
         Height          =   375
         Left            =   5520
         TabIndex        =   22
         Top             =   1440
         Width           =   855
      End
      Begin VB.Label Label10 
         BackColor       =   &H00FFC0C0&
         Caption         =   "到站时间"
         Height          =   375
         Left            =   5520
         TabIndex        =   20
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label9 
         BackColor       =   &H00FFC0C0&
         Caption         =   "发车时间"
         Height          =   375
         Left            =   5520
         TabIndex        =   19
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label8 
         BackColor       =   &H00FFC0C0&
         Caption         =   "座位号"
         Height          =   375
         Left            =   3120
         TabIndex        =   18
         Top             =   2040
         Width           =   735
      End
      Begin VB.Label Label7 
         BackColor       =   &H00FFC0C0&
         Caption         =   "车厢号"
         Height          =   375
         Left            =   3120
         TabIndex        =   17
         Top             =   1440
         Width           =   615
      End
      Begin VB.Label Label6 
         BackColor       =   &H00FFC0C0&
         Caption         =   "终点站"
         Height          =   255
         Left            =   3120
         TabIndex        =   16
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label5 
         BackColor       =   &H00FFC0C0&
         Caption         =   "起点站"
         Height          =   375
         Left            =   3120
         TabIndex        =   15
         Top             =   480
         Width           =   735
      End
      Begin VB.Label Label4 
         BackColor       =   &H00FFC0C0&
         Caption         =   "座位类型"
         Height          =   375
         Left            =   120
         TabIndex        =   14
         Top             =   2160
         Width           =   855
      End
      Begin VB.Label Label3 
         BackColor       =   &H00FFC0C0&
         Caption         =   "列车类型"
         Height          =   375
         Left            =   120
         TabIndex        =   13
         Top             =   1560
         Width           =   855
      End
      Begin VB.Label Label2 
         BackColor       =   &H00FFC0C0&
         Caption         =   "车票编号"
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   480
         Width           =   735
      End
      Begin VB.Label Label1 
         BackColor       =   &H00FFC0C0&
         Caption         =   "车   次"
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   960
         Width           =   615
      End
   End
   Begin VB.Image Image2 
      Height          =   11520
      Left            =   -4440
      Picture         =   "SaleTicket.frx":1A93
      Top             =   -600
      Width           =   15360
   End
   Begin VB.Image Image1 
      Height          =   240
      Left            =   -2640
      Picture         =   "SaleTicket.frx":36CF0
      Top             =   -960
      Width           =   240
   End
End
Attribute VB_Name = "SaleTicket"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
If Combo1.Text = "普通" Then
  Text11.Text = ForSaleTicket.Adodc1.Recordset.Fields(10)
ElseIf Combo1.Text = "学生" Then
  Text11.Text = ForSaleTicket.Adodc1.Recordset.Fields(10) * 0.5
ElseIf Combo1.Text = "军人" Then
  Text11.Text = ForSaleTicket.Adodc1.Recordset.Fields(10) * 0.8
ElseIf Combo1.Text = "伤残" Then
  Text11.Text = ForSaleTicket.Adodc1.Recordset.Fields(10) * 0.6
Else
  Text11.Text = ForSaleTicket.Adodc1.Recordset.Fields(10) * 0.5
End If
End Sub

Private Sub Command1_Click() '打印车票

   If Not IsNumeric(Text11.Text) Then
      MsgBox "请选择乘客类型,并先付车票款!!!", vbOKOnly + vbExclamation, "提示"
      Exit Sub
   End If
   
   If ForUserTicket.SaleOrBookSale = True Then
     'ForSaleTicket.Adodc1.RecordSource = "select * from 未售票登记表 where 车票编号='" & ForUserTicket.Adodc1.Recordset("车票编号") & "'"
     ''''''''''''''''''''''
     ''''''''''''''''''''''''''''''''''''
  '已售票登记表 里加记录
   Adodc1.Refresh
   Adodc1.Recordset.AddNew
   Adodc1.Recordset("车票编号") = Trim(Text1.Text)
   Adodc1.Recordset("车次") = Trim(Text2.Text)
   Adodc1.Recordset("起始站") = Trim(Text5.Text)
   Adodc1.Recordset("终点站") = Trim(Text6.Text)
   Adodc1.Recordset("发车日期") = Trim(Text9.Text)
   Adodc1.Recordset("折后票价") = Trim(Text11.Text)
   Adodc1.Recordset.Update
   Adodc1.Refresh
   '''''''''''''''''''''''
   '把未售票登记表里的"预售"改为"已售"
   ForSaleTicket.Adodc1.RecordSource = "select * from 未售票登记表 where 车票编号='" & Text1.Text & "'"
   ForSaleTicket.Adodc1.Refresh
   'Text1.Text = ForSaleTicket.Adodc1.Recordset("车票状态")
   ForSaleTicket.Adodc1.Recordset("车票状态") = "已售"
   ForSaleTicket.Adodc1.Recordset.Update
   ForSaleTicket.Adodc1.Refresh
  '''''''''''''''''''''''''''''''''''
  '在用户订票表中删除相关记录
  
   ForUserTicket.Adodc1.Recordset.Delete
   ForUserTicket.Adodc1.Refresh
   
  MsgBox "车票正打印中,请稍候、、、、、", vbOKOnly + vbExclamation, "提示"
   Else
  ''''''''''''''''''''''''''''''''''''
  '已售票登记表 里加记录
  Adodc1.Refresh
  Adodc1.Recordset.AddNew
  Adodc1.Recordset("车票编号") = Trim(Text1.Text)
  Adodc1.Recordset("车次") = Trim(Text2.Text)
  Adodc1.Recordset("起始站") = Trim(Text5.Text)
  Adodc1.Recordset("终点站") = Trim(Text6.Text)
  Adodc1.Recordset("发车日期") = Trim(Text9.Text)
  Adodc1.Recordset("折后票价") = Trim(Text11.Text)
  Adodc1.Recordset.Update
  Adodc1.Refresh
  ''''''''''''''''''''''''''''''''''''''
  ForSaleTicket.Adodc1.Recordset("车票状态") = "已售"
  ForSaleTicket.Adodc1.Recordset.Update
  ForSaleTicket.Adodc1.Refresh
  
  MsgBox "车票正打印中,请稍候、、、、、", vbOKOnly + vbExclamation, "提示"
  End If
  ForUserTicket.SaleOrBookSale = False
  
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Combo1.Text = "普通"
End Sub

⌨️ 快捷键说明

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