那位大哥能帮我写一下程序中每一句的注释,多谢了!!

来源:百度知道 编辑:UC知道 时间:2024/05/30 06:23:28
public void bind()
{
string str = "select * from [leave_word] where [typeid]=0";
string typeid = Request.QueryString["type"];
title_name.Text = "海贼王";
string[] typeNames = { "海贼王", "火影忍者", "犬夜叉", "死神" };

if (typeid != "" && typeid != string.Empty && typeid != null)
{
str = "select * from [leave_word] where [typeid]=" + typeid;
title_name.Text = typeNames[Int32.Parse(typeid)];
}
str += " order by [top] asc,[jh] asc ,[id] desc";
OleDbDataAdapter da = new OleDbDataAdapter(str, con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();

string SqlStr = "select count(*) from [leave_word]";
Ol

public void bind() //自定义函数
{
string str = "select * from [leave_word] where [typeid]=0"; //定义字符串
string typeid = Request.QueryString["type"];
title_name.Text = "海贼王"; //给titlename付值
string[] typeNames = { "海贼王", "火影忍者", "犬夜叉", "死神" }; //给数组付值

if (typeid != "" && typeid != string.Empty && typeid != null) //判断,不用我解释吧
{
str = "select * from [leave_word] where [typeid]=" + typeid;
title_name.Text = typeNames[Int32.Parse(typeid)];
}
str += " order by [top] asc,[jh] asc ,[id] desc";
OleDbDataAdapter da = new OleDbDataAdapter(str, con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind(); //根据str绑定gridview

string SqlStr = "select count(*) from [leave_word]";
OleDbCommand cmd = new OleDbCommand(SqlStr, con);
OleDbDataR