コード例 #1
0
        public HttpResponseMessage Get()
        {
            try
            {
                var list = CategoryModel.GetList();

                if (list == null)
                {
                    return(Request.CreateResponse(HttpStatusCode.NoContent));
                }

                return(Request.CreateResponse(HttpStatusCode.OK, list));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
            }
        }
コード例 #2
0
 public ActionResult ListTree()
 {
     ViewData["depth"] = 1;
     return(View(CategoryModel.GetList()));
 }
コード例 #3
0
 public ActionResult RecreateTree()
 {
     //7,4;5,5
     CategoryModel.GetList(true);
     return(RedirectToAction("ListTree"));
 }
コード例 #4
0
 public ActionResult Index()
 {
     return(View(CategoryModel.GetList(false, 5, 1)));
 }