?? fortrianinfo.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Begin VB.Form ForTrianInfo
Caption = "列車信息更新"
ClientHeight = 6360
ClientLeft = 60
ClientTop = 435
ClientWidth = 9000
LinkTopic = "Form1"
ScaleHeight = 6360
ScaleWidth = 9000
StartUpPosition = 2 'CenterScreen
Begin VB.PictureBox Picture2
BorderStyle = 0 'None
Height = 495
Left = 120
Picture = "ForTrianInfo.frx":0000
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 15
Top = 0
Width = 495
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00C0E0FF&
FillColor = &H00404040&
FillStyle = 0 'Solid
ForeColor = &H00000000&
Height = 975
Left = 480
ScaleHeight = 945
ScaleWidth = 8265
TabIndex = 8
Top = 5160
Width = 8295
Begin VB.CommandButton Command6
BackColor = &H0080FFFF&
Caption = "修改"
Height = 495
Left = 2880
Style = 1 'Graphical
TabIndex = 16
Top = 240
Width = 1215
End
Begin VB.CommandButton Command3
BackColor = &H0080FFFF&
Caption = "刷新"
Height = 495
Left = 5520
Style = 1 'Graphical
TabIndex = 14
Top = 240
Width = 1215
End
Begin VB.CommandButton Command5
BackColor = &H0080FFFF&
Caption = "查詢"
Height = 495
Left = 120
Style = 1 'Graphical
TabIndex = 12
Top = 240
Width = 1215
End
Begin VB.CommandButton Command4
BackColor = &H0080FFFF&
Caption = "退出"
Height = 495
Left = 6840
Style = 1 'Graphical
TabIndex = 11
Top = 240
Width = 1335
End
Begin VB.CommandButton Command2
BackColor = &H0080FFFF&
Caption = "刪除"
Height = 495
Left = 4200
Style = 1 'Graphical
TabIndex = 10
Top = 240
Width = 1215
End
Begin VB.CommandButton Command1
BackColor = &H0080FFFF&
Caption = "添加"
Height = 495
Left = 1440
Style = 1 'Graphical
TabIndex = 9
Top = 240
Width = 1215
End
End
Begin VB.Frame Frame2
BackColor = &H00C0E0FF&
Caption = "查詢條件"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 480
TabIndex = 1
Top = 3720
Width = 8295
Begin VB.TextBox Text3
BackColor = &H00C0FFFF&
Height = 495
Left = 6360
TabIndex = 7
Text = "Text3"
Top = 360
Width = 1575
End
Begin VB.TextBox Text2
BackColor = &H00C0FFFF&
Height = 495
Left = 3720
TabIndex = 6
Text = "Text2"
Top = 360
Width = 1455
End
Begin VB.TextBox Text1
BackColor = &H00C0FFFF&
Height = 375
Left = 1200
TabIndex = 5
Text = "Text1"
Top = 360
Width = 1335
End
Begin VB.OptionButton Option3
BackColor = &H00C0E0FF&
Caption = "始點站"
Height = 375
Index = 3
Left = 5400
TabIndex = 4
Top = 360
Width = 855
End
Begin VB.OptionButton Option2
BackColor = &H00C0E0FF&
Caption = "起點站"
Height = 375
Index = 2
Left = 2760
TabIndex = 3
Top = 360
Width = 855
End
Begin VB.OptionButton Option1
BackColor = &H00C0E0FF&
Caption = "車次"
Height = 375
Index = 1
Left = 240
TabIndex = 2
Top = 360
Width = 855
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 3720
Top = 0
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=train;Data Source=CHENYIDAN"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=train;Data Source=CHENYIDAN"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "Select * from 車票價格表"
Caption = "Adodc1"
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
_Version = 393216
End
Begin VB.Frame Frame1
BackColor = &H00C0E0FF&
Caption = "車票價格表"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3015
Left = 480
TabIndex = 0
Top = 480
Width = 8295
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "ForTrianInfo.frx":08CA
Height = 2415
Left = 240
TabIndex = 13
Top = 360
Width = 7815
_ExtentX = 13785
_ExtentY = 4260
_Version = 393216
AllowUpdate = 0 'False
BackColor = 16761024
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 = -3600
Picture = "ForTrianInfo.frx":08DF
Top = -120
Width = 15360
End
End
Attribute VB_Name = "ForTrianInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public index As Integer
Public AddOrModify As Boolean
Private Sub Command1_Click()
ForTrainPrice.Show
AddOrModify = True
End Sub
Private Sub Command2_Click()
Dim i As Integer
i = MsgBox("確定刪除該記錄??", vbYesNo + vbExclamation, "提示")
If i = vbYes Then
If DataGrid1.SelBookmarks.Count <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End If
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()
If ForTrianInfo.index = 1 And Text1.Text = "" Then
MsgBox ("請輸入車次!!!")
ElseIf ForTrianInfo.index = 1 And Text1.Text <> "" Then
Adodc1.RecordSource = "Select * from 車票價格表 where 車次 = '" & Text1.Text _
& "'"
Adodc1.Refresh
ElseIf ForTrianInfo.index = 2 And Text2.Text = "" Then
MsgBox ("請輸入起點站!!!")
ElseIf ForTrianInfo.index = 2 And Text2.Text <> "" Then
Adodc1.RecordSource = "Select * from 車票價格表 where 起點站 = '" & Text2.Text _
& "'"
Adodc1.Refresh
ElseIf ForTrianInfo.index = 3 And Text3.Text = "" Then
MsgBox ("請輸入目的站!!!")
ElseIf ForTrianInfo.index = 3 And Text3.Text <> "" Then
Adodc1.RecordSource = "Select * from 車票價格表 where 目的站 = '" & Text2.Text _
& "'"
Adodc1.Refresh
End If
End Sub
Private Sub Command6_Click()
AddOrModify = False
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
MsgBox "請選擇表中要修改的信息!!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
ForTrainPrice.Text1 = Adodc1.Recordset.Fields(0)
ForTrainPrice.Text3 = Adodc1.Recordset.Fields(3)
ForTrainPrice.Text4 = Adodc1.Recordset.Fields(2)
ForTrainPrice.Text5 = Adodc1.Recordset.Fields(1)
ForTrainPrice.Text6 = Adodc1.Recordset.Fields(5)
ForTrainPrice.Text7 = Adodc1.Recordset.Fields(9)
ForTrainPrice.Text8 = Adodc1.Recordset.Fields(10)
ForTrainPrice.Text9 = Adodc1.Recordset.Fields(4)
ForTrainPrice.Text10 = Adodc1.Recordset.Fields(6)
ForTrainPrice.Text11 = Adodc1.Recordset.Fields(7)
ForTrainPrice.Text12 = Adodc1.Recordset.Fields(8)
ForTrainPrice.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Option1_Click(index As Integer)
ForTrianInfo.index = 1
Text2.Enabled = False
Text1.Enabled = True
Text3.Enabled = False
End Sub
Private Sub Option2_Click(index As Integer)
ForTrianInfo.index = 2
Text1.Enabled = False
Text2.Enabled = True
Text3.Enabled = False
End Sub
Private Sub Option3_Click(index As Integer)
ForTrianInfo.index = 3
Text2.Enabled = False
Text1.Enabled = False
Text3.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -