【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:frmCategory.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmCategory
BorderStyle = 1 'Fixed Single
Caption = "Category Maintenance"
ClientHeight = 6045
ClientLeft = 45
ClientTop = 330
ClientWidth = 5175
Icon = "frmCategory.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6045
ScaleWidth = 5175
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 6060
Left = 0
ScaleHeight = 6030
ScaleWidth = 5175
TabIndex = 0
Top = 0
Width = 5200
Begin MSComctlLib.ListView ListView1
Height = 2895
Left = 120
TabIndex = 13
Top = 1800
Width = 4935
_ExtentX = 8705
_ExtentY = 5106
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
HotTracking = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
Appearance = 0
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "大类编号"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "大类名称"
Object.Width = 5362
EndProperty
End
Begin VB.Frame Frame4
Appearance = 0 'Flat
BackColor = &H00FFC0C0&
BorderStyle = 0 'None
Caption = "Frame1"
ForeColor = &H00FFFFFF&
Height = 1575
Left = 0
TabIndex = 6
Top = 4800
Width = 5535
Begin VB.CommandButton cmdAdd
Caption = "&添加"
Height = 500
Left = 120
Picture = "frmCategory.frx":08CA
Style = 1 'Graphical
TabIndex = 12
Top = 120
Width = 950
End
Begin VB.CommandButton cmdEdit
Caption = "&编辑"
Height = 500
Left = 1080
Picture = "frmCategory.frx":09BC
Style = 1 'Graphical
TabIndex = 11
Top = 120
Width = 950
End
Begin VB.CommandButton cmdDel
Caption = "&删除"
Height = 500
Left = 2040
Picture = "frmCategory.frx":0AAE
Style = 1 'Graphical
TabIndex = 10
Top = 120
Width = 950
End
Begin VB.CommandButton cmdSave
Caption = "&保存"
Height = 500
Left = 3000
Picture = "frmCategory.frx":0BA0
Style = 1 'Graphical
TabIndex = 9
Top = 120
Width = 950
End
Begin VB.CommandButton cmdCancel
Caption = "&取消"
Height = 500
Left = 3960
Picture = "frmCategory.frx":0C92
Style = 1 'Graphical
TabIndex = 8
Top = 120
Width = 950
End
Begin VB.CommandButton cmdExit
Caption = "退出"
Height = 500
Left = 120
Picture = "frmCategory.frx":0D84
Style = 1 'Graphical
TabIndex = 7
Top = 650
Width = 4815
End
End
Begin
VB.Frame Frame3
Appearance = 0 'Flat
BackColor = &H80000005&
Enabled = 0 'False
ForeColor = &H80000008&
Height = 975
Left = 120
TabIndex = 1
Top = 720
Width = 4935
Begin VB.TextBox txtCatCode
DataField = "itemcode"
DataSource = "Adodc1"
Height = 285
Left = 1560
Locked = -1 'True
TabIndex = 3
Top = 240
Width = 1935
End
Begin VB.TextBox txtCategory
Height = 285
Left = 1560
TabIndex = 2
Top = 600
Width = 3255
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "分类名称:"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 5
Top = 600
Width = 1335
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "分类编码:"
ForeColor = &H80000008&
Height = 255
Left = 480
TabIndex = 4
Top = 240
Width = 975
End
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "商品大类"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 0
TabIndex = 15
Top = 120
Width = 5175
End
Begin VB.Label lblCategory
Height = 255
Left = 3000
TabIndex = 14
Top = 360
Visible = 0 'False
Width = 1095
End
End
End
Attribute VB_Name = "frmCategory"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim blnEdit As Boolean
Dim lngIndex As Long
Public Sub LoadCat()
Dim itm As ListItem
ListView1.ListItems.Clear
If Not rsCategory.RecordCount < 1 Then rsCategory.MoveFirst
Do Until rsCategory.EOF
If Not IsNull(rsCategory!catcode) Then Set itm = ListView1.ListItems.Add(, , rsCategory!catcode)
If Not IsNull(rsCategory!catcode) Then itm.SubItems(1) = rsCategory!Category
rsCategory.MoveNext
DoEvents
Loop
End Sub
Private Sub cmdAdd_Click()
blnStatus False
txtCategory.SetFocus
txtCategory.Text = ""
txtCatCode.Text = ""
End Sub
Private Sub cmdCancel_Click()