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

📄 frmshortman.frm

📁 主要是基本的办公用品管理操作界面, 包含基本信息管理、办公用品管理
💻 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"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmShortMan 
   Caption         =   "库存短缺统计"
   ClientHeight    =   5595
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8880
   LinkTopic       =   "Form1"
   ScaleHeight     =   5595
   ScaleWidth      =   8880
   StartUpPosition =   2  'CenterScreen
   Begin MSAdodcLib.Adodc Ado_Type 
      Height          =   375
      Left            =   6480
      Top             =   120
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _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         =   "Ado_Type"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo dco_Type 
      Height          =   315
      Left            =   3480
      TabIndex        =   4
      Top             =   120
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   556
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin VB.CheckBox Check1 
      Caption         =   "全部"
      Height          =   255
      Left            =   5160
      TabIndex        =   3
      Top             =   150
      Width           =   855
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   120
      Top             =   4680
      Visible         =   0   'False
      Width           =   1575
      _ExtentX        =   2778
      _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         =   "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.CommandButton Cmd_Back 
      Caption         =   "返 回"
      Height          =   495
      Left            =   3600
      TabIndex        =   2
      Top             =   4920
      Width           =   1335
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   4095
      Left            =   240
      TabIndex        =   1
      Top             =   600
      Width           =   8415
      _ExtentX        =   14843
      _ExtentY        =   7223
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         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       =   ""
         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 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSDataListLib.DataCombo dco_UType 
      Height          =   315
      Left            =   1560
      TabIndex        =   5
      Top             =   120
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   556
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin MSAdodcLib.Adodc Ado_UType 
      Height          =   375
      Left            =   0
      Top             =   5040
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _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         =   "Ado_UType"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "选择分类名称"
      Height          =   195
      Left            =   240
      TabIndex        =   0
      Top             =   180
      Width           =   1080
   End
End
Attribute VB_Name = "FrmShortMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Check1_Click()
  If Check1.Value = 1 Then
    dco_UType.Enabled = False
    dco_Type.Enabled = False
    dco_UType.Text = ""
    dco_Type.Text = ""
  Else
    dco_UType.Enabled = True
    dco_Type.Enabled = True
  End If
End Sub


Private Sub Cmd_Back_Click()
  Unload Me
End Sub

Private Sub DataRefresh()
  Dim StrSearch As String
  StrSearch = ""
  If Check1.Value <> 1 Then
    If Len(Trim(dco_UType.Text)) > 0 Then   '设置一级分类
      StrSearch = " And t.UpperId=" + Trim(dco_UType.BoundText)
    End If
    If Len(Trim(dco_Type.Text)) > 0 Then   '设置二级分类
      StrSearch = " And s.TypeId=" + Trim(dco_Type.BoundText)
    End If
  End If
  Adodc1.ConnectionString = Conn
  Adodc1.RecordSource = "Select s.OId,s.OName AS 办公用品名称,t1.TypeName AS 一级分类名称," _
    + "t.TypeName AS 二级分类名称,s.OStyle AS 型号,s.OAmount AS 库存数量,s.OMin AS 库存下限" _
    + " From Store s,Types t,Types t1 Where s.TypeId=t.TypeId " _
    + " And t.UpperId=t1.TypeId And s.OAmount<=s.OMin" + StrSearch + " Order By s.TypeId"
  Adodc1.Refresh
  
  Set DataGrid1.DataSource = Adodc1
  DataGrid1.Columns(0).Width = 0
  DataGrid1.Columns(1).Width = 1600
  DataGrid1.Columns(2).Width = 1200
  DataGrid1.Columns(3).Width = 1200
  DataGrid1.Columns(4).Width = 1200
  DataGrid1.Columns(5).Width = 1200
  DataGrid1.Columns(6).Width = 1200
End Sub

Private Sub Cmd_Search_Click()
  DataRefresh
End Sub

Private Sub dco_Type_Click(Area As Integer)
  DataRefresh
End Sub

Private Sub dco_UType_Click(Area As Integer)
  If Len(Trim(dco_UType.Text)) > 0 Then
    Ado_Type.ConnectionString = Conn
    Ado_Type.RecordSource = "Select * From Types Where UpperId=" + Trim(dco_UType.BoundText()) + " Order By TypeId"
    Ado_Type.Refresh
    Set dco_Type.RowSource = Ado_Type
    dco_Type.ListField = "TypeName"
    dco_Type.BoundColumn = "TypeId"
    dco_Type.Text = ""
    DataRefresh
  End If
End Sub

Private Sub Form_Load()
  '装入分类信息
  Ado_UType.ConnectionString = Conn
  Ado_UType.RecordSource = "Select * From Types Where UpperId=0 Order By TypeId"
  Ado_UType.Refresh
  Set dco_UType.RowSource = Ado_UType
  dco_UType.ListField = "TypeName"
  dco_UType.BoundColumn = "TypeId"
  dco_UType.Enabled = False
  dco_Type.Enabled = False
  Check1.Value = 1
  DataRefresh
End Sub

⌨️ 快捷键说明

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