进度管理:工程量完成情况
This commit is contained in:
@@ -1250,6 +1250,59 @@ namespace BLL
|
||||
//return TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)).AddSeconds(timestamp);
|
||||
}
|
||||
|
||||
#region 去除后面多余的零
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="sResult"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(string sResult)
|
||||
{
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 去除后面多余的零
|
||||
/// </summary>
|
||||
/// <param name="dValue"></param>
|
||||
/// <returns></returns>
|
||||
public static string RemoveZero(decimal dValue)
|
||||
{
|
||||
string sResult = dValue.ToString();
|
||||
if (sResult.IndexOf(".") < 0)
|
||||
return sResult;
|
||||
int iIndex = sResult.Length - 1;
|
||||
for (int i = sResult.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (sResult.Substring(i, 1) != "0")
|
||||
{
|
||||
iIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sResult = sResult.Substring(0, iIndex + 1);
|
||||
if (sResult.EndsWith("."))
|
||||
sResult = sResult.Substring(0, sResult.Length - 1);
|
||||
return sResult;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static string RequestGet(string Baseurl, string Token)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
Reference in New Issue
Block a user