<ItemTemplate>
<asp:Label ID="lbequip_isalarmforsms" runat="server" CssClass='<%# LoadTextColor(Eval("Equip_ISAlarmForSMS").ToString()) %>' Text='<%# ReturnStr(Eval("Equip_ISAlarmForSMS").ToString())%>'></asp:Label>
</ItemTemplate>
protected string LoadTextColor(string TheStatus)
{
if (TheStatus == "0")
{
return "FontColor_Red";
}
else if (TheStatus == "1")
{
return "FontColor_Black";
}
else
return "FontColor_Black";
}
protected string ReturnStr(string Equip_ISAlarmForSMS)
{
if (Equip_ISAlarmForSMS == "1" || Equip_ISAlarmForSMS == "")
return "启用";
else
{
return "停用";
}
}
网友评论