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

📄 商品信息表.frm

📁 此为库存管理系统!使用了VB开发工具开发
💻 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 Form8 
   BackColor       =   &H00808000&
   Caption         =   "商品信息"
   ClientHeight    =   4950
   ClientLeft      =   60
   ClientTop       =   420
   ClientWidth     =   9840
   LinkTopic       =   "Form8"
   ScaleHeight     =   4950
   ScaleWidth      =   9840
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      BackColor       =   &H00C00000&
      Caption         =   "操作:"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFF00&
      Height          =   975
      Left            =   0
      TabIndex        =   10
      Top             =   3960
      Width           =   9855
      Begin VB.CommandButton Command6 
         BackColor       =   &H00808080&
         Caption         =   "取消"
         Height          =   375
         Left            =   7320
         Style           =   1  'Graphical
         TabIndex        =   14
         Top             =   360
         Width           =   1095
      End
      Begin VB.CommandButton Command5 
         BackColor       =   &H00808080&
         Caption         =   "删除"
         Height          =   375
         Left            =   4800
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   360
         Width           =   1095
      End
      Begin VB.CommandButton Command4 
         BackColor       =   &H00808080&
         Caption         =   "修改"
         Height          =   375
         Left            =   2640
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   360
         Width           =   1095
      End
      Begin VB.CommandButton Command3 
         BackColor       =   &H00808080&
         Caption         =   "添加"
         Height          =   375
         Left            =   600
         Style           =   1  'Graphical
         TabIndex        =   11
         Top             =   360
         Width           =   1095
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "商品信息表.frx":0000
      Height          =   3975
      Left            =   5160
      TabIndex        =   9
      Top             =   0
      Width           =   4695
      _ExtentX        =   8281
      _ExtentY        =   7011
      _Version        =   393216
      BackColor       =   12582912
      ForeColor       =   65280
      HeadLines       =   1
      RowHeight       =   14
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "楷体_GB2312"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         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
      Caption         =   "商品"
      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            =   5880
      Top             =   3960
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=huangtao;Initial Catalog=canku"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=huangtao;Initial Catalog=canku"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   "huangtao"
      Password        =   "huangtao"
      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 Frame1 
      BackColor       =   &H00C00000&
      Caption         =   "商品信息表"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFF00&
      Height          =   3975
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5295
      Begin VB.TextBox Text1 
         BackColor       =   &H00000000&
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   360
         Left            =   2160
         TabIndex        =   8
         Top             =   600
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H00000000&
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   360
         Left            =   2160
         TabIndex        =   7
         Top             =   1200
         Width           =   1695
      End
      Begin VB.TextBox Text3 
         BackColor       =   &H00000000&
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   360
         Left            =   2160
         TabIndex        =   6
         Top             =   1920
         Width           =   1695
      End
      Begin VB.TextBox Text4 
         BackColor       =   &H00000000&
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   360
         Left            =   2160
         TabIndex        =   5
         Top             =   2640
         Width           =   1695
      End
      Begin VB.Label Label5 
         BackColor       =   &H00C00000&
         Caption         =   "商品名称:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   600
         Width           =   1335
      End
      Begin VB.Label Label2 
         BackColor       =   &H00C00000&
         Caption         =   "生产厂家:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   375
         Left            =   240
         TabIndex        =   3
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label3 
         BackColor       =   &H00C00000&
         Caption         =   "型号:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   2040
         Width           =   855
      End
      Begin VB.Label Label4 
         BackColor       =   &H00C00000&
         Caption         =   "规格:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   2760
         Width           =   855
      End
   End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
   Adodc1.Recordset.AddNew
   Adodc1.Recordset.Fields(0) = Text1.Text
   Adodc1.Recordset.Fields(1) = Text2.Text
   Adodc1.Recordset.Fields(2) = Text3.Text
   Adodc1.Recordset.Fields(3) = Text4.Text
   Adodc1.Recordset.update
   MsgBox "商品已成功加入表中!", , "库存管理系统"
   

End Sub

Private Sub Command2_Click()
Form8.Hide

End Sub

Private Sub Command3_Click()
   Adodc1.Recordset.AddNew
   Adodc1.Recordset.Fields(0) = Text1.Text
   Adodc1.Recordset.Fields(1) = Text2.Text
   Adodc1.Recordset.Fields(2) = Text3.Text
   Adodc1.Recordset.Fields(3) = Text4.Text
   Adodc1.Recordset.update
   MsgBox "商品已成功加入表中!", , "库存管理系统"

End Sub

Private Sub Command4_Click()
Form19.Show
End Sub


Private Sub Command5_Click()

Dim store As ADODB.Recordset
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
Set store = New ADODB.Recordset
Set conn = New ADODB.Connection
store.CursorLocation = adUseClient
conn.ConnectionString = "Provider=SQLOLEDB.1;password=huangtao;User ID=huangtao;Initial Catalog=canku"
conn.Open
cmd.ActiveConnection = conn
sql = "delete from 现有库存表 where 商品名称='" & Adodc1.Recordset.Fields(0).Value & "'"
cmd.CommandType = adCmdText
cmd.CommandText = sql
cmd.Execute
Form3.Adodc1.Recordset.update
Form3.DataGrid1.Refresh
Me.Adodc1.Recordset.Delete
End Sub

Private Sub Command6_Click()
Form8.Hide
End Sub

⌨️ 快捷键说明

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