protected void gv_Result_RowCommand(object sender, GridViewCommandEventArgs e) { string command = e.CommandName; int id = Convert.ToInt32(e.CommandArgument); if (command.Equals("Chk"))//查看 { Response.Redirect("CheckAffairList_zxgz_Add.aspx?CommunicationId=" + id); } else if (command.Equals("Upd"))//修改 { Response.Redirect("CheckAffairList_zxgz_Add.aspx?CommunicationId=" + id); } else if (command.Equals("Del"))//删除 { bool result = SpecialWorkBusiness.DeleteCommunication(id); if (!result) { ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "alter", "alert('删除失败,请重新再试!')", true); return; } LogInfoBusiness.AddLogInfo(Convert.ToInt32(log_userid), DateTime.Now, Convert.ToInt32(log_usertype), log_username, 3, "专项工作信息", log_ip, log_account);//删除添加日志 操作类型->3 RefreshView(0); } }