Beispiel #1
0
 public IHttpActionResult AddProductCategory([FromBody] ProductCateogory productCategory)
 {
     try
     {
         return(Ok(ProductCateogoryManager.AddProductCategory(productCategory)));
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }
Beispiel #2
0
 public IHttpActionResult GetProductCategoryList([FromBody] SearchViewModel viewModel)
 {
     try
     {
         return(Ok(ProductCateogoryManager.GetProductCategoryList(viewModel)));
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }
Beispiel #3
0
 public IHttpActionResult GetProductCategoryById([FromBody] IdViewModel idViewModel)
 {
     try
     {
         return(Ok(ProductCateogoryManager.GetProductCategoryById(idViewModel.Id)));
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }
Beispiel #4
0
 public IHttpActionResult GetProductCategories()
 {
     try
     {
         return(Ok(ProductCateogoryManager.GetProductCategories()));
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }
Beispiel #5
0
 public IHttpActionResult DeleteProductCategory([FromBody] IdViewModel idViewModel)
 {
     try
     {
         ProductCateogoryManager.DeleteProductCategory(idViewModel.Id);
         return(Ok());
     }
     catch (Exception exception)
     {
         return(InternalServerError(exception));
     }
 }