📄 frmcolorandsize.frm
字号:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#2.0#0"; "THREED20.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmColorAndSize
BorderStyle = 3 'Fixed Dialog
Caption = "颜色与尺寸维护"
ClientHeight = 4755
ClientLeft = 45
ClientTop = 330
ClientWidth = 7395
Icon = "frmColorAndSize.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4755
ScaleWidth = 7395
ShowInTaskbar = 0 'False
Begin VB.TextBox txtName
Height = 330
Left = 4650
TabIndex = 9
Top = 765
Width = 2130
End
Begin VB.TextBox txtCode
Height = 330
Left = 1140
TabIndex = 7
Top = 795
Width = 2385
End
Begin MSDataGridLib.DataGrid DataGrid1
Align = 2 'Align Bottom
Height = 3420
Left = 0
TabIndex = 5
Top = 1335
Width = 7395
_ExtentX = 13044
_ExtentY = 6033
_Version = 393216
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 VB.PictureBox Picture1
Align = 1 'Align Top
Height = 615
Left = 0
ScaleHeight = 555
ScaleWidth = 7335
TabIndex = 0
Top = 0
Width = 7395
Begin Threed.SSCommand SSCommand4
Height = 540
Left = 3240
TabIndex = 4
Top = -15
Width = 1080
_ExtentX = 1905
_ExtentY = 953
_Version = 131073
Caption = "退出"
End
Begin Threed.SSCommand SSCommand3
Height = 540
Left = 2160
TabIndex = 3
Top = -15
Width = 1080
_ExtentX = 1905
_ExtentY = 953
_Version = 131073
Caption = "增加"
End
Begin Threed.SSCommand SSCommand2
Height = 540
Left = 1080
TabIndex = 2
Top = -15
Width = 1080
_ExtentX = 1905
_ExtentY = 953
_Version = 131073
Caption = "删除"
End
Begin Threed.SSCommand SSCommand1
Height = 540
Left = 0
TabIndex = 1
Top = -15
Width = 1080
_ExtentX = 1905
_ExtentY = 953
_Version = 131073
Caption = "刷新"
End
End
Begin VB.Label Label2
Caption = "名称"
Height = 240
Left = 3795
TabIndex = 8
Top = 825
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "编码"
Height = 180
Left = 600
TabIndex = 6
Top = 855
Width = 360
End
End
Attribute VB_Name = "frmColorAndSize"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
On Error Resume Next
sSQL = "select * from 商品信息"
Set RsTemp = Nothing
RsTemp.Open sSQL, Conn, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = RsTemp
End Sub
Private Sub SSCommand1_Click()
On Error Resume Next
If txtCode.Text <> "" Then
sSQL = "select * from 商品信息 where 商品编码 like '" & Trim(txtCode.Text) & "'"
If TxtName.Text <> "" Then sSQL = sSQL & " ,商品名称 like '" & Trim(TxtName.Text) & "'"
End If
Set RsTemp = Nothing
RsTemp.Open sSQL, Conn, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = RsTemp
DataGrid1.Refresh
End Sub
Private Sub SSCommand2_Click()
If MsgBox("确定要删除该记录吗?", vbQuestion + vbYesNo, "提示信息") = vbNo Then Exit Sub
RsTemp.Delete adAffectCurrent
End Sub
Private Sub SSCommand3_Click()
frmAddColorAndSize.Show 1
' RsTemp.Requery
' DataGrid1.Refresh
End Sub
Private Sub SSCommand4_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -