Exemplo n.º 1
0
 public void DeleteComment(as_comments item)
 {
     try
     {
         RDL.CacheManager.PurgeCacheItems("as_comments" + item.id);
         db.DeleteComment(item.id);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Exemplo n.º 2
0
        public as_comments AddComment(string type, string itemID, string text, string audio = "")
        {
            var res = new as_comments();

            try
            {
                if (audio != string.Empty)
                {
                    res = new as_comments {
                        id = 0, itemID = itemID, type = type, created = DateTime.Now, username = User.UserName, text = text, audio = audio
                    };
                }
                else
                {
                    res = new as_comments {
                        id = 0, itemID = itemID, type = type, created = DateTime.Now, username = User.UserName, text = text
                    };
                }
                db.SaveComment(res);
            }
            catch (Exception ex) { }
            return(res);
        }