📄 frmhouseedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmHouseEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑房屋信息"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 5775
Icon = "FrmHouseEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 5775
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Height = 2415
Left = 240
TabIndex = 9
Top = 120
Width = 5295
Begin VB.TextBox txtRoom
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 4
Top = 1015
Width = 1455
End
Begin VB.TextBox txtOwner
Height = 270
Left = 4080
MaxLength = 20
TabIndex = 5
Top = 1015
Width = 975
End
Begin VB.TextBox txtFloor
Height = 270
Left = 4080
MaxLength = 20
TabIndex = 3
Top = 605
Width = 975
End
Begin VB.ComboBox ComboStyle
Height = 300
Left = 1200
Style = 2 'Dropdown List
TabIndex = 2
Top = 590
Width = 1455
End
Begin VB.ComboBox ComboBuilding
Height = 300
Left = 1200
Style = 2 'Dropdown List
TabIndex = 0
Top = 180
Width = 1455
End
Begin VB.TextBox txtDescribe
Height = 735
Left = 1200
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 1440
Width = 3855
End
Begin VB.TextBox txtUnit
Height = 270
Left = 4080
MaxLength = 20
TabIndex = 1
Top = 195
Width = 975
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "产权信息"
Height = 180
Left = 3120
TabIndex = 16
Top = 1060
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 180
Left = 240
TabIndex = 15
Top = 1060
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "所在楼层"
Height = 180
Left = 3120
TabIndex = 14
Top = 650
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "户型名称"
Height = 180
Left = 240
TabIndex = 13
Top = 650
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "备注信息"
Height = 180
Left = 240
TabIndex = 12
Top = 1470
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 Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房单元"
Height = 180
Left = 3120
TabIndex = 10
Top = 240
Width = 720
End
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 1157
MouseIcon = "FrmHouseEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 2760
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3317
MouseIcon = "FrmHouseEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 2760
Width = 1300
End
End
Attribute VB_Name = "FrmHouseEdit"
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 OriBuildingNo As String
Private Function Check() As Boolean
If Trim(ComboBuilding.Text) = "" Then
MsgBox "请选择楼房编号"
ComboBuilding.SetFocus
Check = False
Exit Function
End If
If Trim(txtUnit.Text) = "" Then
MsgBox "请选择楼房单元"
txtUnit.SetFocus
Check = False
Exit Function
End If
If Trim(ComboStyle.Text) = "" Then
MsgBox "请选择户型"
ComboStyle.SetFocus
Check = False
Exit Function
End If
If Trim(txtFloor.Text) = "" Then
MsgBox "请选择楼层"
txtFloor.SetFocus
Check = False
Exit Function
End If
If Trim(txtRoom.Text) = "" Then
MsgBox "请选择房间号"
txtRoom.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 MyHouse
.BuildingId = MyBuilding.GetId(MakeStr(ComboBuilding.Text))
.HouseUnit = MakeStr(txtUnit)
.StyleId = MyStyle.GetId(MakeStr(ComboStyle.Text))
.Floor = Val(txtFloor)
.RoomNo = MakeStr(txtRoom)
.Ownership = MakeStr(txtOwner)
.Memo = MakeStr(txtDescribe)
If Modify = False Then
.Insert
Else
.Update (OriId)
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub txtFloor_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtDescribe_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtBuildingNo_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtOwner_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtRoom_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -