求人帮我注释下这段代码~~~~毕业设计啊!!谢谢了谢谢了!
Array arr = lujingzhandian.Text.ToString().Trim().Split(',');int i = 0;
if (result == 1)
{ foreach (string site in arr)
{string sql_getlinesite = "SELECT * FROM line_site WHERE site_name='" + site + "'";
DataSet res = new DataSet();
res = new Class1().hsggetdata(sql_getlinesite);
if (res != null)
{
if (res.Tables[0].Rows.Count > 0)
{ for (int resNum = 0; resNum < res.Tables[0].Rows.Count; resNum++)
{ string sql_insertLineLine = "INSERT INTO line_line(line1, line2, site_name) VALUES ('" + checi.Text.ToString().Trim() + "', '" + res.Tables[0].Rows[resNum]["line_id"] + "', '" + site + "')";
new Class1().hsgexucute(sql_insertLineLine);
}} }
sql1 = "INSERT INTO line_site(line_id, site_name, site_number) values ('" + checi.Text.ToString().Trim() + "', '" + site.Trim() + "', '" + i + "')";
new Class1().hsgexucute(sql1);
i++;
} } }
private int getLine()
{
string sql = "SELECT * FROM xianluxinxi WHERE id=" + Request.QueryString["id"].ToString().Trim();
DataSet result = new DataSet();
result = new Class1().hsggetdata(sql);
if (result != null)
{if (result.Tables[0].Rows.Count > 0)
{ return int.Parse(result.Tables[0].Rows[0]["checi"].ToString());
}else{ return 0;
}
}
return 0;
}