예제 #1
0
        public void Save(int id)
        {
            if (!Permission.PremissionNeed(Request, Response, Session, UserRank.TEACHER))
            {
                return;
            }

            User   user    = (User)Session["user"];
            string title   = Request.Form["title"];
            string content = Request.Form["content"];

            if (title.Length != 0 && content.Length != 0)
            {
                log.Info("uid:" + user.uid + "编辑新闻id:" + id);
                NewsView.SaveNews(id, title, content);
            }

            Response.Redirect("/News");
        }