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

📄 销售信息管理.frm

📁 基于VB+SQL Server的零食销售管理系统设计
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      End
      Begin VB.TextBox Text5 
         Height          =   495
         Left            =   1920
         TabIndex        =   12
         Top             =   1320
         Width           =   1575
      End
      Begin VB.TextBox Text4 
         Height          =   495
         Left            =   1920
         TabIndex        =   11
         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        =   10
         Top             =   2280
         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          =   375
         Left            =   120
         TabIndex        =   9
         Top             =   1440
         Width           =   1455
      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        =   8
         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          =   2895
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3615
      Begin VB.TextBox Text3 
         Height          =   495
         Left            =   1680
         TabIndex        =   7
         Top             =   2160
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   1680
         TabIndex        =   6
         Top             =   1320
         Width           =   1695
      End
      Begin VB.TextBox Text1 
         Height          =   495
         Left            =   1680
         TabIndex        =   5
         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        =   4
         Top             =   2280
         Width           =   1215
      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          =   495
         Left            =   120
         TabIndex        =   3
         Top             =   1440
         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        =   2
         Top             =   600
         Width           =   1215
      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 销售日期='" & Text9.Text & "'"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
'myres.Delete adAffectCurrent
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 quit_Click()
Unload Me
系统主页.Show
mycon.Close
Set mycon = Nothing
End Sub

Private Sub save_Click()
mycon.Execute "update 销售信息 set 商品数量='" & Text7.Text & "' ,商品单价='" & Text8.Text & "',销售日期='" & Text9.Text & "',备注='" & Text10.Text & "' where 商品名称='" & Text4.Text & "' and  顾客公司名称='" & Text1.Text & "'"
save.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 seek_Click()
Dim strSql As String
If Text1.Text = "" Or Text4.Text = "" Then
MsgBox "请输入公司名称和商品名称查询!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
strSql = "select * from 出货管理 where 顾客公司名称 ='" & Text1.Text & "'and 商品名称 ='" & Text4.Text & "'"
myres.Open strSql, mycon, adOpenDynamic, adLockOptimistic
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 = ""
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
'Text7.Text = ""
'Text8.Text = ""
'Text9.Text = ""
'Text10.Text = ""
upd.Enabled = False
End Sub

⌨️ 快捷键说明

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