生产任务排产,新增 任务 下发、开始、关闭、完成 接口
This commit is contained in:
@@ -938,5 +938,16 @@ public static class StringExtensions
|
||||
return kq * q / ((kq * q) + (kr * r) + (ks * s));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字符串转枚举
|
||||
/// </summary>
|
||||
/// <typeparam name="T">枚举类型</typeparam>
|
||||
/// <param name="value">字符串值</param>
|
||||
/// <returns>枚举值</returns>
|
||||
public static T ToEnum<T>(this string value)
|
||||
{
|
||||
return (T)System.Enum.Parse(typeof(T), value, true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user