If e.DataCol.Name = "日期" Then
If e.DataRow.IsNull("日期") Then
e.DataRow("所属周期") = Nothing
Else
Dim dr As DataRow
Dim fl As String
fl ="起炉时间 <= # " & e.DataRow("日期") & "# And 停炉时间 >= #"
fl+= e.DataRow("日期") & "# and 部门 = '" & e.DataRow("部门") & "'"
dr =DataTables("周期表").Find(fl)
If dr IsNot Nothing Then
e.DataRow("所属周期") = dr("周期")
End If
End If
End If