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)); } }
public ActionResult ListTree() { ViewData["depth"] = 1; return(View(CategoryModel.GetList())); }
public ActionResult RecreateTree() { //7,4;5,5 CategoryModel.GetList(true); return(RedirectToAction("ListTree")); }
public ActionResult Index() { return(View(CategoryModel.GetList(false, 5, 1))); }