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

📄 frmleavel.frm

📁 一套比较完整的VB开发的员工请假管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               ImageKey        =   "help"
            EndProperty
         EndProperty
      End
      Begin VB.CheckBox chkDateOption 
         Caption         =   "请假时间从"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3840
         TabIndex        =   29
         Top             =   360
         Width           =   1455
      End
      Begin MSComCtl2.DTPicker dtpStart 
         Height          =   375
         Left            =   5280
         TabIndex        =   28
         Top             =   240
         Width           =   1815
         _ExtentX        =   3201
         _ExtentY        =   661
         _Version        =   393216
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CalendarTitleBackColor=   8388608
         CalendarTitleForeColor=   16777215
         Format          =   36044800
         CurrentDate     =   38205
      End
      Begin MSComctlLib.Toolbar tlbPrint 
         Height          =   540
         Left            =   1560
         TabIndex        =   27
         Top             =   120
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   953
         ButtonWidth     =   820
         ButtonHeight    =   953
         AllowCustomize  =   0   'False
         Style           =   1
         ImageList       =   "ilsTbl"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   4
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Style           =   3
            EndProperty
            BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "预览"
               Key             =   "Preview"
               ImageKey        =   "Preview"
            EndProperty
            BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "打印"
               Key             =   "printer"
               ImageKey        =   "printer"
            EndProperty
            BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Style           =   3
            EndProperty
         EndProperty
      End
      Begin MSComctlLib.Toolbar tblEmployees 
         Height          =   540
         Left            =   120
         TabIndex        =   1
         Top             =   120
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   953
         ButtonWidth     =   820
         ButtonHeight    =   953
         AllowCustomize  =   0   'False
         Style           =   1
         ImageList       =   "ilsTbl"
         _Version        =   393216
         BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
            NumButtons      =   3
            BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "增加"
               Key             =   "add"
               Object.ToolTipText     =   "新增"
               ImageIndex      =   1
            EndProperty
            BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "删除"
               Key             =   "delete"
               Object.ToolTipText     =   "删除"
               ImageKey        =   "delete"
            EndProperty
            BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
               Caption         =   "修改"
               Key             =   "modify"
               ImageKey        =   "edit"
            EndProperty
         EndProperty
      End
      Begin MSComCtl2.DTPicker dtpEnd 
         Height          =   375
         Left            =   7440
         TabIndex        =   31
         Top             =   240
         Width           =   1815
         _ExtentX        =   3201
         _ExtentY        =   661
         _Version        =   393216
         Enabled         =   0   'False
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CalendarTitleBackColor=   8388608
         CalendarTitleForeColor=   16777215
         Format          =   36044800
         CurrentDate     =   38205
      End
      Begin VB.Label lbldate 
         AutoSize        =   -1  'True
         Caption         =   "到"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   7200
         TabIndex        =   30
         Top             =   360
         Width           =   210
      End
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid flexLeavel 
      Height          =   2895
      Left            =   1920
      TabIndex        =   2
      Top             =   840
      Width           =   7455
      _ExtentX        =   13150
      _ExtentY        =   5106
      _Version        =   393216
      BackColorBkg    =   -2147483639
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
   End
   Begin MSComctlLib.ImageList ilsTbl 
      Left            =   2880
      Top             =   5760
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   7
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":09F6
            Key             =   "add"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":0F90
            Key             =   "delete"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":152A
            Key             =   "edit"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":1AC4
            Key             =   "exit"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":1DDE
            Key             =   "help"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":26B8
            Key             =   "Preview"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmLeavel.frx":2C52
            Key             =   "printer"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmLeavel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
'Download by http://www.codefans.net
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Public Sub IniGrid(ByVal flexGrid As MSHFlexGrid)
Dim i As Integer

flexGrid.Clear
With flexGrid
   .Cols = 8
   .Rows = 2
   .FixedCols = 0
   .FixedRows = 1
   .SelectionMode = flexSelectionByRow
   
   .TextMatrix(0, 1) = "工作证号"
   .TextMatrix(0, 2) = "姓名"
   .TextMatrix(0, 3) = "部门"
   .TextMatrix(0, 4) = "天数"
   .TextMatrix(0, 5) = "类型"
   .TextMatrix(0, 6) = "审批人"
   .TextMatrix(0, 7) = "状态"
   
   .ScrollBars = flexScrollBarBoth
    .FillStyle = flexFillSingle
    .ScrollTrack = True
    .AllowUserResizing = flexResizeColumns
    
        For i = 1 To .Cols - 1
            .ColAlignmentFixed(i) = 3       '设置表格标题的对齐方式
            
        Next i
    .ColWidth(0) = 1
    .ColWidth(1) = 1000
    .ColWidth(2) = 1200
    .ColWidth(3) = 800
    .ColWidth(4) = 800
    .ColWidth(5) = 1050
    .ColWidth(6) = 1200
    .ColWidth(7) = 1200
    
    .ColAlignment(1) = 1 '水平居左,垂直居中对齐
    .ColAlignment(2) = 1
    .ColAlignment(3) = 4
    .ColAlignment(4) = 4
    .ColAlignment(5) = 4
    .ColAlignment(6) = 1
    .ColAlignment(7) = 4
    
End With
    
End Sub

Public Sub showdata(ByVal Recordset As ADODB.Recordset, ByVal flexGrid As MSHFlexGrid)
    Dim i As Long
    Dim j As Integer
    Dim k As Integer
    Dim vtempdata As Variant

    If Recordset.RecordCount > 0 Then
        
        Recordset.MoveFirst
        
        With flexGrid
            .Redraw = False
            .Row = 1
            While Not Recordset.EOF
                .Rows = .Rows + 1
                
                j = 0
                For i = 0 To Recordset.Fields.Count - 1
                   
                    
                  
                   
                  
                   
                    If (.Row Mod 2) = 0 Then
                        .CellBackColor = &HF4D3A6
                    Else
                        .CellBackColor = vbWhite
                    End If
            
                   If (i <> 3) And (i <> 4) And (i <> 7) And (i <> 8) Then
                        j = j + 1
                        .Col = j
                   
                    If (.Row Mod 2) = 0 Then
                        .CellBackColor = &HF4D3A6
                    Else
                        .CellBackColor = vbWhite
                    End If
                    
                    vtempdata = Recordset.Fields(i)
                    
                    Select Case i
                        Case 2
                            If Trim(vtempdata) <> Empty Then
                             .Text = frmEmployees.RecordSetFindItem(rctDepartList, "Depart_ID", vtempdata, 1)
                            End If
                        Case 6
                            If Trim(vtempdata) <> Empty Then
                            .Text = frmEmployees.RecordSetFindItem(rctLeavelType, "Leavel_ID", vtempdata, 1)
                            End If

⌨️ 快捷键说明

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