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

📄 frmplan.frm

📁 指纹考勤管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmPlan 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "日常排班"
   ClientHeight    =   8475
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   11910
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmPlan.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8475
   ScaleWidth      =   11910
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   6375
      Left            =   1920
      TabIndex        =   6
      Top             =   480
      Width           =   9735
      _ExtentX        =   17171
      _ExtentY        =   11245
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      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
      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 ComctlLib.TreeView tvwPlan 
      Height          =   6360
      Left            =   135
      TabIndex        =   0
      Top             =   450
      Width           =   1665
      _ExtentX        =   2937
      _ExtentY        =   11218
      _Version        =   327682
      LabelEdit       =   1
      Style           =   6
      Appearance      =   1
   End
   Begin VB.Frame Frame1 
      Height          =   1140
      Left            =   195
      TabIndex        =   1
      Top             =   6960
      Width           =   11460
      Begin VB.CommandButton cmdPlan 
         Caption         =   "返回(&R)"
         Height          =   555
         Index           =   5
         Left            =   7560
         TabIndex        =   4
         Top             =   375
         Width           =   1530
      End
      Begin VB.CommandButton cmdPlan 
         Caption         =   "集体排班(&G)"
         Height          =   555
         Index           =   1
         Left            =   1680
         TabIndex        =   3
         Top             =   360
         Width           =   1530
      End
      Begin VB.CommandButton cmdPlan 
         Caption         =   "单个排班(&S)"
         Height          =   555
         Index           =   2
         Left            =   4680
         TabIndex        =   2
         Top             =   360
         Width           =   1530
      End
   End
   Begin VB.Label lblPlan 
      AutoSize        =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   240
      Left            =   4950
      TabIndex        =   5
      Top             =   105
      Width           =   120
   End
End
Attribute VB_Name = "frmPlan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rsplan As New ADODB.Recordset

Dim mNode As Node
Dim mFormatString As String
Dim mAllowGroup As Boolean
Dim mDeptID As Integer
Dim mDeptName As String


Private Sub cmdPlan_Click(Index As Integer)
    Select Case Index
        Case 1

            StrName = "集体"
            frmDetail.Show 1
            If rsplan.State Then
            rsplan.Close
            End If
            Sql = "select *  from 排班"
            rsplan.Open Sql, conn
            Set DataGrid1.DataSource = rsplan
            DataGrid1.Refresh
        Case 2
            intGH = rsplan.Fields("工号")
            StrName = rsplan.Fields("姓名")
            frmDetail.Show 1
             If rsplan.State Then
            rsplan.Close
            End If
            Sql = "select *  from 排班"
            rsplan.Open Sql, conn
            Set DataGrid1.DataSource = rsplan
            DataGrid1.Refresh
        Case 5
            Unload Me
    End Select
    For i = 0 To DataGrid1.Columns.Count - 1
      DataGrid1.Columns(i).Locked = True
    Next i

End Sub



Private Sub Form_Load()
If rsplan.State Then
rsplan.Close
End If
Sql = "select Name  from 部门"
rsplan.Open Sql, conn, adOpenKeyset, adLockPessimistic
If rsplan.RecordCount <> 0 Then
    rsplan.MoveFirst
    Dim j As Integer
    j = 1
    For i = 0 To rsplan.RecordCount - 1
        tvwPlan.Nodes.Add , , "R" & j, rsplan.Fields("Name")
        j = j + 1
        rsplan.MoveNext
    Next
End If
rsplan.Close

Sql = "select *  from 排班"
rsplan.Open Sql, conn, adOpenKeyset, adLockPessimistic
Set DataGrid1.DataSource = rsplan
DataGrid1.Refresh
For i = 0 To DataGrid1.Columns.Count - 1
      DataGrid1.Columns(i).Locked = True
    Next i


End Sub


Private Sub tvwPlan_NodeClick(ByVal Node As ComctlLib.Node)

StrBumen = Node.Text
rsplan.Close
Sql = "select *  from 排班 where 部门='" & Node.Text & "'"
rsplan.Open Sql, conn
Set DataGrid1.DataSource = rsplan
DataGrid1.Refresh
For i = 0 To DataGrid1.Columns.Count - 1
      DataGrid1.Columns(i).Locked = True
    Next i

End Sub

⌨️ 快捷键说明

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