📄 frmrecorditemedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmRecordItemEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑抄表信息"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 5415
Icon = "FrmRecordItemEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 5415
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Height = 1335
Left = 240
TabIndex = 13
Top = 1200
Width = 4935
Begin VB.ComboBox ComboItem
Height = 300
Left = 1200
Style = 2 'Dropdown List
TabIndex = 0
Top = 270
Width = 1095
End
Begin VB.TextBox txtCheckDate
Height = 270
Left = 1200
MaxLength = 10
TabIndex = 2
Top = 765
Width = 1095
End
Begin VB.TextBox txtItemNum
Height = 270
Left = 3720
MaxLength = 20
TabIndex = 1
Top = 285
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "抄表项目"
Height = 180
Left = 240
TabIndex = 16
Top = 330
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "读表日期"
Height = 180
Left = 240
TabIndex = 15
Top = 810
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "读表数"
Height = 180
Left = 2760
TabIndex = 14
Top = 330
Width = 540
End
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3137
MouseIcon = "FrmRecordItemEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 4
Top = 2760
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 977
MouseIcon = "FrmRecordItemEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 2760
Width = 1300
End
Begin VB.Frame Frame1
Height = 975
Left = 240
TabIndex = 5
Top = 120
Width = 4935
Begin VB.CommandButton Cmd_RoomSel
Caption = "选择房间"
Height = 285
Left = 3720
MouseIcon = "FrmRecordItemEdit.frx":12DE
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 9
Top = 240
Width = 1065
End
Begin VB.TextBox txtBuilding
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 8
Top = 195
Width = 1095
End
Begin VB.TextBox txtUnit
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 7
Top = 605
Width = 1095
End
Begin VB.TextBox txtRoom
Enabled = 0 'False
Height = 270
Left = 3720
MaxLength = 20
TabIndex = 6
Top = 605
Width = 1095
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房单元"
Height = 180
Left = 240
TabIndex = 12
Top = 650
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房编号"
Height = 180
Left = 240
TabIndex = 11
Top = 240
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 180
Left = 2760
TabIndex = 10
Top = 650
Width = 720
End
End
End
Attribute VB_Name = "FrmRecordItemEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriItem As String
Private Function Check() As Boolean
If CurHouse.HouseId <= 0 Then
MsgBox "请选择抄表住户"
Check = False
Exit Function
End If
If Trim(ComboItem.Text) = "" Then
MsgBox "请选择抄表项目"
ComboItem.SetFocus
Check = False
Exit Function
End If
If Trim(txtCheckDate.Text) = "" Then
MsgBox "请输入抄表日期"
txtCheckDate.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Cmd_OK_Click()
If Check = False Then
Exit Sub
End If
With MyRecord
.HouseId = CurHouse.HouseId
.ItemId = MyChargeItem.GetId(ComboItem.Text)
.ItemNum = Val(txtItemNum)
.CheckDate = MakeStr(txtCheckDate)
If Modify = False Then
.Insert
MsgBox "添加成功"
Else
.Update (OriId)
MsgBox "修改成功"
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_RoomSel_Click()
FrmHouseSel.Show 1
MyBuilding.GetInfo (CurHouse.BuildingId)
txtBuilding = MyBuilding.BuildingNo
txtUnit = CurHouse.HouseUnit
txtRoom = CurHouse.RoomNo
End Sub
Private Sub Form_Load()
Dim i As Integer
MyBuilding.GetInfo (CurHouse.BuildingId)
txtBuilding = MyBuilding.BuildingNo
txtUnit = CurHouse.HouseUnit
txtRoom = CurHouse.RoomNo
MyChargeItem.Load_ChargeItem ("按抄表刻度")
i = 0
Do While Arr_ChargeItem(i) <> ""
ComboItem.AddItem Arr_ChargeItem(i)
i = i + 1
Loop
If OriItem <> "" Then
If InCombo(OriItem, ComboItem) = True Then
ComboItem.Text = OriItem
End If
Else
If ComboItem.ListCount > 0 Then
ComboItem.ListIndex = 0
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -