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

📄 frmxsjl.frm

📁 一个用VB写的服装进销存源码
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmxsjl 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "销售记录"
   ClientHeight    =   6600
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   9885
   Icon            =   "frmxsjl.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6600
   ScaleWidth      =   9885
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmddaochu 
      Caption         =   "导出数据(&P)"
      Height          =   375
      Left            =   7320
      TabIndex        =   16
      Top             =   6120
      Width           =   1215
   End
   Begin VB.Frame Frame2 
      Caption         =   "查询销售记录"
      Height          =   1455
      Left            =   120
      TabIndex        =   7
      Top             =   5040
      Width           =   4455
      Begin VB.CommandButton cmdquan 
         Caption         =   "显示全部(&A)"
         Height          =   375
         Left            =   2400
         TabIndex        =   12
         Top             =   840
         Width           =   1215
      End
      Begin VB.CommandButton cmdsou 
         Caption         =   "搜"
         BeginProperty Font 
            Name            =   "华文行楷"
            Size            =   15
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1800
         TabIndex        =   11
         Top             =   840
         Width           =   495
      End
      Begin VB.CommandButton cmdsou2 
         Caption         =   "搜"
         BeginProperty Font 
            Name            =   "华文行楷"
            Size            =   15
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3720
         TabIndex        =   8
         Top             =   360
         Width           =   495
      End
      Begin MSComCtl2.DTPicker dtp1 
         Height          =   375
         Left            =   2280
         TabIndex        =   9
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         Format          =   25362433
         CurrentDate     =   38988
      End
      Begin MSComCtl2.DTPicker dtp 
         Height          =   375
         Left            =   360
         TabIndex        =   10
         Top             =   360
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   25362433
         CurrentDate     =   38988
      End
      Begin MSComCtl2.DTPicker dt 
         Height          =   375
         Left            =   360
         TabIndex        =   13
         Top             =   840
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   661
         _Version        =   393216
         Format          =   25362433
         CurrentDate     =   38980
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "从"
         Height          =   180
         Left            =   120
         TabIndex        =   15
         Top             =   480
         Width           =   180
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "到"
         Height          =   180
         Left            =   1920
         TabIndex        =   14
         Top             =   480
         Width           =   180
      End
   End
   Begin VB.CommandButton cmddel 
      Caption         =   "删除(&D)"
      Height          =   375
      Left            =   4680
      TabIndex        =   0
      Top             =   6120
      Width           =   1215
   End
   Begin VB.CommandButton cmdrefresh 
      Caption         =   "刷新记录(&R)"
      Height          =   375
      Left            =   6000
      TabIndex        =   1
      Top             =   6120
      Width           =   1215
   End
   Begin VB.CommandButton cmdclose 
      Caption         =   "关闭(&C)"
      Height          =   375
      Left            =   8640
      TabIndex        =   2
      Top             =   6120
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "显示结果"
      Height          =   4275
      Left            =   120
      TabIndex        =   4
      Top             =   600
      Width           =   9675
      Begin MSComDlg.CommonDialog Dialog1 
         Left            =   3840
         Top             =   2040
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
      Begin MSFlexGridLib.MSFlexGrid Grid1 
         Height          =   3975
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Width           =   9435
         _ExtentX        =   16642
         _ExtentY        =   7011
         _Version        =   393216
         Cols            =   10
         ScrollTrack     =   -1  'True
         FocusRect       =   0
         SelectionMode   =   1
         AllowUserResizing=   3
         Appearance      =   0
      End
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "元"
      Height          =   180
      Left            =   7440
      TabIndex        =   20
      Top             =   5640
      Width           =   180
   End
   Begin VB.Label lblrecord 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   6600
      TabIndex        =   19
      Top             =   5280
      Width           =   90
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "当前表内显示记录总数:"
      Height          =   180
      Left            =   4680
      TabIndex        =   18
      Top             =   5280
      Width           =   1890
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "当前表内显示记录利润总额:"
      Height          =   180
      Left            =   4680
      TabIndex        =   17
      Top             =   5640
      Width           =   2250
   End
   Begin VB.Label lbllirun 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   6960
      TabIndex        =   6
      Top             =   5640
      Width           =   90
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "销售记录"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   3960
      TabIndex        =   3
      Top             =   120
      Width           =   1800
   End
