通过数据的判断使Gridview中数据变色
//前台
<asp:Label ID="Label1" runat="server" Text='<%# Bind("applStatusID") %>' ForeColor='<%# Convert.ToBoolean(Convert.ToInt32(Eval("isapplStatusID")))?System.Drawing.Color.FromArgb(0,0,102):System.Drawing.Color.Red%>'></asp:Label>
//后台
"(CASE WHEN Apply.applStatusID=0 THEN '未处理' when Apply.applStatusID=1 THEN '已审批' when Apply.applStatusID=2 THEN '退回' END) as applStatusID,applStatusID as isapplStatusID"
<asp:Label ID="Label1" runat="server" Text='<%# Bind("applStatusID") %>' ForeColor='<%# Convert.ToBoolean(Convert.ToInt32(Eval("isapplStatusID")))?System.Drawing.Color.FromArgb(0,0,102):System.Drawing.Color.Red%>'></asp:Label>
//后台
"(CASE WHEN Apply.applStatusID=0 THEN '未处理' when Apply.applStatusID=1 THEN '已审批' when Apply.applStatusID=2 THEN '退回' END) as applStatusID,applStatusID as isapplStatusID"