예제 #1
0
        public ActionResult Topic()
        {
            var data      = _forum.GetTopicData(1);
            var new_topic = new PostData
            {
                Title = data.Title,
                SList = new List <PSubjectData>()
            };

            foreach (var l in data.Subjects)
            {
                var local = new PSubjectData
                {
                    SubjectID = l.SubjectID,
                    Text      = l.Text,
                    Author    = l.Author,
                    Title     = l.Title
                };
                new_topic.SList.Add(local);
            }
            ;
            return(View(new_topic));
        }