📄 frmpipelinefixinput.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmPipelineFixInput
BorderStyle = 1 'Fixed Single
Caption = "管网维修管理"
ClientHeight = 4905
ClientLeft = 45
ClientTop = 330
ClientWidth = 8235
Icon = "frmPipelineFixInput.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4905
ScaleWidth = 8235
Begin VB.Frame Frame3
Caption = "备注"
ForeColor = &H00800000&
Height = 1110
Left = 105
TabIndex = 27
Top = 3030
Width = 7305
Begin RichTextLib.RichTextBox rtbNote
Height = 780
Left = 135
TabIndex = 6
Top = 255
Width = 7005
_ExtentX = 12356
_ExtentY = 1376
_Version = 393217
ScrollBars = 3
MaxLength = 100
TextRTF = $"frmPipelineFixInput.frx":0442
End
End
Begin VB.TextBox txtPlID
Enabled = 0 'False
Height = 300
Left = 5985
TabIndex = 25
Text = "Text1"
Top = 195
Width = 1365
End
Begin VB.Frame Frame2
Caption = "维修"
ForeColor = &H8000000D&
Height = 1140
Left = 120
TabIndex = 21
Top = 1800
Width = 7275
Begin MSComCtl2.DTPicker dtpFixDate
Height = 315
Left = 1005
TabIndex = 3
Top = 270
Width = 1500
_ExtentX = 2646
_ExtentY = 556
_Version = 393216
Format = 23724033
CurrentDate = 37403
End
Begin RichTextLib.RichTextBox rtbFixStatus
Height = 720
Left = 3435
TabIndex = 5
Top = 255
Width = 3675
_ExtentX = 6482
_ExtentY = 1270
_Version = 393217
ScrollBars = 3
MaxLength = 100
TextRTF = $"frmPipelineFixInput.frx":04D1
End
Begin VB.TextBox txtFixMan
Height = 300
Left = 1005
MaxLength = 60
TabIndex = 4
Text = "Text1"
Top = 645
Width = 1500
End
Begin VB.Label Label5
Caption = "维修时间"
Height = 255
Left = 210
TabIndex = 24
Top = 330
Width = 765
End
Begin VB.Label Label3
Caption = "维修人"
Height = 255
Left = 210
TabIndex = 23
Top = 690
Width = 615
End
Begin VB.Label Label2
Caption = "维修情况"
Height = 255
Left = 2655
TabIndex = 22
Top = 330
Width = 1170
End
End
Begin VB.Frame Frame1
Caption = "报修"
ForeColor = &H8000000D&
Height = 1155
Left = 120
TabIndex = 17
Top = 570
Width = 7275
Begin MSComCtl2.DTPicker dtpReportDate
Height = 315
Left = 990
TabIndex = 0
Top = 285
Width = 1515
_ExtentX = 2672
_ExtentY = 556
_Version = 393216
Format = 23724033
CurrentDate = 37403
End
Begin VB.TextBox txtReportPlace
Enabled = 0 'False
Height = 300
Left = 990
MaxLength = 60
TabIndex = 2
Text = "Text1"
Top = 660
Width = 6105
End
Begin VB.TextBox txtReportMan
Height = 300
Left = 3210
MaxLength = 8
TabIndex = 1
Text = "Text1"
Top = 285
Width = 1365
End
Begin VB.Label Label15
Caption = "报修地点"
Height = 255
Left = 210
TabIndex = 20
Top = 705
Width = 1170
End
Begin VB.Label Label1
Caption = "报修人"
Height = 255
Left = 2625
TabIndex = 19
Top = 330
Width = 615
End
Begin VB.Label Label4
Caption = "报修时间"
Height = 255
Left = 210
TabIndex = 18
Top = 330
Width = 765
End
End
Begin VB.PictureBox pbBottomBox
Height = 600
Left = 0
ScaleHeight = 540
ScaleWidth = 8160
TabIndex = 16
Top = 4305
Width = 8220
Begin VB.CommandButton cmdCommandArray3
Caption = ">>"
Height = 345
Index = 3
Left = 6705
TabIndex = 15
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray3
Caption = ">"
Height = 345
Index = 2
Left = 5910
TabIndex = 14
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray3
Caption = "<"
Height = 345
Index = 1
Left = 5115
TabIndex = 13
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray3
Caption = "<<"
Height = 345
Index = 0
Left = 4320
TabIndex = 12
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray2
Caption = "放弃"
Height = 345
Index = 1
Left = 3360
TabIndex = 11
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray2
Caption = "保存"
Height = 345
Index = 0
Left = 2565
TabIndex = 10
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray1
Caption = "删除"
Height = 345
Index = 2
Left = 1605
TabIndex = 9
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray1
Caption = "编辑"
Height = 345
Index = 1
Left = 810
TabIndex = 8
Top = 90
Width = 810
End
Begin VB.CommandButton cmdCommandArray1
Caption = "新增"
Height = 345
Index = 0
Left = 15
TabIndex = 7
Top = 90
Width = 810
End
End
Begin VB.Label Label7
Caption = "编号"
Height = 255
Left = 5400
TabIndex = 26
Top = 240
Width = 615
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 0
X1 = 75
X2 = 8220
Y1 = 4230
Y2 = 4230
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 1
X1 = 60
X2 = 8220
Y1 = 4215
Y2 = 4215
End
End
Attribute VB_Name = "frmPipelineFixInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim adoPipelineFixRS As ADODB.Recordset
Dim bytCommandFlag As Byte '用于记录第一组按钮的状态,这样,在第二组的保存,放弃按钮中
'就可知道是原来是按的新增还是编辑,从而采取不同的处理方法
'------------------------------------------------------
'按钮事件
'------------------------------------------------------
Private Sub cmdCommandArray1_Click(Index As Integer)
bytCommandFlag = Index
Select Case Index
Case 0 '输入
Call DisableCMD1
Call EnableCMD2
Call DisableCMD3
Call InitInterface
Call EnableInterface
dtpReportDate.SetFocus
Case 1 '编辑
If adoPipelineFixRS.EOF Or adoPipelineFixRS.BOF Then Exit Sub
Call DisableCMD1
Call EnableCMD2
Call DisableCMD3
Call EnableInterface
dtpReportDate.SetFocus
Case 2 '删除
Dim bytReturnFlag As Byte '用于接收msgbox
If adoPipelineFixRS.EOF Or adoPipelineFixRS.BOF Then Exit Sub
bytReturnFlag = MsgBox("确定要删除该管网维修记录吗?", vbYesNo + vbInformation + vbDefaultButton2, "提示信息")
If bytReturnFlag = vbNo Then Exit Sub
'删除该记录
Call DeleteData
Case Else
MsgBox "按扭功能未定义", vbOKOnly + vbExclamation, "警告"
End Select
End Sub
Private Sub cmdCommandArray2_Click(Index As Integer)
Dim bytReturnFlag As Byte '用于接收msgbox
Select Case Index
Case 0 '保存
bytReturnFlag = MsgBox("确定要保存吗?", vbYesNo + vbInformation + vbDefaultButton1, "提示信息")
If bytReturnFlag = vbNo Then
Call Cancel
Else
'保存数据
Call Save
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -