Private Sub Table1_DrawCell(ByVal sender As System.Object, ByVal e As WinForm.TableDrawCellEventArgs) Handles Table1.DrawCell
Select Case e.Col.name
Case "计划产坯"
e.BackColor = If(e.Row!历史生产次数 >=3,System.Drawing.Color.Salmon,Nothing)
Case "特殊要求"
e.BackColor = If(e.Row!特殊要求.contains("+"),System.Drawing.Color.Peru,If(e.Row!特殊要求.contains("黑片"),System.Drawing.Color.SlateGray,If(e.Row!特殊要求.contains("磁矩"),System.Drawing.Color.OrangeRed,If(e.Row!特殊要求.contains("纯料"),System.Drawing.Color.LightSalmon,If(e.Row!内外销售急或加急 = "急",System.Drawing.Color.Orange,Nothing)))))
Case "生产日期"
e.BackColor = If(e.Row!内外销售急或加急 = "外销",System.Drawing.Color.Yellow,If(e.Row!内外销售急或加急 = "急",System.Drawing.Color.Orange,Nothing))
Case "模具编号"
e.BackColor = If(e.Row!内外销售急或加急 = "急",System.Drawing.Color.Lime,Nothing)
Case "订单号"
e.BackColor = If(e.Row!计数 > 1,System.Drawing.Color.MediumPurple,If(e.Row!计数 > 1,System.Drawing.Color.Red,Nothing))
Case "成品规格","圆环内芯直径","毛坯规格"
e.BackColor = If(e.Row!计数 > 1,System.Drawing.Color.MediumPurple,Nothing)
Case "订单状态"
e.BackColor = If(e.Row!订单状态 = "暂停",System.Drawing.Color.Red,If(e.Row!订单状态 = "未下单",System.Drawing.Color.YEllow,Nothing))
End Select
End Sub