public ActionResult NewTopicAdd(Topic item)
        {
            item.DateOfCreation = DateTime.Now;
            item.UserID         = (int)Session["LoginID"];
            item.Hit            = 0;
            item.IsActive       = true;
            _topicBLL.Add(item);

            return(RedirectToAction("ForumHeadList"));
        }
Пример #2
0
        public string InsertTopic(Topic Topic)
        {
            string result = "";

            Topic.CreatedUser = UserCookies.AdminName;
            Topic.Status      = "未发布";
            if (string.IsNullOrEmpty(Topic.CreatedTime.ToString()))
            {
                Topic.CreatedTime = DateTime.Now;
            }
            result = topicBLL.Add(Topic).ToString();
            return(result);
        }