前端代码:
<%# Common.getCheck(((DataRowView)Container.DataItem)["checked"].ToString())%>
后台代码:
<%# Common.getCheck(((DataRowView)Container.DataItem)["checked"].ToString())%>
后台代码:
#region 审核状态
public static string getCheck(string i)
{
string check="";
switch(i)
{
case "2":
check = "<font color=gray>已禁止</font>";
break;
case "1":
check="<font color=green>已审核</font>";
break;
case "0":
check="<font color=blue>待审核</font>";
break;
default:
check="未知";
break;
}
return check;
}
#endregion
public static string getCheck(string i)
{
string check="";
switch(i)
{
case "2":
check = "<font color=gray>已禁止</font>";
break;
case "1":
check="<font color=green>已审核</font>";
break;
case "0":
check="<font color=blue>待审核</font>";
break;
default:
check="未知";
break;
}
return check;
}
#endregion