【VB开源代码栏目提醒】:本文主要为网学会员提供AreaMan.frm,希望对需要AreaMan.frm网友有所帮助,学习一下!
VERSION 5.00
Begin VB.Form AreaMan
BorderStyle = 1 'Fixed Single
Caption = "旅游地信息管理"
ClientHeight = 2820
ClientLeft = 45
ClientTop = 345
ClientWidth = 5520
Icon = "AreaMan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2820
ScaleWidth = 5520
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Add
Caption = "添 加"
Default = -1 'True
Height = 400
Left = 2280
MouseIcon = "AreaMan.frx":27A2
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 9
Top = 1200
Width = 1300
End
Begin VB.CommandButton Cmd_Modi
Caption = "修 改"
Height = 400
Left = 3840
MouseIcon = "AreaMan.frx":2AAC
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 1200
Width = 1300
End
Begin VB.CommandButton Cmd_Del
Caption = "删 除"
Height = 400
Left = 2280
MouseIcon = "AreaMan.frx":2DB6
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 1920
Width = 1300
End
Begin VB.CommandButton Cmd_Close
Cancel = -1 'True
Caption = "关 闭"
Height = 400
Left = 3840
MouseIcon = "AreaMan.frx":30C0
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 1920
Width = 1300
End
Begin VB.Frame Frame1
Height = 735
Left = 240
TabIndex = 1
Top = 120
Width = 5055
Begin VB.OptionButton Option3
Caption = "国外"
Height = 375
Left = 3675
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "本市"
Height = 375
Left = 1320
TabIndex = 4
Top = 240
Value = -1 'True
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "外埠"
Height = 375
Left = 2520
TabIndex = 3
Top = 240
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H0000FFFF&
BackStyle = 0 'Transparent
Caption = "旅游地类型:"
Height = 180
Left = 120
TabIndex = 5
Top = 330
Width = 990
End
End
Begin VB.ListBox List1
Height = 1680
Left = 240
TabIndex = 0
Top = 960
Width = 1695
End
End
Attribute VB_Name = "AreaMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CurAreaId As Long
Public CurType As Integer
Private Sub Loadarea()
Dim i As Integer
List1.Clear
MyArea.Load_Area
If Option1.Value = True Then
Do While d1(i) <> ""
List1.AddItem d1(i)
i = i + 1
Loop
End If
If Option2.Value = True Then
Do While d2(i) <> ""
List1.AddItem d2(i)
i = i + 1
Loop
End If
If Option3.Value = True Then
Do While d3(i) <> ""
List1.AddItem d3(i)
i = i + 1
Loop
End If
End Sub
Private Function DeleteCheck(ByVal TmpId As Long) As Integer
Dim TmpName As String
TmpName = MyPlace.AreaInPlace(CurAreaId)
If TmpName <> "" Then
DeleteCheck = -1
MsgBox "当前地域信息在娱乐厅 - " + TmpName + " - 中使用,为保证数据的完整性,不允许删除此地域。"
Exit Function
End If
TmpName = MyHotel.AreaInHotel(CurAreaId)
If TmpName <> "" Then
DeleteCheck = -1
MsgBox "当前地域信息在宾馆 - " + TmpName + " - 中使用,为保证数据的完整性,不允许删除此地域。"
Exit Function
End If
TmpName = MyRes.AreaInRes(CurAreaId)
If TmpName <> "" Then
DeleteCheck = -1
MsgBox "当前地域信息在餐厅 - " + TmpName + " - 中使用,为保证数据的完整性,不允许删除此地域。"
Exit Function
End If
TmpName = MyAmuse.AreaInAmuse(CurAreaId)
If TmpName <> "" Then
DeleteCheck = -1
MsgBox "当前地域信息在娱乐厅 - " + TmpName + " - 中使用,为保证数据的完整性,不允许删除此地域。"
Exit Function
End If
TmpName = MyLine.AreaInLine(CurAreaId)
If TmpName <> "" Then
DeleteCheck = -1
MsgBox "当前地域信息 -在线路- " + TmpName + " - 中使用,为保证数据的完整性,不允许删除此地域。"
Exit Function
End If
DeleteCheck = 0
End Function
Private Sub Cmd_Add_Click()
If Option1.Value = True Then
AreaEdit.CurType = 1
AreaEdit.lblAreaType = "本市"
End If
If Option2.Value = True Then
AreaEdit.CurType = 2
AreaEdit.lblAreaType = "外埠"
End If
If Option3.Value = True Then
AreaEdit.CurType = 3
AreaEdit.lblAreaType = "国外"
End If
AreaE