public async Task DeleteItem() { if (GridComponent.Grid.DeleteConfirmation && _code != _confirmationCode) { _shouldRender = true; Error = Strings.DeleteConfirmCodeError; StateHasChanged(); return; } try { _tabGroups = null; await GridComponent.DeleteItem(this); } catch (GridException e) { await OnParametersSetAsync(); _shouldRender = true; Error = string.IsNullOrWhiteSpace(e.Code) ? e.Message : e.Code + " - " + e.Message; StateHasChanged(); } catch (Exception e) { Console.WriteLine(e.Message); await OnParametersSetAsync(); _shouldRender = true; Error = Strings.DeleteError; StateHasChanged(); } }
protected async Task DeleteItem() { try { await GridComponent.DeleteItem(this); } catch (Exception) { Error = Strings.DeleteError; } }
protected async Task DeleteItem() { try { await GridComponent.DeleteItem(this); } catch (GridException e) { _shouldRender = true; Error = string.IsNullOrWhiteSpace(e.Code) ? e.Message : e.Code + " - " + e.Message; } catch (Exception) { _shouldRender = true; Error = Strings.DeleteError; } }
protected async Task DeleteItem() { try { _tabGroups = null; await GridComponent.DeleteItem(this); } catch (GridException e) { await OnParametersSetAsync(); _shouldRender = true; Error = string.IsNullOrWhiteSpace(e.Code) ? e.Message : e.Code + " - " + e.Message; } catch (Exception e) { Console.WriteLine(e.Message); await OnParametersSetAsync(); _shouldRender = true; Error = Strings.DeleteError; } }
protected async Task DeleteItem() { await GridComponent.DeleteItem(); }