If e.DataCol.Name = "鉴定等级" Then
If Forms("报名登记").Opened Then
Forms("报名登记").Controls("总人数").Text = e.DataTable.Compute("count(姓名)",Tables("报名登记表").filter)
Forms("报名登记").Controls("初级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '初级工' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("中级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '中级工' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("高级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '高级工' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("技师").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '技师' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("高级技师").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '高级技师' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("男").Text = e.DataTable.Compute("count(姓名)", "性别 = '男' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
Forms("报名登记").Controls("女").Text = e.DataTable.Compute("count(姓名)", "性别 = '女' And " & iif(Tables("报名登记表").filter>"",Tables("报名登记表").filter,"1=1"))
End If
End If
If e.DataRow("鉴定等级") = "技师" Then
If e.DataRow("原技术资格等级") = "助理工程师(电力类)" AndAlso Cdate(e.DataRow("原等级取得时间")).Year <= Date.Today.Year - 4 Then
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "工程师(电力类)"
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "助理工程师(工业工程)" AndAlso Cdate(e.DataRow("原等级取得时间")).Year <= Date.Today.Year - 4 Then
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "工程师(工业工程)"
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "高级工程师(电力类)"
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "高级工程师(工业工程)"
e.DataRow("是否合格") = True
Else If e.DataRow("原技术资格等级") = "技师"
Dim fdr As DataRow = DataTables("证书编号表").Find("身份证号码 = '" & e.DataRow("身份证号码") & "' And 证书编号 = '" & e.DataRow("原资格证书编号") & "'")
e.DataRow("是否合格") = fdr IsNot Nothing
Else If e.DataRow("原技术资格等级") = "高级工" AndAlso Cdate(e.DataRow("原等级取得时间")).Year <= Date.Today.Year - 3
Dim dr As DataRow
dr = DataTables("相近工种表").Find("工种 like '%" & e.DataRow("申报鉴定工种") & "%'")
If dr IsNot Nothing Then
Dim fdr As DataRow = DataTables("证书编号表").Find("身份证号码 = '" & e.DataRow("身份证号码") & "' And 申报鉴定工种 in ('" & dr("工种").Replace(",", "','") & "') And 证书编号 = '" & e.DataRow("原资格证书编号") & "'")
e.DataRow("是否合格") = fdr IsNot Nothing
Else
e.DataRow("是否合格") = False
End If
Else
e.DataRow("是否合格") = False
End If
End If