protected void BtnDel_Click(object sender, System.Web.UI.ImageClickEventArgs e) { bool IsIn = this.CodeIsIn(); if (IsIn == true) { baseOperation.DeleteStaffInfo(this.StaffCode); baseOperation.DeleteActorByStaff(this.StaffCode, "");//把用户对应所有角色删除 // ClearText(); string url; url = "Success.aspx?backUrl=AddUser.aspx&erorMessage=编号为:" + this.StaffCode + "的用户成功删除!"; Log.WriteLog("", Session["username"] + ":删除用户" + StaffCode); Response.Redirect(url); } if (IsIn == false) { baseOperation.ShowErrorMessage(this.Page, "没有选择相应的用户进行操作,不能进行删除操作!"); } }