Ejemplo n.º 1
0
        //
        //检查身份证号码
        public JsonResult VerifyIdCard(string idcard)
        {
            ValidObj validObj = new ValidObj();
            bool     result   = CommonTools.Verify(idcard);

            validObj.valid = result;
            return(Json(validObj, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        //检查用户名重复
        public JsonResult CheckEmail(string CustomerEmail)
        {
            ValidObj validObj = new ValidObj();
            bool     result;
            var      adscustomers = unitOfWork.adsCustomersRepository.Get(filter: u => u.CustomerEmail == CustomerEmail);

            if (adscustomers.Count() > 0)
            {
                result = false;
            }
            else
            {
                result = true;
            }
            validObj.valid = result;
            return(Json(validObj, JsonRequestBehavior.AllowGet));
        }