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

📄 frmstockinfo.frm

📁 VB礼品店销售管理系统 包括ACCESS数据库访问职工管理 账单管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "当前库存产品清单"
      ColumnCount     =   11
      BeginProperty Column00 
         DataField       =   "ProductID"
         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       =   "ProductName"
         Caption         =   "产品名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "TreeSort"
         Caption         =   "树种名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "JinhuoPrice"
         Caption         =   "进货价格"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   """¥""#,##0.00"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "Number"
         Caption         =   "进货数量"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "remainNumber"
         Caption         =   "库存数量"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "SumPrice"
         Caption         =   "库存价格小计"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   """¥""#,##0.00"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "MarketPrice"
         Caption         =   "市场价格"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   """¥""#,##0.00"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "LowestPrice"
         Caption         =   "最低售价"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   1
            Format          =   """¥""#,##0.00"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09 
         DataField       =   "Picture"
         Caption         =   "   产品图片路径"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column10 
         DataField       =   "InstockTime"
         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 
            Alignment       =   2
            ColumnWidth     =   1049.953
         EndProperty
         BeginProperty Column01 
            Alignment       =   2
            ColumnWidth     =   1080
         EndProperty
         BeginProperty Column02 
            Alignment       =   2
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column03 
            Alignment       =   2
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column04 
            Alignment       =   2
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column05 
            Alignment       =   2
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column06 
            Alignment       =   2
         EndProperty
         BeginProperty Column07 
            Alignment       =   2
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column08 
            Alignment       =   2
            ColumnWidth     =   1110.047
         EndProperty
         BeginProperty Column09 
            Alignment       =   2
            ColumnWidth     =   2204.788
         EndProperty
         BeginProperty Column10 
            Alignment       =   2
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin VB.Label Label12 
      AutoSize        =   -1  'True
      Caption         =   "种"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   240
      Left            =   13560
      TabIndex        =   24
      Top             =   330
      Width           =   255
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "当前库存产品种类共有"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   240
      Left            =   9480
      TabIndex        =   23
      Top             =   330
      Width           =   2550
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "当前库存产品进货价格总计"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   240
      Left            =   1680
      TabIndex        =   21
      Top             =   330
      Width           =   3060
   End
End
Attribute VB_Name = "frmStockInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
    txtProductname = Adodc1.Recordset.Fields("ProductName")
    txtProductId = Adodc1.Recordset.Fields("ProductID")
    s = Split(Adodc1.Recordset.Fields("instocktime"), " ")
    DTPDate.Value = s(0)
    DTPTime.Value = s(1)
    txtInprice = "¥" & Format(Adodc1.Recordset.Fields("JinhuoPrice"), "###,###,###.00")
    txtInNumber = Adodc1.Recordset.Fields("Number")
    txtRemainNumber = Adodc1.Recordset.Fields("remainNumber")
    imgProduct.Picture = LoadPicture(Adodc1.Recordset.Fields("picture"))
    txtTreeSort = Adodc1.Recordset.Fields("TreeSort")
    txtSmallSumUp = "¥" & Format(Adodc1.Recordset.Fields("SumPrice"), "###,###,###.00")
End Sub

Private Sub Form_Load()
On Error GoTo errhandle
    sqlstring = "select ProductID,ProductName,TreeSort,JinhuoPrice,Number," & _
                "remainNumber,JinhuoPrice*remainNumber as SumPrice,MarketPrice," & _
                "LowestPrice,Picture,InstockTime from product where remainNumber>0 order by cdate(InstockTime) desc"
    Adodc1.CommandType = adCmdText
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbFile & ";Persist Security Info=False"
    Adodc1.RecordSource = sqlstring
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
            
    If Not Adodc1.Recordset.BOF Then
        txtSort = Adodc1.Recordset.RecordCount
        txtProductname = Adodc1.Recordset.Fields("ProductName")
        txtProductId = Adodc1.Recordset.Fields("ProductID")
        s = Split(Adodc1.Recordset.Fields("instocktime"), " ")
        DTPDate.Value = s(0)
        DTPTime.Value = s(1)
        txtInprice = "¥" & Format(Adodc1.Recordset.Fields("JinhuoPrice"), "###,###,###.00")
        txtInNumber = Adodc1.Recordset.Fields("Number")
        txtRemainNumber = Adodc1.Recordset.Fields("remainNumber")
        imgProduct.Picture = LoadPicture(Adodc1.Recordset.Fields("picture"))
        txtTreeSort = Adodc1.Recordset.Fields("TreeSort")
        txtSmallSumUp = "¥" & Format(Adodc1.Recordset.Fields("SumPrice"), "###,###,###.00")
    
        sqlstring = "select sum(JinhuoPrice*remainNumber) from product"
        Set cn = New ADODB.Connection
        cn.Provider = "Microsoft.Jet.OLEDB.4.0"
        strconn = "Data Source=" & dbFile & ";Persist Security Info=False"
        cn.Open ConnectionString:=strconn
        Set rs = New ADODB.Recordset
        rs.ActiveConnection = cn
        rs.CursorType = adOpenStatic
        rs.Open sqlstring
        txtSumUp = "¥" & Format(Str(rs.Fields(0)), "###,###,###.00")
        rs.Close
        Set rs = Nothing
        cn.Close
        Set cn = Nothing
    End If
    StockInfoFlag = True
    Exit Sub
errhandle:
    MsgBox "加载数据时有错误发生,错误编号为:" & Err.Number, 48, "信息提示"
End Sub

Private Sub Form_Terminate()
StockInfoFlag = False
End Sub

⌨️ 快捷键说明

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