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


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

主题:甘特图多时间段问题

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


加好友 发短信
等级:二尾狐 帖子:502 积分:3620 威望:0 精华:0 注册:2015/4/21 22:45:00
甘特图多时间段问题  发帖心情 Post By:2015/11/27 13:36: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 dt4 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
        e.EndDraw()
    End If
    If dt>=dt2 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.Red,e.x ,e.y + 3, e.Width, e.Height - 7)
        End If
        e.EndDraw()
    End If
    If dt>=dt3 AndAlso dt<=dt4 Then
        e.StartDraw()
        If dt < Date.Today Then
            e.Graphics.FillRectangle(Brushes.Blue,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
End If

 回到顶部