cus
This commit is contained in:
47
TaxPayerFull/CUSComponent/CustomerItem.razor
Normal file
47
TaxPayerFull/CUSComponent/CustomerItem.razor
Normal file
@@ -0,0 +1,47 @@
|
||||
@using Shared.DTOs
|
||||
<p>سلام</p>
|
||||
@if (Cus.ID==-1)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
</Button>
|
||||
}
|
||||
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>
|
||||
}
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter] public RCustomer Cus { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; }
|
||||
|
||||
public ActionInResultComponent result { get; set; }
|
||||
protected override Task OnParametersSetAsync()
|
||||
{
|
||||
return base.OnParametersSetAsync();
|
||||
}
|
||||
}
|
||||
@functions{
|
||||
public async Task OnClickDelete(){
|
||||
result.Action = ComponentAction.delete;
|
||||
await OnMultipleOfThree.InvokeAsync(result);
|
||||
}
|
||||
public async Task OnClickUpdate()
|
||||
{
|
||||
result.Action = ComponentAction.update;
|
||||
await OnMultipleOfThree.InvokeAsync(result);
|
||||
}
|
||||
public async Task OnClickAdd()
|
||||
{
|
||||
result.Action = ComponentAction.add;
|
||||
await OnMultipleOfThree.InvokeAsync(result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user