protected override bool IsValid(PropertyValidatorContext context) { if (context.PropertyValue == null) { return(true); } var _String = context.PropertyValue.ToString(); return(CreditCodeUtility.Validate(_String)); }
/// <summary> /// 获取社会统一信用代码 /// </summary> /// <param name="CreditCode"></param> /// <returns></returns> public static string GetOrgCode(string CreditCode) { CreditCodeUtility server = new CreditCodeUtility(CreditCode); return(server.GetOrgCode()); }
/// <summary> /// 校验社会统一信用代码 /// </summary> /// <param name="orgcode"></param> /// <returns></returns> public static bool Validate(string CreditCode) { CreditCodeUtility server = new CreditCodeUtility(CreditCode); return(server.Validate()); }