日期:2014-05-17 浏览次数:20588 次
else if (e.CommandName=="delete")
{
int ssid =Convert.ToInt32(e.CommandArgument.ToString());
//if (ssid > 0)
//{
// SqlConnection neccon = new SqlConnection(ConfigurationManager.ConnectionStrings["OMEGA_PRIMARY_NEW_21"].ToString());
// //neccon.Open();
// SqlCommand sqlcommand = new SqlCommand("update S6_RMBShop set deleteflag=1 where id=@id",neccon);
// sqlcommand.Parameters.Add("@id",SqlDbType.Int).Value = ssid;
// int qid = sqlcommand.ExecuteNonQuery();
// if (qid > 0 )
// {
// Response.Write("<script>alert('刪除成功');</script>");
// }
// else
// {
// Response.Write("<script>alert('刪除失敗');</script>");
// }
//}
}
<td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="tab/images/010.gif" width="9" height="9" /> </span><span class="STYLE1">[</span><asp:LinkButton CommandName="delete" CommandArgument='<%#Eval("id").ToString() %>' OnClientClick="return (!confirm('确定删除吗'));{return false;}"
ID="LinkButton2" runat="server">刪除</asp:LinkButton><span class="STYLE1">]</span></div></td>