protected void CommonGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow) //通过DV的 E的参数 来判断类型
{
//jt:奇数行与偶数行的onmouseover及onmouseout的颜色变换
if (Convert.ToInt16(ViewState["LineNo"]) == 0)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#498AB5';this.style.color='#FFFFFF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F7F6F3';this.style.color='#333333'");
ViewState["LineNo"] = 1;
}
else
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#498AB5';this.style.color='#FFFFFF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF';this.style.color='#284775'");
ViewState["LineNo"] = 0;
}
//jt:显示催收状态
string stateCode = e.Row.Cells[5].Text.ToString();
string stateName = dunStateMothod.GetFullStateNameByStatecode(stateCode, "/");
e.Row.Cells[5].Text = stateName;
}
}