【VB开源代码栏目提醒】:网学会员在VB开源代码频道为大家收集整理了ResMan.frm提供大家参考,希望对大家有所帮助!
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form ResMan
BorderStyle = 1 'Fixed Single
Caption = "旅游餐厅资源管理"
ClientHeight = 6555
ClientLeft = 45
ClientTop = 345
ClientWidth = 7695
Icon = "ResMan.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6555
ScaleWidth = 7695
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox ComboName
Height = 300
Left = 3120
Style = 2 'Dropdown List
TabIndex = 5
Top = 120
Width = 1575
End
Begin VB.ComboBox ComboType
Height = 300
ItemData = "ResMan.frx":27A2
Left = 1440
List = "ResMan.frx":27AF
Style = 2 'Dropdown List
TabIndex = 4
Top = 120
Width = 1455
End
Begin VB.CommandButton Cmd_Modi
Caption = "修 改"
Height = 400
Left = 2347
MouseIcon = "ResMan.frx":27C5
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 5880
Width = 1300
End
Begin VB.CommandButton Cmd_Close
Caption = "关 闭"
Height = 400
Left = 5747
MouseIcon = "ResMan.frx":2ACF
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 5880
Width = 1300
End
Begin
VB.CommandButton Cmd_Del
Caption = "删 除"
Height = 400
Left = 4047
MouseIcon = "ResMan.frx":2DD9
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 5880
Width = 1300
End
Begin VB.CommandButton Cmd_Add
Caption = "添 加"
Default = -1 'True
Height = 400
Left = 647
MouseIcon = "ResMan.frx":30E3
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 5880
Width = 1300
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "ResMan.frx":33ED
Height = 5055
Left = 0
TabIndex = 6
Top = 600
Width = 7695
_ExtentX = 13573
_ExtentY = 8916
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 5640
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=Travel"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "Travel"
OtherAttributes = ""
UserName = "sa"
Pass
word = "sa"
RecordSource = "SELECT * FROM Hotel"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "所在地域"
Height = 180
Left = 240
TabIndex = 7
Top = 180
Width = 720
End
End
Attribute VB_Name = "ResMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Refresh_Res()
Adodc1.RecordSource = "SELECT a.AreaName 所在地域, r.Rname As 餐厅名称," _
+ " r.Rlevel As 餐厅标准, r.Contact As 联系人, r.Phone As 联系电话," _
+ " r.Address As
通信地址, r.Postcode As 邮政编码, r.Breakfast As 早餐报价," _
+ " r.Dinner As 正餐报价, r.Input_time As 录入时间 FROM Restaurant r, Area a" _
+ " WHERE r.AreaId=a.AreaId And a.AreaName='" + Trim(ComboName.Text) + "'"
Adodc1.Refresh
End Sub
Private Sub Cmd_Add_Click()
ResEdit.Modify = False
ResEdit.OriAreaName = ComboName.Text
ResEdit.OriType = ComboType.ListIndex + 1
ResEdit.OriId = 0
ResEdit.Show 1
Refresh_Res
End Sub
Private Sub Cmd_Del_Click()
Dim TmpId As Long
If Adodc1.Recordset.EOF = Tru