Exemple #1
0
        /// <summary>
        /// InsertInfo
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public long InsertInfo(UserMobileInfo info)
        {
            int cnt = dal.GetCounts("[UUID] = N'" + info.Uuid + "' and [USER_FID] = N'" + info.UserFid.GetValueOrDefault() + "'");

            if (cnt > 0)
            {
                throw new Exception("MC:3x00000026");///设备已注册
            }
            return(dal.Add(info));
        }
Exemple #2
0
 public UserMobileInfo QueryMobileByUserId(string userId)
 {
     using (var manager = new UserMobileManager())
     {
         UserMobileInfo info   = new UserMobileInfo();
         var            Mobile = manager.GetUserMobile(userId);
         if (Mobile == null)
         {
             return(info);
         }
         info.AuthFrom       = Mobile.AuthFrom;
         info.CreateBy       = Mobile.CreateBy;
         info.CreateTime     = Mobile.CreateTime;
         info.IsSettedMobile = Mobile.IsSettedMobile;
         info.Mobile         = Mobile.Mobile;
         info.RequestTimes   = Mobile.RequestTimes;
         info.UserId         = Mobile.UserId;
         return(info);
     }
 }