F_PeiXunJiHuaCX.frm
资源名称:dbbase.rar [点击查看]
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:17k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
- Begin VB.Form F_PeiXunJiHuaCX
- BorderStyle = 3 'Fixed Dialog
- Caption = "培训计划查询"
- ClientHeight = 8205
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 11715
- ControlBox = 0 'False
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- Moveable = 0 'False
- ScaleHeight = 8205
- ScaleWidth = 11715
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame Frame1
- Height = 3255
- Left = 120
- TabIndex = 2
- Top = 120
- Width = 11415
- Begin Threed.SSCommand cmd_ChaXun
- Height = 375
- Left = 8400
- TabIndex = 21
- Top = 2760
- Width = 1215
- _Version = 65536
- _ExtentX = 2143
- _ExtentY = 661
- _StockProps = 78
- Caption = "&S.查 询"
- End
- Begin VB.ComboBox Combo2
- Height = 315
- Left = 1560
- TabIndex = 12
- Top = 840
- Visible = 0 'False
- Width = 1695
- End
- Begin VB.ComboBox Combo1
- Height = 315
- Left = 1560
- TabIndex = 11
- Top = 360
- Visible = 0 'False
- Width = 1695
- End
- Begin VB.ComboBox Combo3
- Height = 315
- Left = 1560
- TabIndex = 10
- Top = 1320
- Visible = 0 'False
- Width = 1695
- End
- Begin VB.ComboBox Combo4
- Height = 315
- Left = 1560
- TabIndex = 9
- Top = 1800
- Visible = 0 'False
- Width = 1695
- End
- Begin VB.CheckBox Check1
- Caption = "Check1"
- Height = 255
- Left = 240
- TabIndex = 7
- Top = 360
- Width = 255
- End
- Begin VB.CheckBox Check2
- Caption = "Check2"
- Height = 255
- Left = 240
- TabIndex = 6
- Top = 840
- Width = 255
- End
- Begin VB.CheckBox Check3
- Caption = "Check3"
- Height = 255
- Left = 240
- TabIndex = 5
- Top = 1320
- Width = 255
- End
- Begin VB.CheckBox Check4
- Caption = "Check4"
- Height = 255
- Left = 240
- TabIndex = 4
- Top = 1800
- Width = 255
- End
- Begin VB.CheckBox Check5
- Caption = "Check5"
- Height = 255
- Left = 240
- TabIndex = 3
- Top = 2280
- Width = 255
- End
- Begin MSComCtl2.DTPicker DTPicker1
- Height = 315
- Left = 3840
- TabIndex = 8
- Top = 2280
- Visible = 0 'False
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 556
- _Version = 393216
- Format = 26935297
- CurrentDate = 36255
- End
- Begin MSComCtl2.DTPicker DTPicker2
- Height = 315
- Left = 6960
- TabIndex = 13
- Top = 2280
- Visible = 0 'False
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 556
- _Version = 393216
- Format = 26935297
- CurrentDate = 36255
- End
- Begin Threed.SSCommand CmdClose
- Height = 375
- Left = 9960
- TabIndex = 22
- Top = 2760
- Width = 1215
- _Version = 65536
- _ExtentX = 2143
- _ExtentY = 661
- _StockProps = 78
- Caption = "&Q.关 闭"
- End
- Begin VB.Label Label1
- Caption = "对象"
- Height = 255
- Left = 720
- TabIndex = 20
- Top = 880
- Width = 615
- End
- Begin VB.Label Label2
- Caption = "种类"
- Height = 255
- Left = 720
- TabIndex = 19
- Top = 400
- Width = 495
- End
- Begin VB.Label Label3
- Caption = "主办单位"
- Height = 255
- Left = 720
- TabIndex = 18
- Top = 1320
- Width = 1095
- End
- Begin VB.Label Label4
- Caption = "师资"
- Height = 255
- Left = 720
- TabIndex = 17
- Top = 1840
- Width = 615
- End
- Begin VB.Label Label5
- Caption = "举办时间"
- Height = 255
- Left = 720
- TabIndex = 16
- Top = 2320
- Width = 1095
- End
- Begin VB.Label Label6
- Caption = "开始时间"
- Height = 255
- Left = 2760
- TabIndex = 15
- Top = 2310
- Visible = 0 'False
- Width = 975
- End
- Begin VB.Label Label7
- Caption = "结束时间"
- Height = 255
- Left = 5880
- TabIndex = 14
- Top = 2310
- Visible = 0 'False
- Width = 975
- End
- End
- Begin VB.Frame Frame2
- Height = 4695
- Left = 120
- TabIndex = 0
- Top = 3480
- Width = 11415
- Begin MSDataGridLib.DataGrid DataGrid1
- Height = 4215
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 11055
- _ExtentX = 19500
- _ExtentY = 7435
- _Version = 393216
- HeadLines = 1
- RowHeight = 14
- 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 = "宋体"
- 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
- End
- End
- Attribute VB_Name = "F_PeiXunJiHuaCX"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim WithEvents RS As Recordset
- Attribute RS.VB_VarHelpID = -1
- Dim WithEvents adoPrimaryRS As Recordset
- Attribute adoPrimaryRS.VB_VarHelpID = -1
- Dim WithEvents adoXianshiBiaoShiRS As Recordset
- Attribute adoXianshiBiaoShiRS.VB_VarHelpID = -1
- Dim WithEvents adoXianshiXiMuRS As Recordset
- Attribute adoXianshiXiMuRS.VB_VarHelpID = -1
- Dim Row_ID As String '为找到ID 的查询SQL 语句
- Private Sub Check1_Click()
- If Check1.Value = 1 Then
- Check2.Value = 0
- Check3.Value = 0
- Check4.Value = 0
- Check5.Value = 0
- Combo1.Clear
- Sql = "select distinct 培训种类 from 部门培训计划登记"
- Set RS = db.Execute(Sql)
- Do While Not RS.EOF
- If IsNull(RS("培训种类")) = False Then
- Combo1.AddItem RS("培训种类")
- End If
- RS.MoveNext
- Loop
- Combo1.Visible = True
- Combo2.Visible = False
- Combo3.Visible = False
- Combo4.Visible = False
- Label6.Visible = False
- Label7.Visible = False
- DTPicker1.Visible = False
- DTPicker2.Visible = False
- Frame2.Visible = False
- ' Frame3.Visible = False
- End If
- End Sub
- Private Sub Check2_Click()
- If Check2.Value = 1 Then
- Check1.Value = 0
- Check3.Value = 0
- Check4.Value = 0
- Check5.Value = 0
- Combo2.Clear
- Sql = "select distinct 培训对象 from 部门培训计划登记"
- Set RS = db.Execute(Sql)
- Do While Not RS.EOF
- If IsNull(RS("培训对象")) = False Then
- Combo2.AddItem RS("培训对象")
- End If
- RS.MoveNext
- Loop
- Combo1.Visible = False
- Combo2.Visible = True
- Combo3.Visible = False
- Combo4.Visible = False
- Label6.Visible = False
- Label7.Visible = False
- DTPicker1.Visible = False
- DTPicker2.Visible = False
- Frame2.Visible = False
- ' Frame3.Visible = False
- End If
- End Sub
- Private Sub Check3_Click()
- If Check3.Value = 1 Then
- Check1.Value = 0
- Check2.Value = 0
- Check4.Value = 0
- Check5.Value = 0
- Combo3.Clear
- Sql = "select distinct 部门 from 部门培训计划登记"
- Set RS = db.Execute(Sql)
- Do While Not RS.EOF
- If IsNull(RS("部门")) = False Then
- Combo3.AddItem RS("部门")
- End If
- RS.MoveNext
- Loop
- Combo3.Visible = True
- Combo1.Visible = False
- Combo2.Visible = False
- Combo4.Visible = False
- Label6.Visible = False
- Label7.Visible = False
- DTPicker1.Visible = False
- DTPicker2.Visible = False
- Frame2.Visible = False
- ' Frame3.Visible = False
- End If
- End Sub
- Private Sub CmdXianShi_Exit_Click()
- Frame2.Visible = True
- 'Frame3.Visible = False
- End Sub
- Private Sub Cmd_XianShiExit_Click()
- End Sub
- Private Sub Command1_Click()
- End Sub
- Private Sub Command2_Click()
- End Sub
- Private Sub Cmd_ChaXun_Click()
- Dim DataGrid_sql As String '数据表格中的数据源
- Dim oText As TextBox
- If Check1.Value = 1 Then
- DataGrid_sql = "select * from 部门培训计划登记 where 部门培训计划登记.培训种类 = '" & Combo1.Text & "'"
- End If
- If Check2.Value = 1 Then
- DataGrid_sql = "select * from 部门培训计划登记 where 部门培训计划登记.培训对象 = '" & Combo2.Text & "'"
- End If
- If Check3.Value = 1 Then
- DataGrid_sql = "select * from 部门培训计划登记 where 部门培训计划登记.部门 = '" & Combo3.Text & "'"
- End If
- If Check4.Value = 1 Then
- DataGrid_sql = "select * from 部门培训计划登记 where 部门培训计划登记.师资来源 = '" & Combo4.Text & "'"
- End If
- If Check5.Value = 1 Then
- DataGrid_sql = "select * from 部门培训计划登记 where 部门培训计划登记.举办日期 between ' " & DTPicker1 & " ' and ' " & DTPicker2 & " '"
- End If
- Set adoPrimaryRS = New Recordset
- adoPrimaryRS.Open DataGrid_sql, db1, adOpenStatic, adLockOptimistic
- Set DataGrid1.DataSource = adoPrimaryRS
- ' Frame3.Visible = False
- Frame2.Visible = True
- End Sub
- Private Sub Cmd_close_Click()
- XingZhengGL.Enabled = True
- Unload Me
- End Sub
- Private Sub Cmd_XianShi_Click()
- Dim XianShi_sql As String '单条数据显示的数据源
- If Row_ID = "" Then
- MsgBox "请您选择其中一条信息!"
- Exit Sub
- Else
- XianShi_sql = "select * from 部门培训计划登记 where ID = " & Row_ID
- Set adoXianshiBiaoShiRS = New Recordset
- adoXianshiBiaoShiRS.Open "SHAPE {select 培训计划编号,时间,部门,项目名称,培训种类,培训对象,参加人数,举办日期,地点,培训时数,师资来源,培训目的,课时费,租用费,招待费,交通费,教材费,工时占用费,其他费用,预算费用合计,培训内容,口试,笔试,实际操作,人力资源部经理签字,人力资源部签字时间,财务部经理签字,财务部经理签字时间,总经理签字,总经理签字时间,部门申请人签字,部门申请人签字时间 from 部门培训计划登记} AS ParentCMD APPEND ({select 部门培训计划编号,员工号,姓名,岗位编号 from 部门培训计划人员 } AS ChildCMD RELATE 培训计划编号 TO 部门培训计划编号) AS ChildCMD", db1, adOpenStatic, adLockBatchOptimistic
- Dim BS_MX_LX As String '标识与明细的联系
- If Not adoXianshiBiaoShiRS.EOF Then
- If Not IsNull(adoXianshiBiaoShiRS("培训计划编号")) Then
- BS_MX_LX = adoXianshiBiaoShiRS("培训计划编号")
- End If
- End If
- Set adoXianshiXiMuRS = New Recordset
- adoXianshiXiMuRS.Open "select 部门培训计划编号,员工号,姓名,岗位编号 from 部门培训计划人员 where 培训计划编号 = '" & BS_MX_LX & "'", db1, adOpenStatic, adLockBatchOptimistic
- End If
- Frame2.Visible = False
- ' Frame3.Visible = True
- End Sub
- Private Sub cms_XianShi_close_Click()
- Frame2.Visible = True
- Frame3.Visible = False
- End Sub
- Private Sub DataGrid1_Click()
- If Not adoPrimaryRS.BOF And Not adoPrimaryRS.EOF Then
- If Not IsNull(adoPrimaryRS.Fields("ID")) Then
- Row_ID = adoPrimaryRS.Fields("ID")
- Else
- MsgBox "请您选择其中一条信息!"
- End If
- Else
- Exit Sub
- End If
- End Sub
- Private Sub Check4_Click()
- If Check4.Value = 1 Then
- Check1.Value = 0
- Check2.Value = 0
- Check3.Value = 0
- Check5.Value = 0
- Combo4.Clear
- Sql = "select distinct 师资来源 from 部门培训计划登记"
- Set RS = db.Execute(Sql)
- Do While Not RS.EOF
- If IsNull(RS("师资来源")) = False Then
- Combo3.AddItem RS("师资来源")
- End If
- RS.MoveNext
- Loop
- Combo4.Visible = True
- Combo1.Visible = False
- Combo2.Visible = False
- Combo3.Visible = False
- Label6.Visible = False
- Label7.Visible = False
- DTPicker1.Visible = False
- DTPicker2.Visible = False
- Frame2.Visible = False
- 'Frame3.Visible = False
- End If
- End Sub
- Private Sub Check5_Click()
- If Check5.Value = 1 Then
- Check1.Value = 0
- Check2.Value = 0
- Check3.Value = 0
- Check4.Value = 0
- Combo4.Visible = False
- Combo1.Visible = False
- Combo2.Visible = False
- Combo3.Visible = False
- Combo4.Visible = False
- Label6.Visible = True
- Label7.Visible = True
- DTPicker1.Visible = True
- DTPicker2.Visible = True
- Frame2.Visible = False
- ' Frame3.Visible = False
- End If
- End Sub
- Private Sub cmdChaXun_Click()
- End Sub
- Private Sub cmdClose_Click()
- RSGL.Enabled = True
- Unload Me
- End Sub
- Private Sub Form_Load()
- On Error Resume Next
- For Each TextBox In Me.Controls
- TextBox.Font.Name = "宋体"
- TextBox.Font.Size = 9
- Next
- Frame2.Visible = False
- 'Frame3.Visible = False
- Me.DTPicker1.Value = Format(Now, "yyyy年mm月dd日")
- Me.DTPicker2.Value = Format(Now, "yyyy年mm月dd日")
- End Sub