...
This commit is contained in:
@@ -105,13 +105,13 @@
|
||||
<div class="col-md-10">
|
||||
@if (Cus.ID == 0)
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
</Button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
@@ -124,6 +124,9 @@ else
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Info" @onclick="OnClickCheckEconomicCode" Type="ButtonType.Button">
|
||||
بررسی کد اقتصادی
|
||||
</Button>
|
||||
</div>
|
||||
<div class="col-md-2" style="align-content:center">
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
@@ -231,6 +234,33 @@ else
|
||||
}
|
||||
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
}
|
||||
public async Task OnClickCheckEconomicCode()
|
||||
{
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
if (!string.IsNullOrEmpty(Cus.EconomicCode))
|
||||
{
|
||||
|
||||
var rsp = await hc.Get($"TaxPayer/EconomicCodeInformation?item={Cus.EconomicCode}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<EconomicCodeModelDto>();
|
||||
// dialog.ShowAsync(
|
||||
// title: $"کد اقتصادی به نام {request.NameTrade}",
|
||||
// message1: $"وضعیت {request.TaxpayerStatus}");
|
||||
|
||||
}
|
||||
else if(rsp.StatusCode==System.Net.HttpStatusCode.NotFound)
|
||||
{
|
||||
ShowDangerAlert("یافت نشد");
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
}
|
||||
else ShowDangerAlert("کد اقعصادی را مشخص کنید");
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
}
|
||||
public async Task OnClickAdd()
|
||||
{
|
||||
|
Reference in New Issue
Block a user