IDP质量设计图纸管理
This commit is contained in:
+60
-7
@@ -39,13 +39,13 @@ namespace BLL
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public static Dictionary<string ,string >WebEditList= new Dictionary<string ,string >();
|
||||
public static Dictionary<string, string> WebEditList = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// 数据库连接字符串
|
||||
/// </summary>
|
||||
private static string connString;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据库连结字符串。
|
||||
/// </summary>
|
||||
@@ -294,7 +294,7 @@ namespace BLL
|
||||
DDL.Items.Insert(0, new FineUIPro.ListItem("- 请选择 -", BLL.Const._Null));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 为目标下拉框加上选择内容
|
||||
/// </summary>
|
||||
@@ -623,11 +623,64 @@ namespace BLL
|
||||
Random rm = new Random(System.Environment.TickCount);
|
||||
if (dateTime.HasValue)
|
||||
{
|
||||
str= dateTime.Value.ToString("yyyyMMddhhmmss") + rm.Next(1000, 9999).ToString();
|
||||
str = dateTime.Value.ToString("yyyyMMddhhmmss") + rm.Next(1000, 9999).ToString();
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
#region 时间戳
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前时间的时间戳
|
||||
/// </summary>
|
||||
/// <param name="size">时间戳长度(默认10位)</param>
|
||||
/// <returns></returns>
|
||||
public static long GetNowTimeStamp(int size = 10)
|
||||
{
|
||||
long result = 0;
|
||||
// 获取当前时间
|
||||
DateTimeOffset now = DateTimeOffset.Now;
|
||||
// 获取Unix纪元时间(1970-01-01)到现在的时间间隔
|
||||
TimeSpan timeSpan = now - new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
if (size == 13)
|
||||
{
|
||||
// 转换为长整型的毫秒数
|
||||
result = (long)timeSpan.TotalMilliseconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = (long)timeSpan.TotalSeconds;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定时间的时间戳
|
||||
/// </summary>
|
||||
/// <param name="dateOffset"></param>
|
||||
/// <param name="size"></param>
|
||||
/// <returns></returns>
|
||||
public static long GetDateTimeStamp(DateTimeOffset dateOffset, int size = 10)
|
||||
{
|
||||
long result = 0;
|
||||
DateTimeOffset epochStart = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
// 获取Unix纪元时间(1970-01-01)到现在的时间间隔
|
||||
TimeSpan timeSpan = dateOffset - epochStart;
|
||||
if (size == 13)
|
||||
{
|
||||
// 转换为长整型的毫秒数
|
||||
result = (long)timeSpan.TotalMilliseconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = (long)timeSpan.TotalSeconds;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 时间转换
|
||||
/// <summary>
|
||||
/// 输入文本转换时间类型
|
||||
@@ -639,7 +692,7 @@ namespace BLL
|
||||
{
|
||||
if (!String.IsNullOrEmpty(time))
|
||||
{
|
||||
DateTime dateTime = DateTime.Parse(time);
|
||||
DateTime dateTime = DateTime.Parse(time);
|
||||
if (dateTime.Year > 1753 && dateTime.Year < 9999)
|
||||
{
|
||||
return dateTime;
|
||||
@@ -950,7 +1003,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
#region 获取大写金额事件
|
||||
public static string NumericCapitalization(decimal num)
|
||||
public static string NumericCapitalization(decimal num)
|
||||
{
|
||||
string str1 = "零壹贰叁肆伍陆柒捌玖"; //0-9所对应的汉字
|
||||
string str2 = "万仟佰拾亿仟佰拾万仟佰拾元角分"; //数字位所对应的汉字
|
||||
@@ -1081,7 +1134,7 @@ namespace BLL
|
||||
return str.ToArray();
|
||||
}
|
||||
|
||||
public static string GetStringByArray(string[] array)
|
||||
public static string GetStringByArray(string[] array)
|
||||
{
|
||||
string str = string.Empty;
|
||||
foreach (var item in array)
|
||||
|
||||
Reference in New Issue
Block a user