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