Foxtable(狐表)用户栏目专家坐堂 → 甘特图时段的问题


  共有2340人关注过本帖平板打印复制链接

主题:甘特图时段的问题

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/5/20 16:42:00 [只看该作者]

你到底想怎样显示?

 

If DrawGannt Then
    Dim r As Row  = Tables("计划表").Rows(e.Row.Index)
    Dim dt1 As Date = r("计划开始日期")
    Dim dt2 As Date = r("计划完成日期")
    Dim dt3 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 + 5, e.Width, e.Height - 10)
        End If
        e.EndDraw()
    End If
    If dt>=dt1 AndAlso dt<=dt3 Then
        e.StartDraw()
        If dt < Date.Today Then
            e.Graphics.FillRectangle(Brushes.Yellow,e.x ,e.y + 5, e.Width, e.Height - 10)
        Else
            e.Graphics.FillRectangle(Brushes.Blue,e.x ,e.y + 5, e.Width, e.Height - 10)
        End If
        e.EndDraw()
    End If
End If


 回到顶部