Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
 protected async Task DeleteItem()
 {
     try
     {
         await GridComponent.DeleteItem(this);
     }
     catch (Exception)
     {
         Error = Strings.DeleteError;
     }
 }
Esempio n. 3
0
 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();
 }