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

📄 form5.frm

📁 超市售货管理系统需求分析 当超市中商品现有信息中商品数量不够时就通知经办人去去厂家采购商品 当顾客购买商品时超市销售商品
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form 商品基本信息 
   Caption         =   "商品基本信息"
   ClientHeight    =   4170
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6330
   LinkTopic       =   "Form4"
   ScaleHeight     =   4170
   ScaleWidth      =   6330
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   360
      Top             =   3600
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   873
      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         =   "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
      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.TextBox Text5 
      Height          =   495
      Left            =   4200
      TabIndex        =   13
      Top             =   1560
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   4200
      TabIndex        =   12
      Top             =   840
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   1440
      TabIndex        =   11
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   1440
      TabIndex        =   10
      Top             =   1560
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1440
      TabIndex        =   9
      Top             =   840
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   "查询商品"
      Height          =   495
      Left            =   1800
      TabIndex        =   3
      Top             =   120
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "修改商品"
      Height          =   495
      Left            =   3240
      TabIndex        =   2
      Top             =   120
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   495
      Left            =   4800
      TabIndex        =   1
      Top             =   120
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加商品"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "销售单价"
      Height          =   375
      Index           =   5
      Left            =   360
      TabIndex        =   8
      Top             =   2280
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "现有数量"
      Height          =   375
      Index           =   4
      Left            =   3240
      TabIndex        =   7
      Top             =   960
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "采购单价"
      Height          =   375
      Index           =   3
      Left            =   3240
      TabIndex        =   6
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "商品名"
      Height          =   375
      Index           =   1
      Left            =   360
      TabIndex        =   5
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "商品号"
      Height          =   375
      Index           =   0
      Left            =   360
      TabIndex        =   4
      Top             =   960
      Width           =   975
   End
End
Attribute VB_Name = "商品基本信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 商品基本信息"
Adodc1.Refresh
While (Adodc1.Recordset.EOF = False)
  If Trim(Adodc1.Recordset.Fields("商品号")) = Trim(Text1.Text) Then
     MsgBox ("商品已存在,请输入新商品!")
     Text1.SetFocus
     Text1.Text = ""
     Text2.Text = ""
     Text3.Text = ""
     Text4.Text = ""
     Text5.Text = ""
     Exit Sub
  Else
    Adodc1.Recordset.MoveNext
  End If
Wend
Adodc1.Recordset.AddNew
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.Update
Adodc1.Recordset.Close
MsgBox ("添加商品成功!")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub


Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Adodc1.RecordSource = "select * from 商品基本信息 where  商品号 = '" + Trim(Text1.Text) + "'"
Adodc1.Refresh
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.Update
Adodc1.Recordset.Close
MsgBox ("修改商品成功!")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub

Private Sub Command4_Click()
Adodc1.RecordSource = "select * from 商品基本信息"
Adodc1.Refresh
While (Adodc1.Recordset.EOF = False)
  If Trim(Adodc1.Recordset.Fields("商品号")) = Trim(Text1.Text) Then
   Adodc1.Recordset.MoveNext
  Else
     MsgBox ("商品不存在,请输入新商品号!")
     Text1.SetFocus
     Text1.Text = ""
     Text2.Text = ""
     Text3.Text = ""
     Text4.Text = ""
     Text5.Text = ""
     Exit Sub
End If
Wend
Adodc1.RecordSource = "select * from 商品基本信息 where  商品号 = '" + Trim(Text1.Text) + "'"
Adodc1.Refresh
Text2.Text = Trim(Adodc1.Recordset.Fields("商品名"))
Text3.Text = Trim(Adodc1.Recordset.Fields("销售单价"))
Text4.Text = Trim(Adodc1.Recordset.Fields("现有数量"))
Text5.Text = Trim(Adodc1.Recordset.Fields("采购单价"))
End Sub

⌨️ 快捷键说明

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