private async void OnDeleteBook()
    {
        if (Item is null)
        {
            return;
        }

        await _booksService.DeleteAsync(Item);
    }
 private async void OnDeleteBook()
 {
     using (_showProgressInfo.StartInProgress(ProgressInfoName))
     {
         try
         {
             await _booksService.DeleteAsync(Item);
         }
         catch (Exception ex)
         {
             // TODO: show error to the user
             _logger.LogError(ex, ex.Message);
         }
     }
 }
        public async Task <IHttpActionResult> delete([FromBody] ITEMSVM entity)
        {
            var q = billMasterService.getByItemId(entity.ITEM_ID);

            if (q.Count == 0)
            {
                var result = await itemsService.DeleteAsync(entity);
                await LogData(entity.ITEM_CODE, entity.ITEM_ID.ToString());

                return(Ok(result));
            }

            else
            {
                return(Ok(false));
            }
            //return Ok(await itemsService.DeleteAsync(entity));
        }
 private async void OnDeleteBook()
 {
     await _booksService.DeleteAsync(Item);
 }
示例#5
0
        public async Task <IActionResult> DeleteConfirmed(long id)
        {
            await _itemService.DeleteAsync(id);

            return(RedirectToAction(nameof(Index)));
        }