求2个方法的解释说明
(1)private string filename(string id){
filename1="";
string sql = "select classname from texpertspecialclass t,tspecialclass c Where expertid="+id+" And t.specialclassid=c.specialclassid";
DataSet ds=(sql);
filename1="<table widht='100%' border='0'>";
foreach(DataRow myRow in ds.Tables[0].Rows )
{
filename1 =filename1 + "<tr><td>"+myRow[0] + "</td>";
}
filename1 =filename1 + "</table>";
GC.Collect();
return filename1;
}
(2)private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemIndex!=-1)
{
e.Item.Cells[0].Text=Convert.ToString (e.Item.ItemIndex+1);
e.Item.Cells[2].Text=filename(e.Item.Cells[6].Text);
}
}