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

📄 form2.frm

📁 这款双龙风景区售票系统 Ver 1.0
💻 FRM
字号:
VERSION 5.00
Object = "{CFA7AFF4-3242-4269-9172-7389D695AE01}#1.0#0"; "StoneXP.ocx"
Begin VB.Form Form2 
   BackColor       =   &H00C0FFC0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "售票中心"
   ClientHeight    =   5310
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3810
   Icon            =   "Form2.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   ScaleHeight     =   5310
   ScaleWidth      =   3810
   StartUpPosition =   1  '所有者中心
   Begin StoneXP.XPButton XPButton1 
      Height          =   375
      Left            =   1320
      TabIndex        =   18
      Top             =   4680
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "提 交"
      MouseIcon       =   "Form2.frx":000C
      MousePointer    =   99
   End
   Begin StoneXP.XPCheckBox XPCheckBox1 
      Height          =   255
      Left            =   2160
      TabIndex        =   17
      Top             =   2400
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   450
      Value           =   1
      Caption         =   "折扣率不变"
      BackColor       =   12648384
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   16711680
   End
   Begin VB.TextBox Text1 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1320
      TabIndex        =   16
      Text            =   "100"
      Top             =   2377
      Width           =   615
   End
   Begin VB.TextBox Text8 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """¥""#,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   0
      EndProperty
      Height          =   270
      Left            =   1320
      TabIndex        =   14
      Top             =   1920
      Width           =   735
   End
   Begin VB.TextBox Text7 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1440
      TabIndex        =   13
      Top             =   720
      Width           =   1215
   End
   Begin VB.TextBox Text6 
      Appearance      =   0  'Flat
      Height          =   270
      Left            =   1440
      TabIndex        =   0
      Top             =   217
      Width           =   1215
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3360
      Top             =   4800
   End
   Begin VB.TextBox Text5 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      Enabled         =   0   'False
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1320
      TabIndex        =   11
      Top             =   3720
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      Enabled         =   0   'False
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1320
      TabIndex        =   9
      Top             =   3360
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BeginProperty DataFormat 
         Type            =   1
         Format          =   """¥""#,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   2
      EndProperty
      Enabled         =   0   'False
      ForeColor       =   &H000000FF&
      Height          =   270
      Left            =   1320
      TabIndex        =   7
      Text            =   "0.00"
      Top             =   2880
      Width           =   855
   End
   Begin VB.TextBox Text2 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BeginProperty DataFormat 
         Type            =   1
         Format          =   """¥""#,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   2
      EndProperty
      Enabled         =   0   'False
      Height          =   270
      Left            =   1320
      TabIndex        =   1
      Text            =   "0.00"
      Top             =   1440
      Width           =   855
   End
   Begin StoneXP.XPCheckBox XPCheckBox2 
      Height          =   255
      Left            =   480
      TabIndex        =   19
      Top             =   4200
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   450
      Value           =   1
      Caption         =   "同步打印票据"
      BackColor       =   12648384
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   16711680
   End
   Begin StoneXP.XPCheckBox XPCheckBox3 
      Height          =   255
      Left            =   2160
      TabIndex        =   20
      Top             =   4200
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   450
      Value           =   1
      Caption         =   "扣除库存"
      BackColor       =   12648384
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   16711680
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "人数:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   15
      Top             =   1950
      Width           =   495
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "%"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   225
      Left            =   1950
      TabIndex        =   12
      Top             =   2400
      Width           =   135
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "时间:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   10
      Top             =   3750
      Width           =   615
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "日期:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   8
      Top             =   3390
      Width           =   615
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "金额:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   6
      Top             =   2910
      Width           =   495
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "折扣:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   5
      Top             =   2400
      Width           =   495
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "单价:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   840
      TabIndex        =   4
      Top             =   1470
      Width           =   495
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "类型助记码:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   360
      TabIndex        =   3
      Top             =   240
      Width           =   1095
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "售票类型:"
      ForeColor       =   &H000000FF&
      Height          =   225
      Left            =   600
      TabIndex        =   2
      Top             =   765
      Width           =   855
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'作者:星零工作室
'发布日期:2007/03/08
'描    述:双龙风景区售票系统 Ver 1.0
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub Form_Load()
Text4.Text = Date
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 If Text8.Text <> "" Then
  Text3.Text = (Val(Text2.Text) * Val(Text8.Text) * Val(Text1.Text)) / 100
  XPButton1.Default = True
  End If
End If
End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 If Text6.Text <> "" Then
  Set fj2 = cnn.Execute("select * from 售票类型 where 类型助记码='" & Text6.Text & "'")
  If fj2.EOF = False Then
   Text7.Text = fj2.Fields(1)
   Text2.Text = fj2.Fields(2)
   Set fj3 = cnn.Execute("select * from 票据库存 where 票据类型='" & Text7.Text & "'")
   If fj3.EOF = True Then
    If fj3.Fields(1) > 0 Then
    Text8.SetFocus
    Else
    MsgBox "库存不足!"
   End If
  End If
 End If
 End If
End If
End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
 If Text8.Text <> "" Then
  Text3.Text = Val(Text2.Text) * Val(Text8.Text)
  If fj3.Fields(1) < Val(Text8.Text) Then
    MsgBox "人数超出库存!"
    Text6.Text = ""
    Text6.SetFocus
    Exit Sub
  End If
  If XPCheckBox1.Value = xcksUnchecked Then
  Text1.Text = ""
  Text1.SetFocus
  Else
  Text3.Text = (Val(Text2.Text) * Val(Text8.Text) * Val(Text1.Text)) / 100
  XPButton1.Default = True
  End If
  End If
End If
End Sub

Private Sub Timer1_Timer()
Text5.Text = Time
End Sub

Private Sub XPButton1_Click()
If Text7.Text <> "" And Text8.Text <> "" Then
sql = "insert into 售票记录 values('" & Text7.Text & "'," & Text8.Text & "," & Text2.Text & "," & Text1.Text & "," & Text3.Text & ",'" & Text4.Text & "','" & Text5.Text & "','" & Form1.Label4.Caption & "','0')"
Set fj1 = cnn.Execute(sql)
sql = "update 票据库存 set 剩余数量=" & fj3.Fields(1) - Val(Text8.Text) & " where 票据类型='" & Text7.Text & "'"
Set fj3 = cnn.Execute(sql)
MsgBox "应收总金额为" & Text3.Text & "元", vbInformation, "提示"
Form3.Label6.Caption = Text7.Text
Form3.Label7.Caption = Text8.Text
Form3.Label8.Caption = Text2.Text
Form3.Label9.Caption = Text3.Text
Form3.Label11.Caption = Text4.Text
Form3.Label13.Caption = Form1.Label4.Caption
If XPCheckBox2.Value = xcksChecked Then
If Printers.Count <= 0 Then
MsgBox "没有安装打印机"
sp_return
Exit Sub
End If
Form3.PrintForm
Printer.EndDoc '发出打印结束信号
End If
sp_return
End If
End Sub
Private Sub sp_return()
Text6.Text = ""
Text7.Text = ""
Text2.Text = "0.00"
Text8.Text = ""
Text1.Text = "100"
Text3.Text = "0.00"
XPButton1.Default = False
End Sub

⌨️ 快捷键说明

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