public void SetLastPost(Forum_Thread Thread, Forum_User User, int PostNumber, bool IncreaseOnly = true)
 {
     var Last = db.Forum_ViewedPosts.SingleOrDefault(P => P.Forum_User == User && P.Forum_Thread == Thread);
     if (Last == null)
     {
         Last = new Forum_ViewedPost();
         Last.Forum_Thread = Thread;
         Last.Forum_User = User;
         db.Forum_ViewedPosts.InsertOnSubmit(Last);
     }
     else if (Last.LastPost >= PostNumber && IncreaseOnly) return;
     Last.LastPost = PostNumber;
 }
Exemple #2
0
		private void detach_Forum_ViewedPosts(Forum_ViewedPost entity)
		{
			this.SendPropertyChanging();
			entity.Forum_User = null;
		}
Exemple #3
0
 partial void DeleteForum_ViewedPost(Forum_ViewedPost instance);
Exemple #4
0
 partial void UpdateForum_ViewedPost(Forum_ViewedPost instance);
Exemple #5
0
 partial void InsertForum_ViewedPost(Forum_ViewedPost instance);
Exemple #6
0
		private void attach_Forum_ViewedPosts(Forum_ViewedPost entity)
		{
			this.SendPropertyChanging();
			entity.Forum_Thread = this;
		}