以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]计划管理  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=57462)

--  作者:liujywwy
--  发布时间:2014/9/25 10:52:00
--  [求助]计划管理

计划管理代码,当逾期的时候,1分钟红白闪烁。

我想在临时版本跟踪表,当状态为Confirming时就不要闪了

With DataTables("临时版本跟踪表").Styles("逾期")
    If .BackColor = Color.Red Then
        .BackColor = Color.White
    Else
        .BackColor = Color.Red
    End If
End With


--  作者:Bin
--  发布时间:2014/9/25 10:54:00
--  
if  状态<>"Confirming" then
With DataTables("临时版本跟踪表").Styles("逾期")
    If .BackColor = Color.Red Then
        .BackColor = Color.White
    Else
        .BackColor = Color.Red
    End If
End With
end if

--  作者:有点甜
--  发布时间:2014/9/25 10:54:00
--  
 思路有问题,你应该在drawcell事件写入判断 e.Row("状态") 的判断
--  作者:liujywwy
--  发布时间:2014/9/25 10:58:00
--  

对,我弄错了。应该是这样。darwcell

If e.Col.Name="预计提供时间" Then
    If e.Row.IsNull("预计提供时间")=False Then
        If e.Row("预计提供时间")<=Date.today AndAlso e.Row("状态") <> "Confirming" Then
            e.style="逾期"
        Else If e.Row("预计提供时间")<Date.today.adddays(7) Then
            e.style="近期"
        End If
    End If
End If