...
This commit is contained in:
@@ -28,7 +28,6 @@ namespace Back.Services.Warehouse
|
||||
var RequestRemittance = _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||
.Select(s=>new CirculationDto
|
||||
{
|
||||
ID= s.ID,
|
||||
CODID=s.CODID,
|
||||
CODTitle=s.cODItem.Title,
|
||||
Date=s.Date,
|
||||
@@ -46,7 +45,6 @@ namespace Back.Services.Warehouse
|
||||
var RequestReceipt = _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||
.Select(s => new CirculationDto
|
||||
{
|
||||
ID = s.ID,
|
||||
CODID = s.CODID,
|
||||
CODTitle = s.cODItem.Title,
|
||||
Date = s.Date,
|
||||
|
@@ -18,7 +18,6 @@ namespace Shared.DTOs.Warehouse
|
||||
}
|
||||
public class CirculationDto
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int CODID { get; set; }
|
||||
[Display(Name = "کالا")]
|
||||
public string? CODTitle { get; set; }
|
||||
|
@@ -54,7 +54,14 @@
|
||||
{
|
||||
if (id > 0)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||
if (OnMultipleOfThree.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||
}
|
||||
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -67,7 +74,7 @@
|
||||
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
||||
switch (convertmodel.SentStatus)
|
||||
{
|
||||
case SentStatus.Send:
|
||||
case SentStatus.Send:
|
||||
<td style="background-color:#6495ED">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
@@ -75,15 +82,15 @@
|
||||
<td style="background-color:#2AD51B">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.Unsuccessful:
|
||||
case SentStatus.Unsuccessful:
|
||||
<td style="background-color:#C70000">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.pending :
|
||||
case SentStatus.pending:
|
||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.IN_PROGRESS :
|
||||
case SentStatus.IN_PROGRESS:
|
||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
@@ -112,14 +119,32 @@
|
||||
{
|
||||
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
||||
if (convertmodel.SentStatus == SentStatus.Send
|
||||
|| convertmodel.SentStatus == SentStatus.pending
|
||||
|| convertmodel.SentStatus == SentStatus.pending
|
||||
|| convertmodel.SentStatus == SentStatus.IN_PROGRESS)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||
if (OnMultipleOfThree.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||
|
||||
}
|
||||
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||
|
||||
}
|
||||
}
|
||||
else if (convertmodel.SentStatus == SentStatus.Unsuccessful)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||
if (OnMultipleOfThree.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||
|
||||
}
|
||||
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -128,16 +153,25 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (id > 0)
|
||||
if (id > 0 /* || item.ToString() == "Shared.DTOs.Warehouse.CirculationDto" */)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||
if (OnMultipleOfThree.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||
|
||||
}
|
||||
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">ویرایش</button></td>
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<td><button type="button" class="btn btn-link disabled">ویرایش</button></td>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</tr>
|
||||
@@ -159,5 +193,7 @@
|
||||
@code {
|
||||
[Parameter]
|
||||
public List<T> ModelinComponent { get; set; } = new List<T>();
|
||||
[Parameter] public EventCallback<int> OnMultipleOfThree { get; set; }
|
||||
[Parameter] public EventCallback<int>? OnMultipleOfThree { get; set; }
|
||||
[Parameter] public EventCallback<T>? OnMultipleOfThreeGeneric { get; set; }
|
||||
|
||||
}
|
||||
|
@@ -59,10 +59,10 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-auto">
|
||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(-1)">رسید جدید</Button>
|
||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(new CirculationDto(){Type=TypeCirculation.Receipt})">رسید جدید</Button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(-2)">حواله جدید</Button>
|
||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(new CirculationDto(){Type=TypeCirculation.Remittance})">حواله جدید</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@
|
||||
@* data *@
|
||||
@if (request != null)
|
||||
{
|
||||
<LTable ModelinComponent="request?.list" OnMultipleOfThree="EventCallback.Factory.Create<int>(this,Item)" />
|
||||
<LTable ModelinComponent="request?.list" OnMultipleOfThreeGeneric="EventCallback.Factory.Create<CirculationDto>(this,Item)" />
|
||||
@* pagination *@
|
||||
<p style="color:red">@request?.RowCount آیتم یافت شد</p>
|
||||
<nav aria-label="Page navigation">
|
||||
@@ -185,22 +185,35 @@
|
||||
{
|
||||
|
||||
}
|
||||
public async Task Item(int ID)
|
||||
public async Task Item(CirculationDto circulationDto)
|
||||
{
|
||||
//رسید جدید
|
||||
if (ID == -1)
|
||||
//رسید
|
||||
if (circulationDto.Type == TypeCirculation.Receipt)
|
||||
{
|
||||
|
||||
//جدید
|
||||
if (circulationDto.CODID==0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
//حواله جدید
|
||||
if (ID == -2)
|
||||
//حواله
|
||||
if (circulationDto.Type == TypeCirculation.Remittance)
|
||||
{
|
||||
//جدید
|
||||
if (circulationDto.CODID == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
if (ID >0)
|
||||
{
|
||||
request.list.Where(w=>w.i)
|
||||
}
|
||||
|
||||
// var parameters = new Dictionary<string, object>();
|
||||
|
||||
// if (ID == 0) parameters.Add("Cus", new RCustomer() { ID = 0 });
|
||||
|
Reference in New Issue
Block a user