예제 #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;
 }