📄 frmhoteledit.frm
字号:
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 24
Top = 315
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系人"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 23
Top = 1245
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "联系电话"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 22
Top = 1245
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "经济间报价"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 21
Top = 2160
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元/人"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 3600
TabIndex = 20
Top = 2160
Width = 450
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "双人间报价"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 19
Top = 2160
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元/人"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 7920
TabIndex = 18
Top = 2160
Width = 450
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "宾馆名称"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 17
Top = 795
Width = 720
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "通信地址"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 16
Top = 1710
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "邮政编码"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 4560
TabIndex = 15
Top = 1710
Width = 720
End
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 5115
MouseIcon = "FrmHotelEdit.frx":04E5
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 13
Top = 3360
Width = 1300
End
Begin VB.CommandButton Cmd_Ok
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 2745
MouseIcon = "FrmHotelEdit.frx":07EF
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 12
Top = 3360
Width = 1300
End
End
Attribute VB_Name = "FrmHotelEdit"
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 OriAreaName, OriHotelName As String
Public OriType As Integer
Private Function Check() As Boolean
If Trim(txtHotel) = "" Then
MsgBox "请输入地域名称"
txtHotel.SetFocus
Check = False
Exit Function
End If
If Trim(txtHotel) = "" Then
MsgBox "请输入宾馆名称"
txtHotel.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 MyHotel
.Hname = MakeStr(txtHotel)
.Hlevel = ComboLevel.Text
.Contact = MakeStr(txtContact)
.Phone = MakeStr(txtPhone)
.Address = MakeStr(txtAddress)
.Postcode = MakeStr(txtCode)
.Price1 = Val(txtPrice1)
.Price2 = Val(txtPrice2)
.Price3 = Val(txtPrice3)
.Price4 = Val(txtPrice4)
.AreaId = MyArea.GetId(ComboName)
'判断宾馆名称是否存在
If Modify = False Or OriHotelName <> Trim(txtHotel) Then
If .In_DB(MakeStr(txtHotel)) = True Then
MsgBox "宾馆名称已经存在,请重新输入"
txtHotel.SetFocus
txtHotel.SelStart = 0
txtHotel.SelLength = Len(txtHotel)
Exit Sub
End If
End If
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 ComboType_Click()
Call Loadarea(ComboType.ListIndex + 1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
End Sub
Private Sub Form_Load()
ComboType.ListIndex = OriType - 1
Call Loadarea(OriType, ComboName)
If InCombo(OriAreaName, ComboName) = True Then
ComboName.Text = OriAreaName
End If
End Sub
Private Sub txtAddress_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtPrice1_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtPrice2_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtPrice3_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtPrice4_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtCode_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtContact_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtHotel_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -