If DrawGannt AndAlso e.Row.Index >= 0 AndAlso e.Row.Index < Tables("计划表窗口_Table4").Rows.count Then
Dim r As Row = Tables("计划表窗口_Table4").Rows(e.Row.Index)
Dim dt1 As Date = r("计划_开始日期")
Dim dt2 As Date = iif(r.Isnull("计划_完成日期"), Date.Today, r("计划_完成日期"))
Dim dt As Date = e.Col.Name.Replace("年","-").Replace("月_","-")
If dt>=dt1 AndAlso dt<=dt2 Then
e.StartDraw()
If dt < Date.Today Then
e.Graphics.FillRectangle(Brushes.Green,e.x ,e.y + 5, e.Width, e.Height - 10)
Else
e.Graphics.FillRectangle(Brushes.Red,e.x ,e.y + 3, e.Width, e.Height - 7)
End If
e.EndDraw()
End If
Dim dt3 As Date = r("进行_开始日期")
Dim dt4 As Date = iif(r.Isnull("进行_完成日期"), Date.Today, r("进行_完成日期"))
If dt>=dt3 AndAlso dt<=dt4 Then
e.Graphics.FillRectangle(Brushes.Black,e.x ,e.y + 8, e.Width, e.Height - 18)
End If
Dim fdr As DataRow = DataTables("事件记录").find("事件日期=#" & dt & "# and 项目名称='" & r("项目名称") & "' and 项目流程='" & r("项目流程") & "' and 处理情况='未处理'")
If fdr IsNot Nothing Then
e.Graphics.FillRectangle(Brushes.yellow,e.x ,e.y, e.Width, e.Height)
End If
End If
能帮忙把这段改改吗?就当事件记录表 同项目名称、项目流程相同 的事件日期 超过了 30天就在行号显示(Brushes.yellow,e.x ,e.y, e.Width, e.Height)图标。感谢 感谢