public IncetrementLikes ( |
||
al | ||
return | void |
public string Like(int? id) { CheckUser(); Article a = null; int Uid = Autorizacija.Autorizacija.GetCurrentUser(this.HttpContext).UserID; string likes = ""; if (id.HasValue) { using (DBBL Baza = new DBBL()) { ArticlesLike al = new ArticlesLike() { ArticleID = id.Value, UserID = Uid, GUID = Guid.NewGuid(), DateLike = DateTime.Now, CreatorIP = this.Request.GetIpAdresa() }; try { Baza.IncetrementLikes(al); } catch (Exception) { return "False"; } a = Baza.GetWikiByID(id.Value); likes = a.ArticlesLikes.Count.ToString(); } } return likes; }