Response.Write("")
Gridview
this.GridView1.DataSource=ds.Tables["tb_Cargo"];
this.GridView1.DataKeynames=new string[]{"id"};
this.GridView1.DataBind();
protected void GridView1_PageIndexChanging(object sender,GridViewPageEventArgs.e)
{
this.Gridview1.pageIndex=e.newPageIndex;
this.Bind();
}
protected void GridView1_RowDataBound(object sender,GridViewPageEventArgs.e)
{
if (e.Row.RowType==DataControlRowType.DataRow)
{
if(e.Row.Cells[4].text=="0")
{
e.Row.Cells[4].text="not shenhe" }
}else
{
e.Row.Cells[4].text="" have shenhe";
}
((LinkButton)(e.Row.Cells[6].Controls[0])).Attributes.Add("onclick","return confirm('comfirm?')");
}
protected void GridView1_SelectedIndex(object sender,GridViewPageEventArgs.e)
{
SqlConnextion strcon=new SqlConnection(system.Configuration.Configurationmanager.AppSettings["strcon"]);
strcon.Open();
string id=this.GridView1.DataKeys[e.newSelectedIndex].Value.ToString();
SqlCommand scd=new SqlCommand("selec....");
String Auditing=Convert.ToString(scd.ExecuteScalar());
if(Auditing=="0")
{
Auditing="1";
}
else
{
Auditing="0";
}
scd.CommandText="update tb_Cargo set Auditing="+Auditing+"where id="+id;
scd.ExecuteNonQuery();
this.Bind();
strCon.Close();
}
protected void GridView1_RowDeleting(object sender,GridViewPageEventArgs.e)
{
string id=this.GridView1.Datakeys[e.RowIndex].value.ToString();
SqlConnection strCon=new SqlConnection(System.Configuration.Configurationmanager.AppSetting["strcon"]);
stricon.open();
sqlCommand scd=new sqlCommand("delete from tb_Cargo....")
scd.ExecuteNonQuery();
this. bind();
strcon.close();
}
上传最大文件为4M,最长时间60秒,最多请求数为100
}
}