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

📄 form3.frm

📁 一家大型电脑公司硬件销售管理系统 vb编写 值得写数据库人员参考借鉴
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Form3 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "当日销售"
   ClientHeight    =   3630
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3120
   Icon            =   "Form3.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3630
   ScaleWidth      =   3120
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   375
      Left            =   360
      Top             =   4920
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   661
      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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc3"
      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 TxtHPMC 
      Height          =   270
      Left            =   1320
      MaxLength       =   50
      TabIndex        =   8
      Top             =   600
      Width           =   1455
   End
   Begin VB.CommandButton CmdEnd 
      Caption         =   "取  消"
      Height          =   375
      Left            =   1680
      TabIndex        =   15
      Top             =   2880
      Width           =   975
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "确  定"
      Height          =   375
      Left            =   240
      TabIndex        =   14
      Top             =   2880
      Width           =   975
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   360
      Top             =   4560
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   582
      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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      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 MSDataListLib.DataCombo DComYGXM 
      Bindings        =   "Form3.frx":030A
      Height          =   330
      Left            =   1320
      TabIndex        =   13
      Top             =   2400
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "员工姓名"
      Text            =   "员工姓名"
      Object.DataMember      =   ""
   End
   Begin VB.TextBox TxtCBJG 
      Height          =   270
      Left            =   1320
      MaxLength       =   6
      TabIndex        =   11
      Top             =   1680
      Width           =   735
   End
   Begin VB.TextBox TxtCJJG 
      Height          =   270
      Left            =   1320
      MaxLength       =   6
      TabIndex        =   10
      Top             =   1320
      Width           =   735
   End
   Begin VB.TextBox TxtCJSL 
      Height          =   270
      Left            =   1320
      MaxLength       =   6
      TabIndex        =   9
      Top             =   960
      Width           =   735
   End
   Begin MSDataListLib.DataCombo DComHPLY 
      Bindings        =   "Form3.frx":031F
      Height          =   330
      Left            =   1320
      TabIndex        =   12
      Top             =   2040
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "同行公司"
      BoundColumn     =   ""
      Text            =   "货品来源"
      Object.DataMember      =   ""
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   360
      Top             =   4200
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   582
      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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      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.Label LabGS 
      Caption         =   "(单位:件)"
      Height          =   255
      Left            =   2040
      TabIndex        =   16
      Top             =   960
      Width           =   855
   End
   Begin VB.Label LabGJ 
      Caption         =   "(单位:元)"
      Height          =   255
      Left            =   2040
      TabIndex        =   17
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label LabBJ 
      Caption         =   "(单位:元)"
      Height          =   255
      Left            =   2040
      TabIndex        =   18
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label LabHPMC 
      Caption         =   "货品名称:"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   600
      Width           =   975
   End
   Begin VB.Label LabYGXM 
      Caption         =   "员工姓名:"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   2520
      Width           =   975
   End
   Begin VB.Label LabCBJG 
      Caption         =   "成本价格:"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label LabCJJG 
      Caption         =   "成交价格:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label LabCJSL 
      Caption         =   "成交数量:"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   960
      Width           =   975
   End
   Begin VB.Label LabHPLY 
      Caption         =   "货品来源:"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label LabData1 
      Caption         =   "Label1"
      Height          =   255
      Left            =   1320
      TabIndex        =   1
      Top             =   240
      Width           =   1455
   End
   Begin VB.Label LabData 
      Caption         =   "当前日期:"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'欢迎你下载使用本代码,本份代码由程序太平洋提供下载学习之用
'声明:
'1.本站所有代码的版权归原作者所有,如果你使用了在本站下载的源代码
'  引起的一切纠纷(后果)与本站无关,请您尊重原作者的劳动成果!
'2.若本站在代码上有侵权之处请您与站长联系,站长会及时更正。
'网站:http://www.dapha.net
'论坛:http://www.5ivb.net
'Email:dapha@etang.com
'CopyRight 2001-2005 By dapha.net
'整理时间:2003-8-16 12:44:00


