增加数据穿透界面
This commit is contained in:
@@ -1167,5 +1167,33 @@ namespace FineUIPro.Web
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据身份证号码获取年龄
|
||||
/// <summary>
|
||||
/// 根据身份证号码获取年龄
|
||||
/// </summary>
|
||||
/// <param name="IdentityCard"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertAgeByIdentityCard(object IdentityCard)
|
||||
{
|
||||
string age = string.Empty;
|
||||
if (IdentityCard != null)
|
||||
{
|
||||
DateTime? birth = IDCardValid.getBirthByIDCard(IdentityCard.ToString());
|
||||
if (birth.HasValue)
|
||||
{
|
||||
age = IDCardValid.CalculateAgeCorrect(birth.Value).ToString();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(age))
|
||||
{
|
||||
return age;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user