...
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@inject HttpClientController hc;
|
||||
<Modal @ref="modal" />
|
||||
<form>
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
@@ -80,6 +81,7 @@ else
|
||||
|
||||
|
||||
@code {
|
||||
private Modal modal = default!;
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
IconName alertIconName = IconName.CheckCircleFill;
|
||||
@@ -196,4 +198,6 @@ else
|
||||
}
|
||||
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
||||
}
|
||||
|
||||
|
||||
}
|
66
TaxPayerFull/CUSComponent/Taxstuff.razor
Normal file
66
TaxPayerFull/CUSComponent/Taxstuff.razor
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Shared.DTOs;
|
||||
@using Front.Services
|
||||
@inject HttpClientController hc;
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-10">
|
||||
<InputText @bind-Value="@Value" onclick="" style="text-align:center;" class="form-control" placeholder="دنبال چی ؟" id="html5-password-input3" />
|
||||
</div> <div class="col-md-2">
|
||||
<button onclick="" type="submit" class="btn btn-primary">ارسال</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<Grid TItem="stuffDto" class="table table-hover table-bordered table-striped" DataProvider="DataProvider" AllowFiltering="true" Responsive="true" AllowPaging="true" PageSize="5">
|
||||
<GridColumn TItem="stuffDto" HeaderText="شناسه" PropertyName="Id">
|
||||
@context.ID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="stuffDto" HeaderText="نوع شناسه کالا" PropertyName="Type" StringComparison="StringComparison.Ordinal">
|
||||
@context.Type
|
||||
</GridColumn>
|
||||
<GridColumn TItem="stuffDto" HeaderText="مشمول یا معاف" PropertyName="TaxableOrFree">
|
||||
@context.TaxableOrFree
|
||||
</GridColumn>
|
||||
<GridColumn TItem="stuffDto" HeaderText="نرخ ارزش افزوده" PropertyName="Vat">
|
||||
@context.Vat
|
||||
</GridColumn>
|
||||
@* <GridColumn TItem="stuffDto" HeaderText="نرخ ارزش افزوده مبادی گمرکی" PropertyName="VatCustomPurposes">
|
||||
@context.VatCustomPurposes
|
||||
</GridColumn> *@
|
||||
<GridColumn TItem="stuffDto" HeaderText="شرح شناسه کالا" PropertyName="DescriptionOfID">
|
||||
@context.DescriptionOfID
|
||||
</GridColumn>
|
||||
</Grid>
|
||||
</div>
|
||||
</div>
|
||||
@code {
|
||||
private IEnumerable<stuffDto> stuffDtos;
|
||||
public string Value { get; set; }
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
stuffDtos = new List<stuffDto>();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@functions {
|
||||
public async Task Search()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Value))
|
||||
{
|
||||
var rsp = await hc.Get($"stuff/Getstuff/{Value}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
stuffDtos = await rsp.Content.ReadFromJsonAsync<List<stuffDto>>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task<GridDataProviderResult<stuffDto>> DataProvider(GridDataProviderRequest<stuffDto> request)
|
||||
{
|
||||
return await Task.FromResult(request.ApplyTo(stuffDtos));
|
||||
}
|
||||
}
|
@@ -7,7 +7,6 @@
|
||||
@inject Fixedvalues fv;
|
||||
<PageTitle>کالا</PageTitle>
|
||||
<Modal @ref="modal" />
|
||||
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
@@ -60,10 +59,18 @@
|
||||
<div class="col-md-12">
|
||||
<div class="mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-10">
|
||||
<div class="col-auto">
|
||||
<button type="submit" @onclick="()=>CodItem(0)" class="btn btn-primary">جدید</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-auto">
|
||||
<Button Color="ButtonColor.Info" @onclick="Showstuff" Type="ButtonType.Button">
|
||||
دریافت شناسه کالا
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,7 +117,7 @@
|
||||
|
||||
@layout PanelLayout
|
||||
@code {
|
||||
|
||||
//private Modal stuffmodal = default!;
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
ItemSerchGetCOD itemsearch = new ItemSerchGetCOD();
|
||||
[Parameter, SupplyParameterFromQuery]
|
||||
@@ -201,7 +208,6 @@
|
||||
}
|
||||
public async Task CodItem(int ID)
|
||||
{
|
||||
|
||||
var parameters = new Dictionary<string, object>();
|
||||
|
||||
if(ID == 0) parameters.Add("Cod", new RCOD(){ID=0});
|
||||
@@ -211,5 +217,14 @@
|
||||
await modal.ShowAsync<CodItem>(title: ID == 0 ? "کالا جدید" : "ویرایش اطلاعات", parameters: parameters);
|
||||
|
||||
|
||||
}
|
||||
public async Task Showstuff()
|
||||
{
|
||||
var parameters = new Dictionary<string, object>();
|
||||
modal.Size = ModalSize.ExtraLarge;
|
||||
|
||||
await modal.ShowAsync<Front.CUSComponent.Taxstuff>(title: "دریافت شناسه کالا", parameters: parameters);
|
||||
|
||||
|
||||
}
|
||||
}
|
@@ -34,9 +34,9 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
||||
}) ;
|
||||
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||
|
||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||
|
||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||
|
||||
|
Reference in New Issue
Block a user