/// <summary> /// 编辑标签 /// </summary> /// <returns></returns> public string UpdateLabel() { 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.AddLabel(name); if (res > 0) { return("success"); } } else { int res = bll.UpdateLabel(id, name); if (res > 0) { return("success"); } } return("failure:失败"); } catch (Exception ex) { Log.WriteFile(ex); return("failure:失败"); } }