标题: Datatable中的<>符号被转译了,不知道怎么解决 [打印本页] 作者: zdc525 时间: 2013-11-26 14:04 标题: Datatable中的<>符号被转译了,不知道怎么解决 string InSelect = @"SELECT * FROM MODULE.HYC_EMPLOY_WORK_TEMP WHERE 1=1";
DataSet dss = DbHelperOracle.Query(InSelect);
DataTable dtt = new DataTable();
dtt = dss.Tables[0];
DataTable dt = new DataTable();
dt.Columns.Add("NO");
dt.Columns.Add("MONTHS");
dt.Columns.Add("D01");
if (dtt.Rows.Count > 0)
{
var total = dtt.Rows.Count;
for (var i = 0; i < total; i++)
{
DataRow dr = dt.NewRow();
string L = "<span style='color:red;'>";
string R = "</span>";
if (dtt.Rows[i]["D01"].ToString() == "休") { L = "<span style='colorrange;'>"; R = "</span>"; }
if (dtt.Rows[i]["D01"].ToString() == "日") { L = "<span style='color:red;'>"; R = "</span>"; }
dr["NO"] = L + dtt.Rows[i]["NO"].ToString() + R;
dr["MONTHS"] = L + dtt.Rows[i]["MONTHS"].ToString() + R;
dr["D01"] = L + dtt.Rows[i]["D01"].ToString() + R;