📄 placeedit.frm
字号:
TabIndex = 19
Top = 315
Width = 720
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 = 1680
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 = 17
Top = 1680
Width = 720
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 = 16
Top = 1680
Width = 450
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 = 15
Top = 1680
Width = 720
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 = 14
Top = 770
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 = 13
Top = 770
Width = 540
End
Begin VB.Label Label3
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 = 12
Top = 315
Width = 900
End
End
End
Attribute VB_Name = "PlaceEdit"
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, OriPlaceName As String
Public OriType As Integer
Private Function Check() As Boolean
If Trim(ComboName.Text) = "" Then
MsgBox "请输入地域名称"
ComboName.SetFocus
Check = False
Exit Function
End If
If Trim(txtPlace) = "" Then
MsgBox "请输入景点名称"
txtPlace.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 MyPlace
.Pname = MakeStr(txtPlace)
.Contact = MakeStr(txtContact)
.Phone = MakeStr(txtPhone)
.Address = MakeStr(txtAddress)
.Postcode = MakeStr(txtCode)
.Adult_price = Val(txtAdult)
.Child_price = Val(txtChild)
.AreaId = MyArea.GetId(ComboName)
If Modify = False Or OriPlaceName <> Trim(txtPlace) Then
If .In_DB(MakeStr(txtPlace)) = True Then
MsgBox "景点名称已经存在,请重新输入"
txtPlace.SetFocus
txtPlace.SelStart = 0
txtPlace.SelLength = Len(txtPlace)
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 txtAdult_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtChild_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 txtPlace_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -