📄 frmparkedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmParkEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑小区车位信息"
ClientHeight = 3615
ClientLeft = 45
ClientTop = 330
ClientWidth = 5400
Icon = "FrmParkEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3615
ScaleWidth = 5400
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 975
Left = 240
TabIndex = 8
Top = 120
Width = 4935
Begin VB.TextBox txtRoom
Enabled = 0 'False
Height = 270
Left = 3720
MaxLength = 20
TabIndex = 12
Top = 605
Width = 1095
End
Begin VB.TextBox txtUnit
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 11
Top = 605
Width = 1095
End
Begin VB.TextBox txtBuilding
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 10
Top = 195
Width = 1095
End
Begin VB.CommandButton Cmd_RoomSel
Caption = "选择房间"
Height = 285
Left = 3720
MouseIcon = "FrmParkEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 9
Top = 240
Width = 1065
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 180
Left = 2760
TabIndex = 15
Top = 650
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房编号"
Height = 180
Left = 240
TabIndex = 14
Top = 240
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房单元"
Height = 180
Left = 240
TabIndex = 13
Top = 650
Width = 720
End
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 990
MouseIcon = "FrmParkEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 3000
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3150
MouseIcon = "FrmParkEdit.frx":12DE
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 3000
Width = 1300
End
Begin VB.Frame Frame2
Height = 1575
Left = 240
TabIndex = 0
Top = 1200
Width = 4935
Begin VB.ComboBox ComboType
Height = 300
ItemData = "FrmParkEdit.frx":15E8
Left = 3720
List = "FrmParkEdit.frx":15F2
Style = 2 'Dropdown List
TabIndex = 16
Top = 240
Width = 1095
End
Begin VB.TextBox txtDescribe
Height = 735
Left = 1200
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 720
Width = 3615
End
Begin VB.TextBox txtParkId
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 1
Top = 240
Width = 1095
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "位置描述"
Height = 180
Left = 240
TabIndex = 5
Top = 720
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "车位编号"
Height = 180
Left = 240
TabIndex = 4
Top = 285
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "车位类型"
Height = 180
Left = 2760
TabIndex = 3
Top = 285
Width = 720
End
End
End
Attribute VB_Name = "FrmParkEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As String
Private Function Check() As Boolean
If CurHouse.HouseId <= 0 Then
MsgBox "请选择车位所属的住户"
Check = False
Exit Function
End If
If Trim(txtParkId.Text) = "" Then
MsgBox "请输入车位编号"
txtName.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 MyPark
.HouseId = CurHouse.HouseId
.ParkId = MakeStr(txtParkId)
.ParkType = MakeStr(ComboType.Text)
.Describe = MakeStr(txtDescribe)
If Modify = False Or OriId <> Trim(txtParkId) Then
If .In_DB(txtParkId) = True Then
MsgBox "车位编号已经存在"
Exit Sub
End If
End If
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 ComboType_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub Form_Load()
MyBuilding.GetInfo (CurHouse.BuildingId)
txtBuilding = MyBuilding.BuildingNo
txtUnit = CurHouse.HouseUnit
txtRoom = CurHouse.RoomNo
End Sub
Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtParkId_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -