@@ -66,6 +61,8 @@
+
+
@@ -82,20 +79,15 @@
@code {
- private EditContext? editContext;
- private ValidationMessageStore? messageStore;
+
+
public string Error{ get; set; }
[Parameter]
public int ID { get; set; }
[SupplyParameterFromForm]
public VerificationCodeDto? VerificationCodeModel { get; set; } = new VerificationCodeDto();
- protected override void OnInitialized()
- {
- editContext = new EditContext(VerificationCodeModel);
- messageStore = new(editContext);
- base.OnInitialized();
- }
+
protected override async Task OnParametersSetAsync()
{
@@ -134,15 +126,13 @@
}
else
{
-
+ Error = "خطای سیستمی رخ داده";
}
-
- // nav.NavigateTo($"Verification/{res}");
}
else
{
- nav.NavigateTo($"/");
+ Error = await request.Content.ReadFromJsonAsync
();
}
}
diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs
index 44acca9..debfef5 100644
--- a/TaxPayerFull/Program.cs
+++ b/TaxPayerFull/Program.cs
@@ -6,10 +6,11 @@ using System.Globalization;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add("#app");
builder.RootComponents.Add("head::after");
+builder.Services.AddBlazorBootstrap();
-builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
+//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
-//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
+builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");