Пример #1
0
 public int DeleteCategory(int ID)
 {
     _Cateservice = new CategoryService();
     if (_Cateservice.Delete(ID) == 1)
         return 1;
     else
         return 0;
 }
Пример #2
0
 public int UpdateCategory(Category cate)
 {
     _Cateservice = new CategoryService();
     if (_Cateservice.Update(cate) == 1)
         return 1;
     else
         return 0;
 }
Пример #3
0
 public  int AddCategory(Category cate)
 {
     _Cateservice = new CategoryService();
     if (_Cateservice.Add(cate) == 1)
         return 1;
     else
         return 0;
 }
Пример #4
0
 public IQueryable<Category> GetAllCategory()
 {
     _Cateservice = new CategoryService();
     IQueryable<Category> _a = _Cateservice.GetAll();
     return _a;
 }
Пример #5
0
 public IQueryable<Category> GetCategogyByName(string name)
 {
     _Cateservice = new CategoryService();
     IQueryable<Category> _a = _Cateservice.GetByName(name);
     return _a;
 }
Пример #6
0
 public Category GetCategogy(int id)
 {
     _Cateservice = new CategoryService();
     var ret = _Cateservice.Get(id);
     return ret;
 }