End
Attribute VB_Name = "frmxsjl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strsql As String
Dim sql As String
Private Sub cmdclose_Click()
    Unload Me
End Sub

Private Sub cmddaochu_Click()
    Dim rs As New ADODB.Recordset
    rs.open Grid1.Tag, cn
    Call html(rs, Dialog1)
End Sub

Private Sub cmddel_Click()
Dim s As Integer
Dim i As Integer
Dim sum As Double
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
        MsgBox "没有可以删除的记录。", 48, "提示信息"
        Exit Sub
    End If
    If MsgBox("您确实要删除这条记录吗?", 36, "提示信息") = vbNo Then
        Exit Sub
    End If
    cn.Execute "delete from xiaoshoujilu where XID=" & Grid1.TextMatrix(Grid1.Row, 0)
    If Grid1.rows = 2 Then
        Grid1.rows = 1
        Grid1.rows = 2
    Else
        Grid1.RemoveItem Grid1.Row
    End If
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lbllirun.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub

Private Sub cmdjisuan_Click() '实现计算表格内利润总额
Dim s As Integer
Dim i As Integer
Dim sum As Double
If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lbllirun.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
End Sub

Private Sub cmdrefresh_Click()
Dim s As Integer
Dim i As Integer
Dim sum As Double
    Dim rs As New ADODB.Recordset
    Dim strsql As String
    strsql = "select " & sqlZiduan1 & " from xiaoshoujilu where xshijian like '%" & dt.Value & "%' order by XID"
    rs.open strsql, cn
    fuzhi Grid1, rs
    Grid1.Tag = strsql '为了导出按钮
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lbllirun.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub

Private Sub cmdsou_Click()
Dim s As Integer
Dim i As Integer
Dim sum As Double
    Dim rs As New ADODB.Recordset
    Dim strsql As String
    strsql = "select " & sqlZiduan1 & " from xiaoshoujilu where xshijian like '%" & dt.Value & "%' order by xNo"
    rs.open strsql, cn
    fuzhi Grid1, rs
    Grid1.Tag = strsql '为了导出按钮
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lblrecord.Caption = "0"
    lbllirun.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub
Private Sub cmdsou2_Click()
Dim s As Integer
Dim i As Integer
Dim sum As Double
    Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select " & sqlZiduan1 & " from xiaoshoujilu where xshijian between  #" & dtp.Value & "#  and  #" & dtp1.Value & "#  order by xshijian"
    rs.open sql, cn
    fuzhi Grid1, rs
    Grid1.Tag = sql '为了导出按钮
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lbllirun.Caption = "0"
    lblrecord.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub

Private Sub Form_Load()
Dim s As Integer
Dim i As Integer
Dim sum As Double
If ifmana = False Then
    cmddel.Enabled = False
End If
dt.Value = Format(Date, "yyyy-mm-dd") '将时间格式化
dtp.Value = Format(Date, "yyyy-mm-dd")
dtp1.Value = Format(Date, "yyyy-mm-dd")
Dim rs As New ADODB.Recordset
Dim strsql As String
    strsql = "select " & sqlZiduan1 & " from xiaoshoujilu order by XID"
    rs.open strsql, cn
    fuzhi Grid1, rs
    Grid1.Tag = strsql '为了导出按钮

lbllirun.Caption = s

If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lblrecord.Caption = "0"
    lbllirun.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub
Private Sub cmdQuan_Click() '全部查看按钮
Dim s As Integer
Dim i As Integer
Dim sum As Double
    Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select " & sqlZiduan1 & " from xiaoshoujilu order by xNo"
    rs.open sql, cn
    fuzhi Grid1, rs
    Grid1.Tag = sql '为了导出按钮
    If Grid1.TextMatrix(Grid1.Row, 0) = "" Then
    lbllirun.Caption = "0"
    lblrecord.Caption = "0"
    Exit Sub
End If
s = Grid1.rows
sum = 0

For i = 1 To s - 1
    sum = sum + CDbl(Grid1.TextMatrix(i, 9))
Next i
    lbllirun.Caption = CStr(sum)
lblrecord.Caption = Grid1.rows - 1
End Sub

Private Sub Grid1_Click()
    frmlookxs.Show 1
End Sub

⌨️ 快捷键说明

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