...
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user