private void View_DeleteProduct(object sender, int productId) { if (dataAccesService.DeleteProduct(productId)) { view.ShowMessage(dataAccesService.ErrorMessage); return; } ReloadData(); }
private async void View_DeleteProduct(object sender, int productId) { if (!await requestService.DeleteProductAsync(productId)) { view.ShowMessage(requestService.ResponseMessage); return; } ReloadData(); }