62,046
社区成员
发帖
与我相关
我的任务
分享
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[6].Text == "0")
{
e.Row.Cells[6].Text = "未处理";
}
else if (e.Row.Cells[6].Text == "1")
{
e.Row.Cells[6].Text = "已处理";
e.Row.Cells[6].ForeColor = System.Drawing.Color.Red;
}
}
}
SELECT name,CASE sex WHEN 0 THEN '男' ELSE '女' END AS sex FROM People