Skip to content

Commit

Permalink
Update Products.razor
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhu committed Feb 11, 2022
1 parent d031ceb commit d4bf5f8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Blazor.Server.UI/Pages/Products/Products.razor
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,16 @@
FileName= e.File.Name
};
var result = await _mediator.Send(command);
await _table.ReloadServerData();
Snackbar.Add($"Import data successfully", MudBlazor.Severity.Info);
if(result.Succeeded){
await _table.ReloadServerData();
Snackbar.Add($"Import data successfully", MudBlazor.Severity.Info);
}
else
{
foreach(var msg in result.Errors)
{
Snackbar.Add($"{msg}", MudBlazor.Severity.Error);
}
}
}
}

0 comments on commit d4bf5f8

Please sign in to comment.