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

📄 frm_hzprkcx.frm

📁 美容院管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm_hzprkcx 
   BackColor       =   &H0080C0FF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "化妆品入库查询"
   ClientHeight    =   6240
   ClientLeft      =   2760
   ClientTop       =   3756
   ClientWidth     =   7320
   Icon            =   "frm_hzprkcx.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6240
   ScaleWidth      =   7320
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Height          =   450
      Index           =   2
      Left            =   5940
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprkcx.frx":000C
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   1020
      UseMaskColor    =   -1  'True
      Width           =   1230
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Default         =   -1  'True
      Height          =   450
      Index           =   0
      Left            =   5940
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprkcx.frx":2916
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   108
      UseMaskColor    =   -1  'True
      Width           =   1230
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Enabled         =   0   'False
      Height          =   450
      Index           =   1
      Left            =   5940
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprkcx.frx":3E04
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   564
      UseMaskColor    =   -1  'True
      Width           =   1230
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Cancel          =   -1  'True
      Height          =   450
      Index           =   3
      Left            =   5940
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprkcx.frx":6A3A
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   1476
      UseMaskColor    =   -1  'True
      Width           =   1230
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H0080C0FF&
      Caption         =   "查询条件:"
      Height          =   2772
      Left            =   132
      TabIndex        =   0
      Top             =   36
      Width           =   5676
      Begin VB.Frame Frame2 
         BackColor       =   &H0080C0FF&
         Caption         =   "时间范围:"
         Height          =   804
         Left            =   156
         TabIndex        =   16
         Top             =   1812
         Width           =   5352
         Begin MSComCtl2.DTPicker DTPicker1 
            Height          =   264
            Index           =   0
            Left            =   576
            TabIndex        =   17
            Top             =   312
            Width           =   1920
            _ExtentX        =   3387
            _ExtentY        =   466
            _Version        =   393216
            Format          =   24707072
            CurrentDate     =   36886
         End
         Begin MSComCtl2.DTPicker DTPicker1 
            Height          =   264
            Index           =   1
            Left            =   3264
            TabIndex        =   18
            Top             =   312
            Width           =   1920
            _ExtentX        =   3387
            _ExtentY        =   466
            _Version        =   393216
            Format          =   24707072
            CurrentDate     =   36886
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "到"
            Height          =   180
            Index           =   6
            Left            =   2760
            TabIndex        =   20
            Top             =   348
            Width           =   180
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "从"
            Height          =   180
            Index           =   5
            Left            =   300
            TabIndex        =   19
            Top             =   336
            Width           =   180
         End
      End
      Begin VB.TextBox Text1 
         Height          =   264
         Index           =   4
         Left            =   684
         TabIndex        =   13
         Top             =   1512
         Width           =   4812
      End
      Begin VB.TextBox Text1 
         Height          =   264
         Index           =   3
         Left            =   684
         TabIndex        =   11
         Top             =   1212
         Width           =   4812
      End
      Begin VB.TextBox Text1 
         Height          =   264
         Index           =   0
         Left            =   684
         TabIndex        =   3
         Top             =   252
         Width           =   4812
      End
      Begin VB.TextBox Text1 
         Height          =   264
         Index           =   1
         Left            =   684
         TabIndex        =   2
         Top             =   564
         Width           =   4812
      End
      Begin VB.TextBox Text1 
         Height          =   264
         Index           =   2
         Left            =   684
         TabIndex        =   1
         Top             =   876
         Width           =   4812
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "收货人:"
         Height          =   180
         Index           =   4
         Left            =   0
         TabIndex        =   14
         Top             =   1512
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "送货人:"
         Height          =   180
         Index           =   3
         Left            =   0
         TabIndex        =   12
         Top             =   1212
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "名称:"
         Height          =   180
         Index           =   0
         Left            =   180
         TabIndex        =   6
         Top             =   288
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "类型:"
         Height          =   180
         Index           =   1
         Left            =   180
         TabIndex        =   5
         Top             =   876
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "型号:"
         Height          =   180
         Index           =   2
         Left            =   180
         TabIndex        =   4
         Top             =   582
         Width           =   540
      End
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   3180
      Left            =   132
      TabIndex        =   10
      Top             =   2928
      Width           =   7044
      _ExtentX        =   12425
      _ExtentY        =   5609
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      HotTracking     =   -1  'True
      HoverSelection  =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   16777215
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   7
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "名称"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "型号"
         Object.Width           =   1764
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "类型"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   3
         Text            =   "数量"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   4
         Text            =   "送货人"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   5
         Text            =   "收货人"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(7) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   6
         Text            =   "日期"
         Object.Width           =   2540
      EndProperty
   End
End
Attribute VB_Name = "frm_hzprkcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim rec As Recordset
Dim itmx As ListItem
Dim sqlstr As String

Private Sub OKButton_Click()

End Sub

Private Sub Command1_Click(Index As Integer)
'On Error GoTo jgqerr
Select Case Index
Case 0 '查询
        sqlstr = "select * from 化妆品入库表 where 名称 like '*" + Text1(0) + "*' and 型号 like '*" + Text1(1) + "*' and 类型 like '*" + Text1(2) + "*' and 送货人 like '*" + Text1(3) + "*' and 收货人 like '*" + Text1(4) + "*' and 日期>=#" + Format(DTPicker1(0).Value, "yyyy-mm-dd") + "# and 日期<=#" + Format(DTPicker1(1).Value, "yyyy-mm-dd") + "#"
        
        Set rec = db.OpenRecordset(sqlstr)
        ListView1.ListItems.Clear
        Do While Not rec.EOF
            Set itmx = ListView1.ListItems.Add(, , "" & rec.Fields(0))
            For i = 1 To rec.Fields.Count - 1
                itmx.SubItems(i) = "" & rec.Fields(i)
            Next i
            rec.MoveNext
        Loop
        If ListView1.ListItems.Count = 0 Then
            Command1(1).Enabled = False
        Else
            Command1(1).Enabled = True
        End If
Case 1 '打印
            
            dytr_main Me, 1, Me.Caption, "化妆品入库表"
Case 2 '删除
    
    yn = MsgBox("真的想删除下列的入库记录吗?", vbYesNo + vbQuestion, "提示")
    If yn = vbNo Then Exit Sub
    If sqlstr = "" Then Exit Sub
    If ListView1.ListItems.Count = 0 Then Exit Sub
    sqlstr = "delete " + Mid(sqlstr, 7)
    db.Execute sqlstr
    ListView1.ListItems.Clear
    MsgBox "删除成功!", vbOKOnly + vbInformation, "提示"
Case 3 '退出
    Unload Me
End Select
Exit Sub
jgqerr:
    MsgBox Err.Description, vbOKOnly + vbCritical, "错误"

End Sub

Private Sub Form_Load()
sqlstr = ""
DTPicker1(0).Value = Date - 30
DTPicker1(1).Value = Date
End Sub

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
ListView1.SortKey = ColumnHeader.Index - 1
yn = MsgBox("将按照『" + ColumnHeader.Text + "』排序" + Chr(13) + "是否按升序排列,按[否]将按降序排列", vbYesNo + vbQuestion, "提示")
If yn = vbNo Then
    ListView1.SortOrder = lvwDescending
Else
    ListView1.SortOrder = lvwAscending
End If
ListView1.Sorted = True
End Sub

⌨️ 快捷键说明

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