Hi i need to round up to Zero Value (end value to be 0, like 450, 55000, 4560). Hi i want to round up the value with ending zero eg if i got value like 102498 means 102500 and if i got value like 47504 means 47500 this i have to do in mvc
eg values
999 =>1000
994=>990.
995=>990
I want to round up the value and end value is zero of each one
My View Code
| Test Name | Total hrs | Rate/Hr | Margin | Discount | Total Cost | Total Cost With Discount | Remarks | |
|---|---|---|---|---|---|---|---|---|
| @item.TestName | @item.TotalHours | @item.PerHourRate | @item.Margin) | @item.Discount) | @{double totamt = item.PerHourRate * item.TotalHours; totRC += totamt; totamt += totamt * item.Margin * 0.01; totCost += totamt; } @Math.Round(totamt) | @{double totamtWithDisc = totamt - (totamt * item.Discount * 0.01); totWithDisc += totamtWithDisc; } @Math.Round(totamtWithDisc) | @item.Remarks |
In the above table i have to round off the **TOTAL COST VALUE** .Please any one understand my issue help me to resolve this issue.Thanks.
Jignesh KumarPosted Jul 17, 2020, 11:51 PM
Atul WaradePosted Jul 17, 2020, 10:50 PM
Farhan AhmedPosted Jul 17, 2020, 8:40 AM