/// <summary> /// 编辑类别 /// </summary> /// <returns></returns> public string UpdateType() { try { string lid = Request["id"]; string name = Request["name"]; int id = 0; int.TryParse(lid, out id); ContentBLL bll = new ContentBLL(); if (id == 0) { int res = bll.AddType(name); if (res > 0) { return("success"); } } else { int res = bll.UpdateType(id, name); if (res > 0) { return("success"); } } return("failure:失败"); } catch (Exception ex) { Log.WriteFile(ex); return("failure:失败"); } }