//报警删除
protected void gridViewDxjk_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string key = gridViewDxjk.DataKeys[e.RowIndex].Value.ToString();
bool flag = bll.Delete(Int32.Parse(key));
if (flag)
NXT_WLService.App_Code.JScript.Alert("删除成功!", this);
else
NXT_WLService.App_Code.JScript.Alert("删除失败!", this);
}
protected void gridViewDxjk_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton btn = (LinkButton)e.Row.Cells[1].Controls[0];
if (btn.Text.Equals("删除"))//刪除鈕才加提示訊息
btn.OnClientClick = "if (confirm('你确认要删除?')) javascript:__doPostBack('gridViewDxjk','Delete$" + e.Row.RowIndex.ToString() + "'); else return false;";
}
}