If Forms("任务-xmZB").Opened Then
Tables("任务-xmZB_table1").grid.Cols(0).widthdisplay = 4
Tables("任务-xmZB_table1").Grid.Rows(0).Height =27
Tables("任务-xmZB_table2").grid.Cols(0).widthdisplay = 4
'Tables("任务-xmZB_table1").Grid.Rows(0).Height =27
End If
If Forms("任务-xmfp").Opened Then
Tables("任务-xmfp_table1").grid.Cols(0).widthdisplay = 4
End If
If vars("start") = True AndAlso (e.Col.name = "缩略图" OrElse e.Col.name = "通过截图") AndAlso e.Table.Name<>"任务-xmfp_table1" Then '--------改成本地文件之后,去掉 vars("局域网")=True AndAlso
If e.Col.name= "缩略图" Then
e.StartDraw
If e.Row("缩略图") > "" Then
If FileSys.FileExists(ProjectPath & "\Foxtemp\" & e.Row("缩略图")) Then
e.Graphics.DrawImage(getimage(ProjectPath & "\Foxtemp\" & e.Row("缩略图")), e.x ,e.y , e.Width ,e.Height ) '绘制第一个图标
Else
e.Graphics.DrawImage(failed, e.x + 1,e.y +1, 42,42)
End If
End If
e.text = ""
e.EndDraw
End If
End If
'-------------日期显示设置
If e.Col.IsDate Then
If e.Row.isnull(e.Col.Name) = False Then
e.text = format(e.Row(e.Col.Name),"MM-dd")
End If
End If
If vars("start2") = True Then
e.Table.Se\ect(0, 1)
vars("start2") = False
End If
'''
If e.Row.Locked =False Then
Dim dr As DataRow = DataTables("XMZB").find("bh = '"& e.row("BH") & "'")
'Dim dr As DataRow = DataTables("XMFP").DataRows(e.Row.Index)
'Dim pr As DataRow = dr.GetParentrow("xmzb")
If dr IsNot Nothing Then
If dr("已通过") = True Then
e.style = "通过"
Else If e.Row("任务状态") = "通过" Then
e.Style = "通过"
Else
If e.Col.Name = "任务结束" Then
If e.Row.IsNull("任务结束") = False
Dim d1 As Date=e.Row("任务结束")
Dim tp As TimeSpan = E.Row("任务结束") - E.Row("计划开始")
Dim tp2 As TimeSpan = D1 - Date.Today
If tp2.TotalDays <0 Then
e.Style = "延期提醒"
Else
If tp2.TotalDays/TP.TotalDays < 0.3 AndAlso tp2.TotalDays/TP.TotalDays >= 0 Then
e.Style = "到期提醒"
Else
e.Style = Nothing
End If
End If
End If
Else If e.Row("剩余人天") < 0 AndAlso e.Col.Name = "剩余人天" Then
e.Style = "延期提醒"
'Else
'If CurrentTable.Name= "xmfp" Then
'Dim idx As Integer = 0
'For i As Integer = 1 To e.Row.Index
'If e.Table.Rows(i-1)("成员") <> e.Table.Rows(i)("成员") Then
'idx += 1
'End If
'Next
'If idx Mod 2 = 0 Then
'e.style = "样式1"
'Else
'e.style = "样式2"
'End If
'End If
End If
End If
End If
If e.Row.IsNull("颜色记录") = False Then
Dim n As String = "样式" & e.Row("_Identify") & "_" & e.Col.name
Dim ary() As String = e.Row("颜色记录").split("|")
For Each s As String In ary
Dim a() As String = s.split(":")
If a(0) = e.Col.name Then
e.Table.DataTable.AddUserStyle(n, Color.FromARGB(a(1)), Color.black)
e.Table.DataTable.Styles(n).BackColor = Color.FromARGB(a(1))
e.style = n
Exit For
End If
Next
End If
Else
'Dim idx As Integer = 0
'For i As Integer = 1 To e.Row.Index
'If e.Table.Rows(i-1)("成员") <> e.Table.Rows(i)("成员") Then
'idx += 1
'End If
'Next
'If idx Mod 2 = 0 Then
'e.style = "样式3"
'Else
'e.style = "样式4"
'End If
'e.Style = "锁定"
End If
'If e.Row.IsNull("任务") = False Then
'If e.Row("任务").contains("_复制") Then
'e.Style = "新增行"
'End If
'End If
'''
'''
If e.Col.name="项目名称" Then
If e.Row.Index = vars("x") AndAlso e.Col.Index = vars("y") Then
e.Style = "突出显示"
End If
End If
'If e.Row.index = e.Table.rowsel Then
'e.Style = "整行样式"
'End If