แก้ไข การคำนวณ

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-07-09 12:32:34 +07:00
parent 15c1ec9841
commit 5f69d9c1df
4 changed files with 14 additions and 10 deletions

View File

@@ -426,6 +426,8 @@ public static class MyHelper
public static decimal RoundOff(decimal i, decimal round_number)
{
return (Math.Round(i / round_number)) * round_number;
string temp = i.ToString().Split(".")[0];
return Convert.ToDecimal(temp.Substring(0, temp.Length - 1)) * 10 + 10;
}
}