public GroupForumThreadPost(GroupForumThread parent, int id, int userid, int timestamp, string message, int deletedlevel, int deleterid)
        {
            ParentThread = parent;
            Id           = id;
            UserId       = userid;
            Timestamp    = timestamp;
            Message      = message;

            DeleterId    = deleterid;
            DeletedLevel = deletedlevel;
        }
Example #2
0
        public GroupForumThread CreateThread(int Creator, string Caption)
        {
            var timestamp = (int)RavenEnvironment.GetUnixTimestamp();
            var Thread    = new GroupForumThread(this, 0, Creator, (int)timestamp, Caption, false, false, 0, 0);

            using (var adap = RavenEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                adap.SetQuery("INSERT INTO group_forums_threads (forum_id, user_id, caption, timestamp) VALUES (@a, @b, @c, @d)");
                adap.AddParameter("a", this.Id);
                adap.AddParameter("b", Creator);
                adap.AddParameter("c", Caption);
                adap.AddParameter("d", timestamp);
                Thread.Id = (int)adap.InsertQuery();
            }

            this.Threads.Add(Thread);
            return(Thread);
        }