This commit is contained in:
mmrbnjd
2024-05-07 18:00:21 +03:30
parent 29f4f975d9
commit 3e11a2544c

View File

@@ -7,7 +7,7 @@
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label class="col-sm-4 col-form-label" style="color:red" for="inputcustomertype">نوع مشتری</label> <label class="col-sm-4 col-form-label" style="color:red" for="inputcustomertype">نوع مشتری</label>
<select @bind="Cus.CustomerType" class="form-control" aria-label="Default select example" id="inputcustomertype"> <select @bind="ItemSearchCustomertype" class="form-control" aria-label="Default select example" id="inputcustomertype">
<option value="0" style="color: #b5b5b5" selected>انتخاب کنید...</option> <option value="0" style="color: #b5b5b5" selected>انتخاب کنید...</option>
<option value="1">حقیقی</option> <option value="1">حقیقی</option>
<option value="2">حقوقی</option> <option value="2">حقوقی</option>
@@ -91,12 +91,13 @@ else
@code { @code {
[Parameter] public RCustomer Cus { get; set; } [Parameter] public RCustomer Cus { get; set; }
public int? ItemSearchCustomertype { get; set; }
[Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; } [Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; }
public ActionInResultComponent result { get; set; } public ActionInResultComponent result { get; set; }
protected override Task OnParametersSetAsync() protected override Task OnParametersSetAsync()
{ {
result = new ActionInResultComponent();
return base.OnParametersSetAsync(); return base.OnParametersSetAsync();
} }
} }
@@ -112,7 +113,10 @@ else
} }
public async Task OnClickAdd() public async Task OnClickAdd()
{ {
var rssss = Cus; if (ItemSearchCustomertype > 0)
Cus.CustomerType = (CustomerType)ItemSearchCustomertype;
Cus.ID = null;
result.Action = ComponentAction.add; result.Action = ComponentAction.add;
await OnMultipleOfThree.InvokeAsync(result); await OnMultipleOfThree.InvokeAsync(result);
} }