添加项目文件。

This commit is contained in:
zel
2025-03-05 19:42:01 +08:00
parent 659f1a2ad9
commit 47dcdeb55d
582 changed files with 242004 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using System;
namespace WaterCloud.Code
{
public class Utils
{
#region
/// <summary>
/// 表示全局唯一标识符 (GUID)。
/// </summary>
/// <returns></returns>
public static string GuId()
{
return IDGen.NextID().ToString();
}
/// <summary>
/// 自动生成编号 201008251145409865
/// </summary>
/// <returns></returns>
public static string CreateNo()
{
Random random = new Random();
string strRandom = random.Next(1000, 10000).ToString(); //生成编号
string code = DateTime.Now.ToString("yyyyMMddHHmmss") + strRandom;//形如
return code;
}
#endregion
public static string GetGuid()
{
return IDGen.NextID().ToString().Replace("-", string.Empty).ToLower();
}
}
}