Foxtable(狐表)用户栏目专家坐堂 → 指定进度单元格之后的列均有颜色显示?


  共有1901人关注过本帖树形打印复制链接

主题:指定进度单元格之后的列均有颜色显示?

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


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/1/15 22:42:00 [显示全部帖子]

If e.Col.Name = "工序1_实际_数量"
    If e.Row.IsNull("工序1_实际_数量") = False Then
        e.StartDraw()
        Dim Width As Integer = (e.Width - 2 )* e.Row("工序1_实际_数量")
        If e.Row("工序1_实际_数量") = e.Row("投产数量")  Then
            e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
        Else
            e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
        End If
        e.EndDraw()
    End If
End If

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/1/15 22:57:00 [显示全部帖子]

If e.Col.Name = "工序1_实际_数量"
    If val(e.Row("投产数量")) > 0 Then
        e.StartDraw()
        Dim Width As Integer = (e.Width - 2 ) * (val(e.Row("工序1_实际_数量")) \ val(e.Row("投产数量")))
        If e.Row("工序1_实际_数量") = e.Row("投产数量")  Then
            e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
        Else
            e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
        End If
        e.EndDraw()
    End If
End If

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/1/16 8:42:00 [显示全部帖子]

If e.Col.Name = "工序1_实际_数量"
    If val(e.Row("投产数量")) > 0 Then
        e.StartDraw()
        Dim Width As Integer = (e.Width - 2 ) * val(e.Row("工序1_实际_数量")) \ val(e.Row("投产数量"))
        If e.Row("工序1_实际_数量") = e.Row("投产数量")  Then
            e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
        Else
            e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
        End If
        e.EndDraw()
    End If
End If

 回到顶部