// only support 2 level
 public string GetCategoryName(Category cat)
 {
     string catName = string.Empty;
     if (cat.ParentId == 0)
         return cat.Name;
     var temp = _categoryService.GetById(cat.ParentId);
     if (temp != null)
         catName = temp.Name + "\t>\t" + cat.Name;
     return catName;
 }
Пример #2
0
 public void Delete(Category Category)
 {
     _categoryRepository.Delete(Category);
 }
Пример #3
0
 public void Update(Category Category)
 {
     _categoryRepository.Update(Category);
 }
Пример #4
0
 public void Insert(Category Category)
 {
     _categoryRepository.Insert(Category);
 }