?? forsaledticketinfo.frm
字號:
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 Frame2
BackColor = &H00C0C0FF&
Caption = "操作"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 720
TabIndex = 2
Top = 5160
Width = 8055
Begin VB.CommandButton Command5
BackColor = &H00FFC0C0&
Caption = "打印報表"
Height = 495
Left = 4920
Style = 1 'Graphical
TabIndex = 17
Top = 480
Width = 1335
End
Begin VB.CommandButton Command4
BackColor = &H00FFC0C0&
Caption = "刷新"
Height = 495
Left = 3240
Style = 1 'Graphical
TabIndex = 7
Top = 480
Width = 1335
End
Begin VB.CommandButton Command3
BackColor = &H00FFC0C0&
Caption = "查詢"
Height = 495
Left = 360
Style = 1 'Graphical
TabIndex = 6
Top = 480
Width = 1215
End
Begin VB.CommandButton Command2
BackColor = &H00FFC0C0&
Caption = "返回"
Height = 495
Left = 6480
Style = 1 'Graphical
TabIndex = 5
Top = 480
Width = 1335
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0C0&
Caption = "刪除"
Height = 495
Left = 1800
Style = 1 'Graphical
TabIndex = 4
Top = 480
Width = 1215
End
End
Begin VB.Frame Frame1
BackColor = &H00C0C0FF&
Caption = "已售票信息"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 720
TabIndex = 1
Top = 720
Width = 8055
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "ForSaledTicketInfo.frx":08DF
Height = 2175
Left = 240
TabIndex = 3
Top = 360
Width = 7575
_ExtentX = 13361
_ExtentY = 3836
_Version = 393216
AllowUpdate = 0 'False
BackColor = 16761024
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.PictureBox Picture1
BackColor = &H00FFC0FF&
BorderStyle = 0 'None
DataSource = "Adodc1"
Height = 495
Left = 120
Picture = "ForSaledTicketInfo.frx":08F4
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 0
Top = 120
Width = 495
End
Begin VB.Image Image1
Height = 11520
Left = -4320
Picture = "ForSaledTicketInfo.frx":11BE
Top = -1680
Width = 15360
End
End
Attribute VB_Name = "ForSaledTicketInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
i = MsgBox("確定永久刪除記錄??", vbYesNo + vbExclamation, "提示")
If i = vbYes Then
' If Adodc1.Recordset.EOF = False Or Adodc1.Recordset.BOF = False Then
' Adodc1.Recordset.Delete adAffectGroup
' End If
Do While Adodc1.Recordset.EOF = False
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
Loop
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If Check1.Value = 1 And Check2.Value = 0 Then
Adodc1.RecordSource = "select * from 已售票登記表 Where 車次= '" & DataCombo1.Text & "'"
Adodc1.Refresh
Adodc3.RecordSource = "select sum(折后票價),count(*) from 已售票登記表 Where 車次= '" & DataCombo1.Text & "' "
Adodc3.Refresh
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
Text1.Text = 0
Text2.Text = 0
Else
Text1.Text = Adodc3.Recordset.Fields(0)
Text2.Text = Adodc3.Recordset.Fields(1)
End If
ElseIf Check1.Value = 1 And Check2.Value = 1 Then
Adodc1.RecordSource = "select * from 已售票登記表 Where 車次= '" & DataCombo1.Text & "' and 發車日期>= '" & DTPicker1.Value & "' and 發車日期<= '" & DTPicker1.Value + 1 & "' "
Adodc1.Refresh
Adodc3.RecordSource = "select sum(折后票價),count(*) from 已售票登記表 Where 車次= '" & DataCombo1.Text & "' and 發車日期>= '" & DTPicker1.Value & "' and 發車日期<= '" & DTPicker1.Value + 1 & "'"
Adodc3.Refresh
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
Text1.Text = 0
Text2.Text = 0
Else
Text1.Text = Adodc3.Recordset.Fields(0)
Text2.Text = Adodc3.Recordset.Fields(1)
End If
ElseIf Check1.Value = 0 And Check2.Value = 1 Then
Adodc1.RecordSource = "select * from 已售票登記表 Where 發車日期>= '" & DTPicker1.Value & "' and 發車日期<= '" & DTPicker1.Value + 1 & "' "
Adodc1.Refresh
Adodc3.RecordSource = "select sum(折后票價),count(*) from 已售票登記表 Where 發車日期>= '" & DTPicker1.Value & "' and 發車日期<= '" & DTPicker1.Value + 1 & "' "
Adodc3.Refresh
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
Text1.Text = 0
Text2.Text = 0
Else
Text1.Text = Adodc3.Recordset.Fields(0)
Text2.Text = Adodc3.Recordset.Fields(1)
End If
End If
End Sub
Private Sub Command4_Click()
Adodc1.RecordSource = "select * from 已售票登記表 "
Adodc1.Refresh
Adodc3.RecordSource = "select sum(折后票價),count(*) from 已售票登記表 "
Adodc3.Refresh
If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
Text1.Text = 0
Text2.Text = 0
Else
Text1.Text = Adodc3.Recordset.Fields(0)
Text2.Text = Adodc3.Recordset.Fields(1)
End If
End Sub
Private Sub Command5_Click()
MsgBox "正在打印報表,請稍候、、、、、", vbOKOnly + vbExclamation, "提示"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -