If e.Col.name = "员工" Then '如果选择的主表是订单表
If e.Row.Isnull("日期") Then
e.Col.Combolist = DataTables("员工情况").GetComboListString("姓名")
Else
Dim str As String
Dim str2 As String
If e.Row("时段") = Nothing Then
str2 = e.Table.DataTable.GetComboListString("员工", "日期 = '" & e.Row("日期") & "' and _Identify <> " & e.Row("_Identify"))
str = DataTables("员工情况").GetComboListString("请假人", "请假日期 = '" & e.Row("日期") & "'")
Else
str2 = e.Table.DataTable.GetComboListString("员工", "日期 = '" & e.Row("日期") & "' and (时段 = '" & e.Row("时段") & "' or 时段 = '全天' or 时段 is null) And _Identify <> " & e.Row("_Identify"))
str = DataTables("员工情况").GetComboListString("请假人", "请假日期 = '" & e.Row("日期") & "' and (',' + 时段 + ',' like '%," & e.Row("时段") & ",%' or 时段 like '%全天%')")
End If
e.Col.Combolist = DataTables("员工情况").GetComboListString("姓名", "姓名 not in ('" & str.replace("|", "','") & "', '" & str2.replace(",", "','").replace("|", "','") & "') ")
End If
End If