📄 setmenu.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 setmenu
BorderStyle = 1 'Fixed Single
Caption = "设置菜单权限"
ClientHeight = 6435
ClientLeft = 45
ClientTop = 330
ClientWidth = 7605
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
Picture = "SETMENU.frx":0000
ScaleHeight = 6435
ScaleWidth = 7605
Begin VB.CommandButton Command4
Caption = "保存"
Height = 345
Left = 6045
TabIndex = 7
Top = 4995
Width = 1110
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "SETMENU.frx":0342
Height = 6405
Left = 0
TabIndex = 6
Top = -15
Width = 5490
_ExtentX = 9684
_ExtentY = 11298
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = 0 'False
HeadLines = 2
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 = 375
Left = 4785
Top = 4845
Visible = 0 'False
Width = 2235
_ExtentX = 3942
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "catv"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.CommandButton Command3
Caption = "删去"
Height = 345
Left = 6075
TabIndex = 0
Top = 4380
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "加入"
Height = 345
Left = 6075
TabIndex = 5
Top = 3975
Width = 1095
End
Begin VB.TextBox Text2
Height = 330
Left = 5760
TabIndex = 4
Top = 3360
Width = 1680
End
Begin VB.TextBox Text1
Height = 2340
Left = 5745
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 2
Text = "SETMENU.frx":0357
Top = 390
Width = 1725
End
Begin VB.CommandButton Command1
Caption = "关闭"
Height = 360
Left = 6060
TabIndex = 1
Top = 5520
Width = 1110
End
Begin VB.Label Label1
Caption = "操作员级别:"
Height = 240
Left = 5850
TabIndex = 3
Top = 2985
Width = 1485
End
End
Attribute VB_Name = "setmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'星级酒店管理系统最初功能演示版,提供所有星级酒店管理中的客房管理,
'房态管理,客史管理,客人资料管理,帐务管理,报表管理,餐饮收费管理
'菜谱管理,夜审处理,数据库备份等功能.所有功能皆可以运行,(但有一些BUG未处理)
'此代码完全可以完成星级酒店上述管理功能.(提供者:帅)
'--------------------------------------------------------------
'代码编写于:2001.12 系统分析:帅 代码编写:帅 版权所有:帅
'--------------------------------------------------------------
'本份代码仅提供给程序太平洋的所有朋友学习,研究之用.
'其它网站一律不得转载,否则为侵权行为,本人保留法律追诉权力.
'这也是本人最早的VB版程序,代码质量不好.望笑纳.:)
'--------------------------------------------------------------
'提供日期:2003-05-31 提供者:帅
'--------------------------------------------------------------
'系统提从与ACCESS或SQL相接,在登录时,选择全局数据库,就与SQL数据库
'连接,字符串存放在SERVER.DAT文本文件中;选择本地数据库,与本地ACCESS
'数据库相连,连接字符串存放在LOCAT.DAT文件中.(当前存放为e:\hotel2\room.mdb)
'---------------------------------------------------------------
'将ACCESS中所有表导入SQL中,并将有的表中的ID字段改为自动编码,就可以使用.
'---------------------------------------------------------------------
'
'
Private Sub Command1_Click()
' Data1.Recordset.Close
Unload Me
End Sub
Private Sub Command2_Click()
If Text2.Text <> "" Or (Not IsNull(Text2.Text)) Then
'Adodc1.Recordset.Edit
Adodc1.Recordset.Fields("usertype") = Adodc1.Recordset.Fields("usertype") & Trim(Text2)
'Adodc1.Recordset.Update
End If
End Sub
Private Sub Command3_Click()
Dim jb As String
Dim i As Integer
If Text2.Text <> "" Or (Not IsNull(Text2.Text)) Then
jb = Adodc1.Recordset.Fields("usertype")
For i = 1 To Len(Trim(jb))
If Mid(jb, i, 1) = Trim(Text2.Text) Then
If i <> 1 Then
If i = Len(Trim(jb)) Then
jb = Left(jb, Len(Trim(jb)) - 1)
Else
jb = Left(jb, i) & Right(jb, Len(Trim(jb)) - i - 1)
End If
Else
jb = Right(jb, Len(Trim(jb)) - 1)
End If
End If
Next
If jb = "" Then jb = "1"
'Adodc1.Recordset.Edit
Adodc1.Recordset.Fields("usertype") = jb
'Adodc1.Recordset.Update
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Update
MsgBox "数据已保存!", 64, "提示"
End Sub
Private Sub Form_Load()
Left = 0
Top = 0
Adodc1.ConnectionString = My_PROVIDER
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select menu,name,usertype from 菜单"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.ReBind
DataGrid1.Refresh
DataGrid1.Columns(0).Caption = "编号"
DataGrid1.Columns(1).Caption = "菜单名称"
DataGrid1.Columns(2).Caption = "使用者"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -