...
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
<label class="col-sm-4 col-form-label" style="color:red" for="inputTitle">نام کالا</label>
|
||||
@if (Cod.ID == 0 || !_UsedInTheInvoice)
|
||||
{
|
||||
<InputText @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا"
|
||||
<InputText dir="rtl" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا"
|
||||
/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<InputText @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا" readonly />
|
||||
<InputText dir="rtl" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا" readonly />
|
||||
}
|
||||
|
||||
</div>
|
||||
@@ -73,14 +73,15 @@
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="col-sm-5 col-form-label">شناسه مالیاتی کالا</label>
|
||||
<InputText @bind-Value="Cod.TaxID" type="text" class="form-control" id="inputTaxID" placeholder="شناسه مالیاتی کالا" />
|
||||
<InputText dir="rtl" @bind-Value="Cod.TaxID" type="text" class="form-control" id="inputTaxID" placeholder="شناسه مالیاتی کالا" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label style="color:red" class="col-sm-5 col-form-label">% نرخ مالیات کالا</label>
|
||||
<NumberInput @bind-Value="Cod.TaxRate" type="text" class="form-control" id="inputTaxRate" placeholder="نرخ مالیات کالا" />
|
||||
<NumberInput dir="rtl" @bind-Value="Cod.TaxRate" type="text" class="form-control" id="inputTaxRate" placeholder="نرخ مالیات کالا" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
|
||||
</form>
|
||||
|
||||
@@ -110,6 +111,7 @@ else
|
||||
|
||||
|
||||
@code {
|
||||
public bool SpinnerVisible { get; set; } = false;
|
||||
private ConfirmDialog dialog = default!;
|
||||
private Modal modal = default!;
|
||||
// alert
|
||||
@@ -152,7 +154,7 @@ else
|
||||
|
||||
else _UsedInTheInvoice = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void ShowSuccessAlert(string msg)
|
||||
{
|
||||
@@ -170,7 +172,7 @@ else
|
||||
}
|
||||
public async Task OnClickDelete()
|
||||
{
|
||||
|
||||
SpinnerVisible = true;
|
||||
var rsp = await hc.Delete($"Cod/Delete/{Cod.ID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
@@ -191,11 +193,12 @@ else
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
|
||||
|
||||
|
||||
SpinnerVisible = false;
|
||||
|
||||
}
|
||||
public async Task OnClickUpdate()
|
||||
{
|
||||
SpinnerVisible = true;
|
||||
if (Cod.UnitID > 0 && Cod.TaxRate >= 0 && !string.IsNullOrEmpty(Cod.Title))
|
||||
{
|
||||
|
||||
@@ -218,9 +221,11 @@ else
|
||||
}
|
||||
}
|
||||
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
||||
SpinnerVisible = false;
|
||||
}
|
||||
public async Task OnClickAdd()
|
||||
{
|
||||
SpinnerVisible = true;
|
||||
if (Cod.UnitID > 0 && Cod.TaxRate > 0 && !string.IsNullOrEmpty(Cod.Title))
|
||||
{
|
||||
|
||||
@@ -245,6 +250,7 @@ else
|
||||
}
|
||||
}
|
||||
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
||||
SpinnerVisible = false;
|
||||
}
|
||||
private async Task ShowConfirmationDeleteAsync()
|
||||
{
|
||||
|
Reference in New Issue
Block a user