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

📄 frm_editticketinfo.frm

📁 一个长途汽车站收费管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_editticketinfo 
   Caption         =   "修改购票信息"
   ClientHeight    =   3540
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7035
   LinkTopic       =   "Form1"
   ScaleHeight     =   3540
   ScaleWidth      =   7035
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   2655
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   6255
      Begin VB.TextBox departcity 
         Height          =   285
         Left            =   4320
         TabIndex        =   9
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox busno 
         Height          =   285
         Left            =   1440
         TabIndex        =   8
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox arrivalcity 
         Height          =   285
         Left            =   1440
         TabIndex        =   7
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox ticketdate 
         Height          =   285
         Left            =   4320
         TabIndex        =   6
         Top             =   720
         Width           =   1335
      End
      Begin VB.TextBox memo 
         Height          =   885
         Left            =   1440
         MultiLine       =   -1  'True
         TabIndex        =   5
         Top             =   1560
         Width           =   4455
      End
      Begin VB.TextBox price 
         Height          =   285
         Left            =   4320
         TabIndex        =   4
         Top             =   1080
         Width           =   1335
      End
      Begin VB.TextBox tickettime 
         Height          =   285
         Left            =   1440
         TabIndex        =   3
         Top             =   1080
         Width           =   1335
      End
      Begin VB.Label labelx 
         Caption         =   "起始城市"
         Height          =   375
         Left            =   3120
         TabIndex        =   16
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label2 
         Caption         =   "公车编号"
         Height          =   375
         Left            =   240
         TabIndex        =   15
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label3 
         Caption         =   "到达城市"
         Height          =   375
         Left            =   240
         TabIndex        =   14
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label Label4 
         Caption         =   "购票价格"
         Height          =   255
         Left            =   3120
         TabIndex        =   13
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "购票日期"
         Height          =   375
         Left            =   3120
         TabIndex        =   12
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label Label6 
         Caption         =   "购票时间"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label8 
         Caption         =   "备注"
         Height          =   375
         Left            =   240
         TabIndex        =   10
         Top             =   1560
         Width           =   1335
      End
   End
   Begin VB.CommandButton cmd_OK 
      Caption         =   "修改"
      Height          =   375
      Left            =   1680
      TabIndex        =   1
      Top             =   3000
      Width           =   1215
   End
   Begin VB.CommandButton fault 
      Caption         =   "取消"
      Height          =   375
      Left            =   4200
      TabIndex        =   0
      Top             =   3000
      Width           =   1215
   End
End
Attribute VB_Name = "frm_editticketinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_OK_Click()
Dim strSQL As String

    OpenDB
    strSQL = "Select * from ticketinfo where ticketno='" + CurrentTicket + "'"
    objRS.Open strSQL, objConn, 1, 3
    'objRS.AddNew
    'objRS.Fields(0).Value = buslineNO.Text
    objRS.Fields(1).Value = busno.Text
    
    objRS.Fields(2).Value = departcity.Text
    objRS.Fields(3).Value = arrivalcity.Text
    objRS.Fields(4).Value = ticketdate.Text
    objRS.Fields(5).Value = tickettime.Text
    objRS.Fields(6).Value = CDbl(price.Text)
    objRS.Fields(7).Value = memo.Text
    objRS.Update
    objRS.Close
    CloseDB
    MsgBox "记录已更新", vbOKOnly
    frm_ticket.FGridDatatable.Clear
    frm_ticket.ShowTitle
    frm_ticket.loadData ("")
    Unload Me
    frm_ticket.Show
End Sub

Private Sub fault_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim strSQL As String

    OpenDB
    strSQL = "Select * from ticketinfo where ticketno='" + CurrentTicket + "'"
    objRS.Open strSQL, objConn, 1, 3
    busno.Text = objRS.Fields(1).Value
    departcity.Text = objRS.Fields(2).Value
    arrivalcity.Text = objRS.Fields(3).Value
    ticketdate.Text = objRS.Fields(4).Value
    tickettime.Text = objRS.Fields(5).Value
    price.Text = objRS.Fields(6).Value
    memo.Text = objRS.Fields(7).Value
    objRS.Close
    CloseDB
    

End Sub

⌨️ 快捷键说明

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