If DrawGannt Then
Dim r As Row = Tables("表A").Rows(e.Row.Index)
Dim dt1 As Date = r("开始日期")
Dim dt2 As Date = 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
Dim fnt As New Font("宋体",8)
e.Graphics.DrawString(r("每天产能"),fnt,Brushes.White,e.x,e.y+5)
e.EndDraw()
End If
End If