Ejemplo n.º 1
0
        public ActionResult DelTopicMethod()
        {
            int       id       = Convert.ToInt32(Request["id"]);
            ITopicBLL topicBLL = new TopicManager();
            Topic     topic    = topicBLL.LoadEntity(u => u.TopicID == id).FirstOrDefault();

            if (topicBLL.DeleteEntity(topic))
            {
                return(Content("<script>alert('删除成功!');window.location.href='/Home/TopicManager';</script>"));//刷新页面
            }
            else
            {
                return(Content("<script>alert('删除失败!');history.go(-1);</script>"));//不刷新退回页面
            }
        }