⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form19.frm

📁 超市商品管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form19 
   Caption         =   "商品列表"
   ClientHeight    =   5700
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6465
   LinkTopic       =   "Form12"
   ScaleHeight     =   5700
   ScaleWidth      =   6465
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   615
      Left            =   3720
      TabIndex        =   17
      Top             =   120
      Width           =   1695
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   480
      Top             =   4680
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;Data Source=111;Initial Catalog=D:\my\form\111"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;Data Source=111;Initial Catalog=D:\my\form\111"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 商品列表"
      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 Command6 
      Caption         =   "退出"
      Height          =   495
      Left            =   3720
      TabIndex        =   16
      Top             =   4800
      Width           =   2175
   End
   Begin VB.CommandButton Command5 
      Caption         =   "最后一条记录"
      Height          =   495
      Left            =   4920
      TabIndex        =   15
      Top             =   3600
      Width           =   1455
   End
   Begin VB.CommandButton Command4 
      Caption         =   "第一条记录"
      Height          =   495
      Left            =   3360
      TabIndex        =   14
      Top             =   3600
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "修改商品信息"
      Height          =   735
      Left            =   3720
      TabIndex        =   13
      Top             =   2040
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加新商品信息"
      Height          =   735
      Left            =   3720
      TabIndex        =   12
      Top             =   960
      Width           =   1695
   End
   Begin VB.TextBox Text6 
      DataField       =   "供货商"
      DataSource      =   "Adodc1"
      Height          =   615
      Left            =   1440
      TabIndex        =   11
      Text            =   "Text6"
      Top             =   3600
      Width           =   1695
   End
   Begin VB.TextBox Text5 
      DataField       =   "库存"
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   1560
      TabIndex        =   10
      Text            =   "Text5"
      Top             =   2880
      Width           =   1455
   End
   Begin VB.TextBox Text4 
      DataField       =   "规格"
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   1440
      TabIndex        =   9
      Text            =   "Text4"
      Top             =   2160
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      DataField       =   "单价"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   1320
      TabIndex        =   8
      Text            =   "Text3"
      Top             =   1440
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      DataField       =   "商品名"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   1320
      TabIndex        =   7
      Text            =   "Text2"
      Top             =   720
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      DataField       =   "商品编号"
      DataSource      =   "Adodc1"
      Height          =   495
      Left            =   1440
      TabIndex        =   6
      Text            =   "Text1"
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "供货商"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   3600
      Width           =   975
   End
   Begin VB.Label Label5 
      Caption         =   "库存"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   3000
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "规格"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   2280
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "单价"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "商品名"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   720
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "商品编号"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   855
   End
End
Attribute VB_Name = "Form19"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()
Adodc1.Recordset.Fields("商品编号") = Trim(Text1.Text)
Adodc1.Recordset.Fields("商品名") = Trim(Text2.Text)
Adodc1.Recordset.Fields("单价") = Trim(Text3.Text)
Adodc1.Recordset.Fields("规格") = Trim(Text4.Text)
Adodc1.Recordset.Fields("库存") = Trim(Text5.Text)
Adodc1.Recordset.Fields("供货商") = Trim(Text6.Text)
 
Adodc1.Recordset.Update
End Sub

Private Sub Command3_Click()
Dim res As Integer
res = MsgBox("确实要删除此商品的信息吗?", vbExclamation + vbYesNo + vbDefaultButton2)
If res = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext

If Adodc1.Recordset.EOF = True Then
Adodc1.Recordset.MoveLast
End If

End If
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.MoveFirst

End Sub

Private Sub Command5_Click()
Adodc1.Recordset.MoveLast
End Sub

Private Sub Command6_Click()
Form4.Show
Me.Hide


End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -