📄 frmdelallticket.frm
字号:
VERSION 5.00
Begin VB.Form frmDelAllTicket
BorderStyle = 1 'Fixed Single
Caption = "批量删除"
ClientHeight = 1470
ClientLeft = 45
ClientTop = 330
ClientWidth = 3855
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1470
ScaleWidth = 3855
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "删除选择(&S)"
Height = 1125
Left = 150
TabIndex = 2
Top = 150
Width = 2175
Begin VB.OptionButton optSelect
Caption = "筛选结果"
Height = 255
Index = 1
Left = 270
TabIndex = 4
Top = 660
Value = -1 'True
Width = 1155
End
Begin VB.OptionButton optSelect
Caption = "全部"
Height = 255
Index = 0
Left = 270
TabIndex = 3
Top = 330
Width = 795
End
End
Begin VB.CommandButton cmdOK
Height = 350
Index = 0
Left = 2490
Style = 1 'Graphical
TabIndex = 1
Tag = "1001"
Top = 210
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOK
Cancel = -1 'True
Height = 350
Index = 1
Left = 2490
Style = 1 'Graphical
TabIndex = 0
Tag = "1002"
Top = 570
UseMaskColor = -1 'True
Width = 1215
End
End
Attribute VB_Name = "frmDelAllTicket"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_blnSucceed As Boolean
Private m_strIds As String
Private Sub cmdOK_Click(Index As Integer)
If Index = 1 Then
m_blnSucceed = False
Unload Me
Exit Sub
Else
If cmdOKSave() = False Then
Exit Sub
End If
m_blnSucceed = True
Unload Me
End If
End Sub
Public Function DelTicket(ByVal strIDs As String) As Boolean
m_strIds = strIDs
On Error Resume Next
Me.Show vbModal
If m_blnSucceed Then
DelTicket = True
End If
End Function
Private Sub Form_Load()
Utility.LoadFormResPicture Me
If m_strIds = "" Then
optSelect(0).Value = True
optSelect(1).Enabled = False
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Utility.UnLoadFormResPicture Me
End Sub
Private Function cmdOKSave() As Boolean
Dim strSql As String
Dim strQuestion As String
If optSelect(0).Value = True Then
strSql = "DELETE FROM CheckDetail"
strQuestion = "全部"
Else
strSql = "DELETE FROM CheckDetail WHERE lngActivityDetailID IN " & m_strIds
strQuestion = "列表筛选的全部"
End If
If ShowMsg(Me.hwnd, "您确实要删除" & strQuestion & "票据领用记录吗?", _
MB_YESNO + MB_DEFBUTTON2 + MB_ICONQUESTION + MB_SYSTEMMODAL, "提示信息") = vbNo Then
GoTo EndProc
End If
If gclsBase.ExecSQL(strSql) Then
cmdOKSave = True
gclsSys.SendMessage 0, msgRCheckUser
End If
EndProc:
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -