📄 frmfyset.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"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmFYset
BorderStyle = 1 'Fixed Single
Caption = "费用设置"
ClientHeight = 5130
ClientLeft = 45
ClientTop = 435
ClientWidth = 10080
Icon = "FrmFYset.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5130
ScaleWidth = 10080
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc3
Height = 330
Left = 1560
Top = 1800
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc3"
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 MSAdodcLib.Adodc Adodc2
Height = 330
Left = 1560
Top = 1440
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
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 MSAdodcLib.Adodc Adodc1
Height = 330
Left = 360
Top = 720
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
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.Frame Frame2
Height = 1695
Left = 6960
TabIndex = 11
Top = 3300
Width = 3015
Begin VB.CommandButton Command5
Caption = "返回"
Height = 375
Left = 2040
TabIndex = 14
Top = 840
Width = 855
End
Begin VB.CommandButton Command4
Caption = "删除"
Height = 375
Left = 1080
TabIndex = 13
Top = 840
Width = 855
End
Begin VB.CommandButton Command3
Caption = "编辑"
Height = 375
Left = 120
TabIndex = 12
Top = 840
Width = 855
End
Begin VB.CommandButton Command2
Caption = "保存"
Enabled = 0 'False
Height = 375
Left = 1080
TabIndex = 6
Top = 360
Width = 855
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 375
Left = 120
TabIndex = 0
Top = 360
Width = 855
End
End
Begin VB.Frame Frame1
Height = 2895
Left = 6960
TabIndex = 2
Top = 120
Width = 3015
Begin VB.ComboBox Combo1
DataField = "服务员"
DataSource = "Adodc1"
Height = 300
Left = 1560
Locked = -1 'True
TabIndex = 5
Top = 2400
Width = 1095
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "FrmFYset.frx":1982
DataField = "类别"
DataSource = "Adodc1"
Height = 330
Left = 960
TabIndex = 4
Top = 1680
Width = 1695
_ExtentX = 2990
_ExtentY = 582
_Version = 393216
Locked = -1 'True
ListField = "类别"
Text = ""
End
Begin VB.TextBox Text2
DataField = "单价"
DataSource = "Adodc1"
Height = 300
Left = 960
Locked = -1 'True
TabIndex = 3
Top = 1125
Width = 1695
End
Begin VB.TextBox Text1
DataField = "项目"
DataSource = "Adodc1"
Height = 300
Left = 960
Locked = -1 'True
TabIndex = 1
Top = 480
Width = 1695
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "是否需要服务员"
Height = 180
Left = 120
TabIndex = 10
Top = 2400
Width = 1260
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "类别"
Height = 180
Left = 120
TabIndex = 9
Top = 1755
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "单价"
Height = 180
Left = 120
TabIndex = 8
Top = 1125
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "项目"
Height = 180
Left = 120
TabIndex = 7
Top = 480
Width = 360
End
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmFYset.frx":1997
Height = 4815
Left = 120
TabIndex = 15
Top = 180
Width = 6615
_ExtentX = 11668
_ExtentY = 8493
_Version = 393216
AllowUpdate = -1 'True
DefColWidth = 67
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
End
Attribute VB_Name = "FrmFYset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Select Case Command1.Caption
Case "添加"
Command3.Enabled = False
Command4.Enabled = False
Command2.Enabled = True
Command1.Caption = "取消"
Text1.Locked = False
Text2.Locked = False
DataCombo1.Locked = False
Combo1.Locked = False
Adodc1.Recordset.AddNew
Case "取消"
Adodc1.Recordset.CancelBatch adAffectCurrent
Adodc1.Recordset.MoveFirst
Command1.Caption = "添加"
Command3.Enabled = True
Command4.Enabled = True
Command2.Enabled = False
Text1.Locked = True
Text2.Locked = True
DataCombo1.Locked = True
Combo1.Locked = True
End Select
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.UpdateBatch adAffectCurrent
Command2.Enabled = False
Command1.Enabled = True
Command3.Enabled = True
Text1.Locked = True
Text2.Locked = True
DataCombo1.Locked = True
Combo1.Locked = True
Command1.Caption = "添加"
Command1.SetFocus
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.UpdateBatch adAffectCurrent
Command2.Enabled = True
Command1.Enabled = False
Command3.Enabled = False
Text1.Locked = False
Text2.Locked = False
DataCombo1.Locked = False
Combo1.Locked = False
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.Delete
End Sub
Private Sub Command5_Click()
If Command1.Caption = "取消" Then Adodc1.Recordset.CancelBatch adAffectCurrent
Unload Me
End Sub
Private Sub DataCombo2_Click(Area As Integer)
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = conn1
Adodc2.ConnectionString = conn1
Adodc1.RecordSource = "select * from 费用"
Adodc1.Refresh
Adodc2.RecordSource = "select distinct 类别 from 费用 "
Adodc2.Refresh
Combo1.AddItem "是"
Combo1.AddItem "否"
Combo1.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -