@foreach (var result in Model)
{
////var num=Convert.ToInt32(x);
//int n=int.Parse(x);
//int n=Integer.parseInt(x);
if (Convert.ToInt64(@result.Difference) < 0)
{
<tr>
<td>@result.SalesIncentiveBuckets
</td>
<td>@result.CurrentMonth
</td>
<td>@result.SameMonthPrevYear
</td>
<td style="color:Red;">@result.Difference
</td>
<td>@result.BonusAmount
</td>
</tr>
}
else
{
<tr>
<td>@result.SalesIncentiveBuckets
</td>
<td>@result.CurrentMonth
</td>
<td>@result.SameMonthPrevYear
</td>
<td>@result.Difference
</td>
<td>@result.BonusAmount
</td>
</tr>
}
}
在我的模型中,差异是一个字符串,我想将其转换为整数我尽我所能尝试了所有方法,但它显示了这个错误:
输入字符串格式不正确