Example #1
0
        /// <summary>
        /// 手机号码是否存在?
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="mobile">手机号码</param>
        /// <returns>存在</returns>
        public bool Exists(BaseUserInfo userInfo, string mobile)
        {
            bool result = false;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();
                parameters.Add(new KeyValuePair <string, object>(BaseUserContactEntity.FieldMobile, mobile));
                var manager = new BaseUserContactManager(dbHelper, userInfo, BaseUserContactEntity.TableName);
                result      = manager.Exists(parameters, userInfo.Id);
            });
            return(result);
        }