public HttpResponseBase UnBlock() { string json = string.Empty; bool result = false; try { _emailBlockListMgr = new EmailBlockListMgr(mySqlConnectionString); EmailBlockLogQuery query = new EmailBlockLogQuery(); if (!string.IsNullOrEmpty(Request.Params["email_address"])) { query.email_address = Request.Params["email_address"].ToString(); } if (!string.IsNullOrEmpty(Request.Params["unblock_reason"])) { query.unblock_reason = Request.Params["unblock_reason"].ToString().Replace("\\", "\\\\"); ; } query.unblock_create_userid = Convert.ToInt32((System.Web.HttpContext.Current.Session["caller"] as Caller).user_id.ToString()); result = _emailBlockListMgr.UnBlock(query); if (result) { json = "{success:true}"; } } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); json = "{success:false,data:[]}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }