Summary value: summaryparamnamesenderparamparamnameeparamprotectedvoidgvZhTiList_RowDataBound (objectsender, GridViewRowEventArgse) {if (e. Row. RowTypeDataControlRowType. DataRow) {if (e. Row.
/// Summary // value assignment //// summary /// param name = "sender"/param // param name = "e"/param protected void gvZhTiList_RowDataBound (object sender, gridViewRowEventArgs e) {if (e. row. rowType = DataControlRowType. dataRow) {if (e. row. rowState
///
/// Assign a value
///
///
///
Protected void gvZhTiList_RowDataBound (object sender, GridViewRowEventArgs e)
{
If (e. Row. RowType = DataControlRowType. DataRow)
{
If (e. Row. RowState = DataControlRowState. Normal | e. Row. RowState = DataControlRowState. Alternate)
{
LinkButton lnkbtnpicdel = new LinkButton ();
Lnkbtnpicdel = (LinkButton) e. Row. Cells [gvZhTiList. Columns. Count-1]. FindControl ("lnkbtndelpic ");
Lnkbtnpicdel. CommandArgument = e. Row. RowIndex. ToString ();
LinkButton lnkbtnisusers = new LinkButton ();
Lnkbtnisusers = (LinkButton) e. Row. Cells [gvZhTiList. Columns. Count-2]. FindControl ("lnkbtnusers ");
Lnkbtnisusers. CommandArgument = e. Row. RowIndex. ToString ();
}
}
}
///
/// Function implementation
///
///
///
Protected void gvZhTiList_RowCommand (object sender, GridViewCommandEventArgs e)
{
If (e. CommandName = "delpic ")
{
String strsqldel = "delete flash_upload where picid =" + gvZhTiList. DataKeys [Convert. ToInt32 (e. CommandArgument. ToString ()]. Value;
Int nums = SqlConnections. UpdateOrDelete (strsqldel );
If (nums> 0)
{
Page. ClientScript. RegisterStartupScript (Page. GetType (), "", "script" alert (/"the image is deleted successfully! /"); Script");
}
Else
{
Page. ClientScript. RegisterStartupScript (Page. GetType (), "", "script" alert (/"image deletion failed! /"); Script");
}
}
If (e. CommandName = "isusers ")
{
String strsqlisusers = "update flash_upload set isenjoin = case isenjoin when 1 then 0 else 1 end where picid =" + gvZhTiList. dataKeys [Convert. toInt32 (e. commandArgument. toString ()]. value;
SqlConnections. UpdateOrDelete (strsqlisusers );
}
}