public void RegisterRequestMobile(string mobile) { var manager = new UserMobileManager(); var other = manager.GetMobileInfoByMobile(mobile); if (other != null && other.IsSettedMobile) { throw new ArgumentException(string.Format("此手机号【{0}】已被其他用户注册。", mobile)); } }
/// <summary> /// 手机号是否已注册 /// </summary> /// <param name="mobile"></param> /// <returns></returns> public bool HasMobile(string mobile) { var manager = new UserMobileManager(); { var model = manager.GetMobileInfoByMobile(mobile); if (model == null) { return(false); } return(true); } }