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

📄 frm_queemp.frm

📁 轿车管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frm_queEmp 
   BackColor       =   &H0080FF80&
   Caption         =   "查询员工"
   ClientHeight    =   5040
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5625
   LinkTopic       =   "Form1"
   ScaleHeight     =   5040
   ScaleWidth      =   5625
   StartUpPosition =   3  '窗口缺省
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Frm_queEmp.frx":0000
      Height          =   2295
      Left            =   120
      TabIndex        =   11
      Top             =   120
      Width           =   5295
      _ExtentX        =   9340
      _ExtentY        =   4048
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {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
      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
      ColumnCount     =   8
      BeginProperty Column00 
         DataField       =   "Staff_Name"
         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       =   "Staff_sex"
         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       =   "Staff_birth"
         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       =   "Staff_intime"
         Caption         =   "进入公司时间"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "Staff_depart"
         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       =   "Staff_title"
         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       =   "Staff_tel"
         Caption         =   "电话"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "Staff_addr"
         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 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   510.236
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1244.976
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   1035.213
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1665.071
         EndProperty
         BeginProperty Column06 
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1785.26
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   4200
      TabIndex        =   5
      Top             =   4080
      Width           =   1095
   End
   Begin VB.TextBox txttitle 
      Appearance      =   0  'Flat
      Height          =   375
      Left            =   1680
      TabIndex        =   3
      Top             =   4320
      Width           =   2175
   End
   Begin VB.OptionButton Option4 
      BackColor       =   &H00C0FFC0&
      Caption         =   "按职务查询"
      Height          =   375
      Left            =   360
      TabIndex        =   10
      Top             =   4320
      Width           =   1335
   End
   Begin VB.TextBox txtdepart 
      Appearance      =   0  'Flat
      Height          =   375
      Left            =   1680
      TabIndex        =   2
      Top             =   3840
      Width           =   2175
   End
   Begin VB.OptionButton Option3 
      BackColor       =   &H00C0FFC0&
      Caption         =   "按部门查询"
      Height          =   375
      Left            =   360
      TabIndex        =   9
      Top             =   3840
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFC0&
      Caption         =   "查询方式"
      Height          =   2415
      Left            =   120
      TabIndex        =   6
      Top             =   2520
      Width           =   5415
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   3720
         Top             =   120
         Visible         =   0   'False
         Width           =   1695
         _ExtentX        =   2990
         _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=   3
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "DSN=CarSaleSys"
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   "CarSaleSys"
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   "sa"
         RecordSource    =   "select * from Staff"
         Caption         =   "Adodc1"
         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.CommandButton Cmd_que 
         Caption         =   "查询"
         Height          =   375
         Left            =   4080
         TabIndex        =   4
         Top             =   1080
         Width           =   1095
      End
      Begin VB.TextBox txtdate 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1560
         TabIndex        =   1
         Top             =   840
         Width           =   2175
      End
      Begin VB.OptionButton Option2 
         BackColor       =   &H00C0FFC0&
         Caption         =   "按时间查询"
         Height          =   375
         Left            =   240
         TabIndex        =   8
         Top             =   840
         Width           =   1335
      End
      Begin VB.TextBox txtEmpname 
         Appearance      =   0  'Flat
         Height          =   375
         Left            =   1560
         TabIndex        =   0
         Top             =   360
         Width           =   2175
      End
      Begin VB.OptionButton Option1 
         BackColor       =   &H00C0FFC0&
         Caption         =   "按姓名查询"
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   360
         Width           =   1335
      End
   End
End
Attribute VB_Name = "Frm_queEmp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Cancel_Click()
    Unload Me
End Sub

Private Sub Cmd_que_Click()
    If Option1 = True Then
        If txtEmpname.Text <> "" Then
            Adodc1.RecordSource = "select * from Staff where Staff_name = '" + Trim(txtEmpname.Text) + "'"
            Adodc1.Refresh
        End If
    End If
    
    If Option2 = True Then
        If txtdate.Text <> "" Then
            Adodc1.RecordSource = "select * from Staff where Staff_birth = '" + Trim(txtdate.Text) + "'"
            Adodc1.Refresh
        End If
    End If
    
    If Option3 = True Then
        If txtdepart.Text <> "" Then
            Adodc1.RecordSource = "select * from Staff where Staff_depart = " + Trim(txtdepart.Text)
            Adodc1.Refresh
        End If
    End If
    
    If Option4 = True Then
        If txttitle.Text <> "" Then
            Adodc1.RecordSource = "select * from Staff where Staff_title = '" + Trim(txttitle.Text) + "'"
            Adodc1.Refresh
        End If
    End If
End Sub

Private Sub Option1_Click()

    txtdate.Text = ""
    txtdate.Enabled = False
    txtdepart.Text = ""
    txtdepart.Enabled = False
    txttitle.Text = ""
    txttitle.Enabled = False
    
    txtEmpname.Enabled = True
End Sub


Private Sub Option2_Click()
    txtEmpname.Text = ""
    txtEmpname.Enabled = False
    txtdepart.Text = ""
    txtdepart.Enabled = False
    txttitle.Text = ""
    txttitle.Enabled = False
    
    txtdate.Enabled = True
End Sub

Private Sub Option3_Click()
    txtEmpname.Text = ""
    txtEmpname.Enabled = False
    txtdate.Text = ""
    txtdate.Enabled = False
    txttitle.Text = ""
    txttitle.Enabled = False
    
    txtdepart.Enabled = True
End Sub

Private Sub Option4_Click()

    txtEmpname.Text = ""
    txtEmpname.Enabled = False
    txtdate.Text = ""
    txtdate.Enabled = False
    txtdepart.Text = ""
    txtdepart.Enabled = False
    
    txttitle.Enabled = True
End Sub

⌨️ 快捷键说明

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