コード例 #1
0
        /// <summary>
        /// 保存信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SaveTopic_Click(object sender, EventArgs e)
        {
            #region 保存信息
            string tidlist = DNTRequest.GetString("forumtopicstatus");
            //当未选择主题时,则清除所有选择
            if (tidlist == "")
            {
                XmlDocumentExtender doc = new XmlDocumentExtender();
                doc.Load(configPath);
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist");
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");
                doc.Save(configPath);
                Response.Redirect("aggregation_editforumaggset.aspx");
                return;
            }
            else
            {
                PostInfo[] posts = new ForumAggregationData().GetPostListFromFile("Website");
                //得到所选择帖子信息
                Posts.WriteAggregationPostData(posts, tablelist.SelectedValue, tidlist, configPath,
                                               "/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist",
                                               "/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");

                AggregationFacade.BaseAggregation.ClearAllDataBind();
                Response.Redirect("aggregation_editforumaggset.aspx");
            }
            #endregion
        }
コード例 #2
0
        /// <summary>
        /// 保存信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SaveTopic_Click(object sender, EventArgs e)
        {
            #region 保存信息
            string tidlist = DNTRequest.GetString("forumtopicstatus");
            //当未选择主题时,则清除所有选择
            if (tidlist == "")
            {
                if (File.Exists(configPath))
                {
                    XmlDocumentExtender doc = new XmlDocumentExtender();
                    doc.Load(configPath);
                    doc.RemoveNodeAndChildNode("/Aggregationinfo/Data/Topiclist");
                    doc.RemoveNodeAndChildNode("/Aggregationinfo/Forum/Topiclist");
                    doc.Save(configPath);
                    Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Aggregation/TopicByForumId_" + fid);
                }
                Response.Redirect("aggregation_editforumaggset.aspx?fid=" + fid);
                return;
            }
            else
            {
                PostInfo[] posts = new ForumAggregationData().GetPostListFromFile("Website");
                //得到所选择帖子信息
                Posts.WriteAggregationPostData(posts, tablelist.SelectedValue, tidlist, configPath,
                                               "/Aggregationinfo/Data/Topiclist",
                                               "/Aggregationinfo/Forum/Topiclist");
                Discuz.Cache.DNTCache.GetCacheService().RemoveObject("/Aggregation/TopicByForumId_" + fid);
                Response.Redirect("aggregation_editforumaggset.aspx?fid=" + fid);
            }

            #endregion
        }
コード例 #3
0
ファイル: AggregationFacade.cs プロジェクト: xiongeee/BBX
 static AggregationFacade()
 {
     baseAggregationData  = new AggregationData();
     forumAggregationData = new ForumAggregationData();
     AggregationDataSubject.Attach(baseAggregationData);
     AggregationDataSubject.Attach(forumAggregationData);
 }
コード例 #4
0
        static AggregationFacade()
        {
            baseAggregationData  = new AggregationData();
            forumAggregationData = new ForumAggregationData();
            spaceAggregationData = new SpaceAggregationData();
            albumAggregationData = new AlbumAggregationData();
            photoAggregationData = new PhotoAggregationData();
            goodsAggregationData = new GoodsAggregationData();

            //加载要通知的聚合数据对象
            AggregationDataSubject.Attach(baseAggregationData);
            AggregationDataSubject.Attach(forumAggregationData);
            AggregationDataSubject.Attach(spaceAggregationData);
            AggregationDataSubject.Attach(albumAggregationData);
            AggregationDataSubject.Attach(photoAggregationData);
        }
コード例 #5
0
        private void SaveTopic_Click(object sender, EventArgs e)
        {
            string forumtopicstatus = Request["forumtopicstatus"];

            if (String.IsNullOrEmpty(forumtopicstatus))
            {
                var doc = new XmlDocumentExtender();
                doc.Load(this.configPath);
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist");
                doc.RemoveNodeAndChildNode("/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");
                doc.Save(this.configPath);
                base.Response.Redirect("aggregation_editforumaggset.aspx");
                return;
            }
            var postListFromFile = new ForumAggregationData().GetPostListFromFile("Website");

            Posts.WriteAggregationPostData(postListFromFile, this.tablelist.SelectedValue, forumtopicstatus, this.configPath, "/Aggregationinfo/Aggregationdata/Websiteaggregationdata/Topiclist", "/Aggregationinfo/Aggregationpage/Website/Forum/Topiclist");
            AggregationFacade.BaseAggregation.ClearAllDataBind();
            base.Response.Redirect("aggregation_editforumaggset.aspx");
        }
コード例 #6
0
        private void SaveTopic_Click(object sender, EventArgs e)
        {
            string @string = Request["forumtopicstatus"];

            if (String.IsNullOrEmpty(@string))
            {
                if (File.Exists(this.configPath))
                {
                    XmlDocumentExtender xmlDocumentExtender = new XmlDocumentExtender();
                    xmlDocumentExtender.Load(this.configPath);
                    xmlDocumentExtender.RemoveNodeAndChildNode("/Aggregationinfo/Data/Topiclist");
                    xmlDocumentExtender.RemoveNodeAndChildNode("/Aggregationinfo/Forum/Topiclist");
                    xmlDocumentExtender.Save(this.configPath);
                    XCache.Remove("/Aggregation/TopicByForumId_" + this.fid);
                }
                base.Response.Redirect("aggregation_editforumaggset.aspx?fid=" + this.fid);
                return;
            }
            var postListFromFile = new ForumAggregationData().GetPostListFromFile("Website");

            Posts.WriteAggregationPostData(postListFromFile, this.tablelist.SelectedValue, @string, this.configPath, "/Aggregationinfo/Data/Topiclist", "/Aggregationinfo/Forum/Topiclist");
            XCache.Remove("/Aggregation/TopicByForumId_" + this.fid);
            base.Response.Redirect("aggregation_editforumaggset.aspx?fid=" + this.fid);
        }