You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ICSSoft.FromERP { public class ConstWorkPoint { public const string WorkPoint = "6000"; public const string Muser = "job"; public const string Musername = "job"; }
public class Common { public static decimal TurnDecimal(decimal? deci) { decimal result = 0; if (!string.IsNullOrEmpty(deci.ToString())) { result = decimal.Parse(deci.ToString()); } return result; }
/// <summary>
/// 将c# DateTime时间格式转换为Unix时间戳格式
/// </summary>
/// <param name="time">时间</param>
/// <returns>long</returns>
public static long ConvertDateTimeToInt(System.DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0)); long t = (time.Ticks - startTime.Ticks) / 10000; //除10000调整为13位
return t; } } }
|