本文整理汇总了C#中Data.EntityFramework.BLL.TriglavBL.getVoteUserLikes方法的典型用法代码示例。如果您正苦于以下问题:C# TriglavBL.getVoteUserLikes方法的具体用法?C# TriglavBL.getVoteUserLikes怎么用?C# TriglavBL.getVoteUserLikes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data.EntityFramework.BLL.TriglavBL
的用法示例。
在下文中一共展示了TriglavBL.getVoteUserLikes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btn_Like_Click
protected void btn_Like_Click(object sender, ImageClickEventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
user_likes = temp.getUserLikes(korisnik.id, post.id);
if (user_likes == null)
{
user_likes = new Data.EntityFramework.DAL.User_Likes();
user_likes.PostId = post.id;
user_likes.UserId = korisnik.id;
user_likes.DaumRated = DateTime.Now;
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
user_likes.Rate = 0;
temp.SaveUser_Likes(user_likes);
}
else
{
Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
temp.UpdateUser_Likes(user_likes, LikesBefore);
}
}
LoadClanak(post.id);
}
示例2: btn_oLike_Click
protected void btn_oLike_Click(object sender, ImageClickEventArgs e)
{
if (korisnik != null)
{
ImageButton _sender = (ImageButton)sender;
HiddenField hid = (HiddenField)_sender.FindControl("hf");
using (TriglavBL temp = new TriglavBL())
{
Post odgovorNaLIsti = temp.getOdgovorByID(Convert.ToInt32(hid.Value));
if (odgovorNaLIsti != null)
{
user_likes = temp.getUserLikes(korisnik.id, odgovorNaLIsti.id);
if (user_likes == null)
{
user_likes = new Data.EntityFramework.DAL.User_Likes();
user_likes.PostId = odgovorNaLIsti.id;
user_likes.UserId = korisnik.id;
user_likes.DaumRated = DateTime.Now;
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
user_likes.Rate = 0;
temp.SaveUser_Likes(user_likes);
}
else
{
Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
temp.UpdateUser_Likes(user_likes, LikesBefore);
}
}
}
LoadClanak(post.id);
}
else
{
ClientScript.RegisterStartupScript(this.GetType(), "", "Login()", true);
}
}