Ejemplo n.º 1
0
 public ActionResult OnGet()
 {
     Id      = Convert.ToInt32(Request.RouteValues["Id"]);
     Problem = _repository.GetSingle(Id);
     //if (HttpContext.Request.Cookies["UserName"] != problem.Author.Name)
     //{
     //    throw new Exception("用户权限不正确,您不是当前文章的发布者或者管理员,无权修改该文章");
     //}
     return(Page());
 }
Ejemplo n.º 2
0
        public void OnGet()
        {
            int Id = Convert.ToInt32(Request.RouteValues["id"]);

            Problem = _repository.GetSingle(Id);
        }