예제 #1
0
        protected override bool IsValid(PropertyValidatorContext context)
        {
            if (context.PropertyValue == null)
            {
                return(true);
            }

            var _String = context.PropertyValue.ToString();

            return(CreditCodeUtility.Validate(_String));
        }
예제 #2
0
            /// <summary>
            /// 获取社会统一信用代码
            /// </summary>
            /// <param name="CreditCode"></param>
            /// <returns></returns>
            public static string GetOrgCode(string CreditCode)
            {
                CreditCodeUtility server = new CreditCodeUtility(CreditCode);

                return(server.GetOrgCode());
            }
예제 #3
0
            /// <summary>
            /// 校验社会统一信用代码
            /// </summary>
            /// <param name="orgcode"></param>
            /// <returns></returns>
            public static bool Validate(string CreditCode)
            {
                CreditCodeUtility server = new CreditCodeUtility(CreditCode);

                return(server.Validate());
            }