Exemple #1
0
        private void delete(HttpContext context)
        {
            string json = "";
            string where = " roleid='" + context.Request["roleid"] + "'";

            try
            {
                if (roaBLL.Delete(where))
                {
                    roBLL.Delete(where);
                    json = "{IsSuccess:'true',Message:'删除成功!'}";
                }
                else
                {
                    json = "{IsSuccess:'false',Message:'删除失败!'}";
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                json = "{IsSuccess:'false',Message:'服务器交互失败!'}";
            }
            json = JsonConvert.SerializeObject(json);
            context.Response.ContentType = "application/json";
            context.Response.Write(json);
            context.Response.End();
        }
 public object Delete(PostClass PostClass)
 {
     //请求缓存
     Common.CacheHelper.RemoveLocalCache("all");
     return(_service.Delete(PostClass));
 }