Beispiel #1
0
 // DELETE: api/ProductCategory/5
 public IHttpActionResult Delete(int id)
 {
     try
     {
         productCategoryBusiness.DeleteProductCategory(id);
         return(Ok());
     }
     catch
     {
         return(InternalServerError());
     }
 }
 public string DeleteProductCategory(int code)
 {
     try
     {
         var result = _productCategoryBusiness.DeleteProductCategory(code);
         return(JsonConvert.SerializeObject(new { Status = "OK", Record = result, Message = "Success" }));
     }
     catch (Exception ex)
     {
         AppConstMessage cm = _appConst.GetMessage(ex.Message);
         return(JsonConvert.SerializeObject(new { Status = "ERROR", Record = "", Message = cm.Message }));
     }
 }