Exemplo n.º 1
0
        private void EditTag(int id, string name, string friendlyName)
        {
            var result = tagBll.SelectAllFromTagById(id);

            if (result == null)
            {
                logger.Error("Post does not exist");
                throw new HttpException(407, "Post does not exist");
            }
            tagBll.UpdateTag(id, name, friendlyName);
            logger.Trace("Success");
        }
Exemplo n.º 2
0
 public ActionResult SaveTagAction(int?id, string name, string desc, string link)
 {
     return(RunActionWhenLogin((loginuser) =>
     {
         var model = new TagModel();
         model.TagID = id ?? 0;
         model.TagName = name;
         model.TagDesc = desc;
         model.TagLink = link;
         var res = string.Empty;
         if (model.TagID > 0)
         {
             res = _TagBll.UpdateTag(model);
         }
         else
         {
             model.ItemCount = 0;
             res = _TagBll.AddTag(model);
         }
         return GetJsonRes(res);
     }, PermissionList: null));
 }