...
This commit is contained in:
@@ -39,26 +39,38 @@
|
||||
int id = 0;
|
||||
foreach (PropertyInfo property in properties)
|
||||
{
|
||||
if (property.Name.ToLower()=="id")
|
||||
id =Convert.ToInt32(property.GetValue(item, null));
|
||||
|
||||
if (property.Name.ToLower() == "id")
|
||||
id = Convert.ToInt32(property.GetValue(item, null));
|
||||
|
||||
if (property.CustomAttributes.Any(w => w.AttributeType.Name == "DisplayAttribute"))
|
||||
{
|
||||
if (property.PropertyType == typeof(Nullable<System.Decimal>) || property.PropertyType == typeof(System.Decimal))
|
||||
{
|
||||
<td>
|
||||
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
|
||||
</td>
|
||||
</td>
|
||||
}
|
||||
else if (property.Name.ToLower() == "id")
|
||||
{
|
||||
if (id > 0)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td><button type="button" class="btn btn-link disabled">@property.GetValue(item, null)</button></td>
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@property.GetValue(item, null)</td>
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (id>0)
|
||||
if (id > 0)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||
}
|
||||
@@ -66,7 +78,7 @@
|
||||
{
|
||||
<td><button type="button" class="btn btn-link disabled">ویرایش</button></td>
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
|
Reference in New Issue
Block a user