Private Sub CmdEnd_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    Dim Sum As Integer

    If Me.TxtHPMC.Text = "" Then
        MsgBox "请输入货品名称!", vbOKOnly + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    If Me.TxtCJSL.Text = "" Then
        MsgBox "请输入交易数量!", vbOKOnly + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    If Me.TxtCBJG.Text = "" Then
        MsgBox "请输入货品成本价格!", vbOKOnly + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    If Me.TxtCJJG.Text = "" Then
        MsgBox "请输入货品交易价格!", vbOKOnly + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    If Me.DComHPLY.Text = "货品来源" Then
        MsgBox "请选择或写入货品来源地!", vbOKOnly + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    If Me.DComYGXM.Text = "员工姓名" Then
        MsgBox "请输入员工姓名或写入销售员工姓名!", vbOK + 48, "金恒生计算机硬件公司管理系统"
        Exit Sub
    End If
    Sum = (CInt(Me.TxtCJJG.Text) - CInt(Me.TxtCBJG.Text)) * CInt(Me.TxtCJSL.Text)
    Me.Adodc3.Recordset.AddNew
    Me.Adodc3.Recordset("成交利润") = Sum
    Me.Adodc3.Recordset("交易日期") = Me.LabData1.Caption
    Me.Adodc3.Recordset("货品来源") = Me.DComHPLY.Text
    Me.Adodc3.Recordset("货品名称") = Me.TxtHPMC.Text
    Me.Adodc3.Recordset("成本价格") = Me.TxtCBJG.Text
    Me.Adodc3.Recordset("成交价格") = Me.TxtCJJG.Text
    Me.Adodc3.Recordset("员工姓名") = Me.DComYGXM.Text
    Me.Adodc3.Recordset("成交数量") = Me.TxtCJSL.Text
    Me.Adodc3.Recordset.Update
    Me.TxtHPMC.Text = ""
    Me.TxtCJSL.Text = ""
    Me.TxtCBJG.Text = ""
    Me.TxtCJJG.Text = ""
    Me.DComHPLY.Text = "货品来源"
    Me.DComYGXM.Text = "员工姓名"

End Sub

Private Sub Form_Load()
    Dim StrConnect, strConnect2, strconnect3 As String
    StrConnect = App.Path
    strConnect2 = App.Path
    strconnect3 = App.Path

    If Right(StrConnect, 1) <> "\" Then StrConnect = StrConnect + "\"
    StrConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & StrConnect & "\data\kji.bgh"
    Adodc1.ConnectionString = StrConnect
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "SELECT 同行公司 FROM [thgs]"
    Adodc1.Refresh

    Me.LabData1.Caption = Format(Date, "dddddd")
    If Right(strConnect2, 1) <> "\" Then strConnect2 = strConnect2 + "\"
    strConnect2 = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & strConnect2 & "\data\kji.bgh"
    Adodc2.ConnectionString = strConnect2
    Adodc2.CommandType = adCmdText
    Adodc2.RecordSource = "SELECT * FROM [ygxm]"
    Adodc2.Refresh

    If Right(strconnect3, 1) <> "\" Then strconnect3 = strconnect3 + "\"
    strconnect3 = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & strconnect3 & "\data\kji.bgh"
    Adodc3.ConnectionString = strconnect3
    Adodc3.CommandType = adCmdText
    Adodc3.RecordSource = "SELECT * FROM [sell]"
    Adodc3.Refresh

    Me.Adodc1.Visible = False
    Me.Adodc2.Visible = False
    Me.Adodc3.Visible = False
    Form3.Top = 0
    Form3.Left = 0
    Form3.Width = 3250
    Form3.Height = 3800
End Sub

Private Sub TxtCBJG_KeyPress(KeyAscii As Integer)
    Dim strValid As String
    strValid = ".0123456789"
    If KeyAscii > 26 Then
        If InStr(strValid, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        End If
    End If
End Sub


Private Sub TxtCJJG_KeyPress(KeyAscii As Integer)
    Dim strValid As String
    strValid = ".0123456789"
    If KeyAscii > 26 Then
        If InStr(strValid, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        End If
    End If
End Sub

Private Sub TxtCJSL_KeyPress(KeyAscii As Integer)
    Dim strValid As String
    strValid = ".0123456789"
    If KeyAscii > 26 Then
        If InStr(strValid, Chr(KeyAscii)) = 0 Then
            KeyAscii = 0
        End If
    End If
End Sub
'统计结果:
'    注释共:1行

⌨️ 快捷键说明

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