fix bug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@inject HttpClientController hc;
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<form>
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
@@ -113,7 +114,7 @@ else
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="OnClickDelete" Type="ButtonType.Button">
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
@if (_UsedInTheInvoice)
|
||||
@@ -135,7 +136,7 @@ else
|
||||
[Parameter] public RCustomer Cus { get; set; }
|
||||
public int? ItemSearchCustomertype { get; set; }
|
||||
[Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; }
|
||||
|
||||
private ConfirmDialog dialog = default!;
|
||||
public ActionInResultComponent result { get; set; }
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
@@ -267,4 +268,20 @@ else
|
||||
}
|
||||
|
||||
}
|
||||
private async Task ShowConfirmationDeleteAsync()
|
||||
{
|
||||
if (Cus.ID.HasValue && Cus.ID.Value > 0)
|
||||
{
|
||||
var confirmation = await dialog.ShowAsync(
|
||||
title: "عملیات حذف مشتری",
|
||||
message1: $"از حذف مشتری {Cus.FullName}",
|
||||
message2: "اطمینان دارید?");
|
||||
|
||||
if (confirmation)
|
||||
await OnClickDelete();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user