public void GetData(int classId, string Action, Int32 userId, Int32 userRoleId) { DataTable dt = new DataTable(); BCStudent student = new BCStudent(); dt = student.GetScoreBoard(classId, Action, userId, userRoleId); if (dt.Rows.Count > 0) { dlScoreBoard.DataSource = dt; dlScoreBoard.DataBind(); } else { dlScoreBoard.DataSource = null; dlScoreBoard.DataBind(); } }