This commit is contained in:
mmrbnjd
2024-06-10 17:26:31 +03:30
parent 82bcfc1ffe
commit 2db5daa9b8
14 changed files with 953 additions and 469 deletions

View File

@@ -50,7 +50,7 @@
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
</td>
}
else if (property.Name.ToLower() == "id")
else if (property.Name.ToLower() == "id" && item.ToString() != "Shared.DTOs.SentTaxDto")
{
if (id > 0)
{
@@ -62,6 +62,44 @@
}
}
else if (property.Name.ToLower() == "msgsentstatus" && item.ToString() == "Shared.DTOs.SentTaxDto")
{
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
switch (convertmodel.SentStatus)
{
case SentStatus.Send:
<td style="background-color:#6495ED">@property.GetValue(item, null)</td>
break;
case SentStatus.Successful:
<td style="background-color:#2AD51B">@property.GetValue(item, null)</td>
break;
case SentStatus.Unsuccessful:
<td style="background-color:#C70000">@property.GetValue(item, null)</td>
break;
case SentStatus.pending :
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
break;
case SentStatus.IN_PROGRESS :
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
break;
case SentStatus.NOT_FOUND:
<td style="background-color:#F19109">@property.GetValue(item, null)</td>
break;
case SentStatus.Unknown:
<td style="background-color:#932D2D">@property.GetValue(item, null)</td>
break;
default:
<td>@property.GetValue(item, null)</td>
break;
}
}
else
{
<td>@property.GetValue(item, null)</td>
@@ -70,14 +108,36 @@
}
}
if (id > 0)
if (item.ToString() == "Shared.DTOs.SentTaxDto")
{
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
if (convertmodel.SentStatus == SentStatus.Send
|| 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>
}
else if (convertmodel.SentStatus == SentStatus.Unsuccessful)
{
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
}
else
{
<td><button type="button" class="btn btn-link disabled">...</button></td>
}
}
else
{
<td><button type="button" class="btn btn-link disabled">ویرایش</button></td>
if (id > 0)
{
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
}
else
{
<td><button type="button" class="btn btn-link disabled">ویرایش</button></td>
}
}
}
</tr>