📄 frmbrowalert.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmBrowAlert
BorderStyle = 3 'Fixed Dialog
Caption = "报警记录浏览"
ClientHeight = 4305
ClientLeft = 45
ClientTop = 330
ClientWidth = 7470
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4305
ScaleWidth = 7470
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdCancel
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 = 375
Left = 5505
TabIndex = 3
Top = 3795
Width = 1575
End
Begin VB.CommandButton cmdDel
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 = 375
Left = 3825
TabIndex = 2
Top = 3795
Width = 1575
End
Begin VB.CommandButton cmdDelAll
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 = 375
Left = 2145
TabIndex = 1
Top = 3795
Width = 1575
End
Begin VB.Data datAlert
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "AlertRecord"
Top = 3040
Width = 7215
End
Begin MSDBGrid.DBGrid grdAlert
Bindings = "frmBrowAlert.frx":0000
Height = 2925
Left = 135
OleObjectBlob = "frmBrowAlert.frx":0017
TabIndex = 0
Top = 120
Width = 7200
End
Begin VB.Label lblAlert
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1845
TabIndex = 5
Top = 3375
Visible = 0 'False
Width = 5430
End
Begin VB.Label Label1
Caption = "报警用户详细信息:"
Height = 300
Left = 165
TabIndex = 4
Top = 3390
Visible = 0 'False
Width = 1695
End
End
Attribute VB_Name = "frmBrowAlert"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/07/09
'描 述:CBB三表户外计量系统 Ver 5.2
'网 站: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 cmdCancel_Click()
Unload frmBrowAlert
End Sub
Private Sub cmdDel_Click()
On Error GoTo ProcError
If Not datAlert.Recordset.EOF Then
datAlert.Recordset.Delete
'status
AppendStatusInfo "清除报警记录", icoBLUE
SaveLog "清除报警记录", 0
End If
Exit Sub
ProcError:
ProcErr
End Sub
Private Sub cmdDelAll_Click()
On Error GoTo ProcError
If MsgBox("是否确定要清除全部报警记录?", 48 + 1 + 256, "清除报警记录") = 1 Then
SQL = "delete * from AlertRecord"
dbCbb.Execute SQL
datAlert.Refresh
lblAlert = ""
'status
AppendStatusInfo "清除全部报警记录", icoBLUE
SaveLog "清除全部报警记录", 0
End If
Exit Sub
ProcError:
ProcErr
End Sub
Private Sub datAlert_Reposition()
Dim curUserID As Integer
Dim rcUserMap As Recordset
lblAlert = ""
' Set rcUserMap = dbCbb.OpenRecordset("UserMap", dbOpenSnapshot)
' If Not datAlert.Recordset.EOF Then
' curUserID = datAlert.Recordset!UserID
' rcUserMap.FindFirst "UserID=" + Format(curUserID)
' If Not rcUserMap.NoMatch Then
' lblAlert = "楼:" + Trim(rcUserMap!BuildID) + " 单元:" + Trim(rcUserMap!Unit) + " 层:" + Trim(rcUserMap!Floor) + " 门牌:" + Format(rcUserMap!Door) + " 电话:" + Trim(rcUserMap!Tel) + " 地址:" + Format(rcUserMap!Address)
' End If
' End If
' Exit Sub
'ProcError:
' ProcErr
End Sub
Private Sub Form_Load()
If UBound(curForm) > 0 Then
curForm(UBound(curForm)).Enabled = False
End If
ReDim Preserve curForm(UBound(curForm) + 1)
Set curForm(UBound(curForm)) = Me
'frmBrowAlert.Width = 7320
'frmBrowAlert.Height = 4605
datAlert.DatabaseName = App.Path & "\data\cbb.mdb"
'status
AppendStatusInfo "查看报警记录", icoBLUE
SaveLog "查看报警记录", 0
DoEvents
End Sub
Private Sub Form_Unload(Cancel As Integer)
ReDim Preserve curForm(UBound(curForm) - 1)
If UBound(curForm) > 0 Then
curForm(UBound(curForm)).Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -