Esempio n. 1
0
        public IActionResult Delete(int orderItemId)
        {
            try
            {
                if (orderItemId != 0)
                {
                    orderAppService.Delete(orderItemId);

                    return(Json(new
                    {
                        success = true,
                        redirectUrl = Url.Action("Index", "Order")
                    }));
                }
            }
            catch (Exception ex)
            {
                return(Json(new
                {
                    success = false,
                    errors = new { ex.Message }
                }));
            }

            return(NotFound());
        }
Esempio n. 2
0
        public async Task <AjaxResponse <bool> > Delete([FromBody] Guid id)
        {
            var res = await _appservice.Delete(id);

            return(new AjaxResponse <bool>(res));
        }