public ActionResult InsertContentCategorySub(ContentCategoryModel u) { CategoryOperation co = new CategoryOperation(); if (u.ParentId == 0) { u.ParentsId = 0; u.CategoryLevel = 0; } else { ContentCategoryModel o = co.Get(u.ParentId); if (o.ParentsId == 0) { u.ParentsId = o.Id; } else { u.ParentsId = o.ParentsId; } u.CategoryLevel = o.CategoryLevel + 1; } co.Insert(u); return(JavaScript("pagesub();")); }
public ActionResult UpdateContentCategorySub(ContentCategoryModel model) { CategoryOperation co = new CategoryOperation(); co.Update(model); return(JavaScript("pagesub();")); }
public ActionResult InsertContentCategory(int id) { ContentCategoryModel u = new ContentCategoryModel(); u.ParentId = id; return(View(u)); }
public ActionResult UpdateContentCategory(int id) { CategoryOperation co = new CategoryOperation(); ContentCategoryModel u = co.Get(id); return(View(u)); }