Example #1
0
        public async Task <JsonResult> DeleteAsync(int customerId)
        {
            var res = await _apiContext.DeleteRequest("Customers/" + customerId);

            if (res.Value.ToString() != "200")
            {
                Response.StatusCode = 404;
                return(null);
            }
            return(res);
        }
Example #2
0
        public async Task <JsonResult> DeleteAsync(int id)
        {
            var res = await _apiContext.DeleteRequest("Categories/" + id);

            if (res.Value.ToString() == "400")
            {
                Response.StatusCode = 400;
                return(new JsonResult("Wystąpił błąd podczas usuwania kategorii"));
            }
            else
            {
                return(res);
            }
        }
Example #3
0
 public async Task DeleteAsync(int productId)
 {
     await _apiContext.DeleteRequest("Products/" + productId);
 }
Example #4
0
        public async Task <JsonResult> Delete(int serviceId)
        {
            var res = await _apiContext.DeleteRequest("Services/" + serviceId);

            return(res);
        }
Example #5
0
 public async Task DeleteAsync(int id)
 {
     await _apiContext.DeleteRequest("Vouchers/" + id);
 }