string select = "select * from tb_team where owner_id=" + Convert.ToInt32(Session["ownerid"]) + "";
DataTable dt = obj.GetDataTable(select);
if (dt.Rows.Count > 0)
{
teamname = dt.Rows[0]["team_name"].ToString();
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
string team1 = (string)DataBinder.Eval(e.Row.DataItem, "teamName1");
string team2 = (string)DataBinder.Eval(e.Row.DataItem, "teamName2");
if (team1 == teamname || team2 == teamname)
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
}
DataTable dt = obj.GetDataTable(select);
if (dt.Rows.Count > 0)
{
teamname = dt.Rows[0]["team_name"].ToString();
}
if (e.Row.RowType == DataControlRowType.DataRow)
{
string team1 = (string)DataBinder.Eval(e.Row.DataItem, "teamName1");
string team2 = (string)DataBinder.Eval(e.Row.DataItem, "teamName2");
if (team1 == teamname || team2 == teamname)
{
e.Row.BackColor = System.Drawing.Color.LightBlue;
}
}
No comments:
Post a Comment