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

📄 已进货信息管理.frm

📁 基于VB+SQL Server的零食销售管理系统设计
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         TabIndex        =   18
         Top             =   2400
         Width           =   1575
      End
      Begin VB.TextBox Text5 
         Height          =   495
         Left            =   1920
         TabIndex        =   17
         Top             =   1440
         Width           =   1575
      End
      Begin VB.TextBox Text4 
         Height          =   495
         Left            =   1920
         TabIndex        =   16
         Top             =   480
         Width           =   1575
      End
      Begin VB.Label Label6 
         Caption         =   "商品规格单位"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   15
         Top             =   2520
         Width           =   1815
      End
      Begin VB.Label Label5 
         Caption         =   "商品规格"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   14
         Top             =   1560
         Width           =   1335
      End
      Begin VB.Label Label4 
         Caption         =   "商品名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   13
         Top             =   600
         Width           =   1335
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "供应商信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3135
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3735
      Begin VB.TextBox Text3 
         Height          =   495
         Left            =   1920
         TabIndex        =   12
         Top             =   2400
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   1920
         TabIndex        =   11
         Top             =   1440
         Width           =   1695
      End
      Begin VB.TextBox Text1 
         Height          =   495
         Left            =   1920
         TabIndex        =   10
         Top             =   480
         Width           =   1695
      End
      Begin VB.Label Label3 
         Caption         =   "联系电话"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   9
         Top             =   2520
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "联系人姓名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   8
         Top             =   1560
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "供应商名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   600
         Width           =   1695
      End
   End
End
Attribute VB_Name = "已进货信息管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myres As ADODB.Recordset
Dim mycon As ADODB.Connection
Private Sub del_Click()
mycon.Execute "delete from 进货信息 where 供应商公司名称='" & Text1.Text & "' and  商品名称='" & Text4.Text & "' and 进货日期='" & Text10.Text & "'"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
MsgBox "删除成功!", vbOKOnly + vbInformation, "提示"
del.Enabled = False
End Sub

Private Sub Form_Load()
Set mycon = New ADODB.Connection
mycon.Open "dsn=my", "sa"
Set myres = New ADODB.Recordset
End Sub

Private Sub ok_Click()
mycon.Execute "update 进货信息 set 商品数量='" & Text7.Text & "' ,商品单价='" & Text8.Text & "',进货日期='" & Text9.Text & "',备注='" & Text10.Text & "'where 商品名称='" & Text4.Text & "' and 供应商公司名称='" & Text1.Text & "'"
ok.Enabled = False
Text11.Text = str(Val(Text7.Text) * Val(Text8.Text))
Text1.Visible = True
Text2.Visible = True
Text3.Visible = True
Text4.Visible = True
Text5.Visible = True
Text6.Visible = True
End Sub

Private Sub quit_Click()
Unload Me
系统主页.Show
mycon.Close
Set mycon = Nothing
End Sub

Private Sub seek_Click()
Dim strSql As String
If Text1.Text = "" And Text4.Text = "" Then
MsgBox "请输入公司名称和商品名称查询!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
strSql = "select * from 进货管理 where 供应商公司名称 ='" & Text1.Text & "'and 商品名称 ='" & Text4.Text & "'"
Set myres = mycon.Execute(strSql)
If myres.BOF And myres.EOF Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
MsgBox "没有满足条件的记录!", vbOKOnly + vbInformation, "提示"
Else
Text1.Text = myres.Fields(0)
Text2.Text = myres.Fields(1)
Text3.Text = myres.Fields(2)
Text4.Text = myres.Fields(3)
Text5.Text = myres.Fields(4)
Text6.Text = myres.Fields(5)
Text7.Text = myres.Fields(6)
Text8.Text = myres.Fields(7)
Text9.Text = myres.Fields(8)
Text10.Text = myres.Fields(9)
Text11.Text = str(Val(Text7.Text) * Val(Text8.Text))
End If
End Sub

Private Sub upd_Click()
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Text5.Visible = False
Text6.Visible = False
upd.Enabled = False
End Sub

⌨️ 快捷键说明

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