Esempio n. 1
0
 public DataOfUserDetial()
 {
     loc      = new LocOfDetial();
     loginLog = new LoginLogOfDetial();
     settings = new SettingsOfDetial();
     friends  = new DataOfFriends();
 }
Esempio n. 2
0
 /// <summary>
 /// 更新到数据库
 /// </summary>
 public void UpdateDetial()
 {
     lock (Applicate.AccountDbContext)
     {
         SQLiteDBContext.DBAutoConnect();
         var result = Applicate.AccountDbContext.Friends.FirstOrDefault(f => f.toUserId == this.toUserId);
         if (result == null)
         {
             result = new DataOfFriends();
         }
         result.active           = this.active;
         result.areaCode         = this.areaCode;
         result.areaId           = this.areaId;
         result.attCount         = this.attCount;
         result.balance          = this.balance;
         result.birthday         = this.birthday;
         result.cityId           = this.cityId;
         result.companyId        = this.companyId;
         result.countryId        = this.countryId;
         result.createTime       = this.createTime;
         result.description      = this.description;
         result.fansCount        = this.fansCount;
         result.friendsCount     = this.friendsCount;
         result.idcard           = this.idcard;
         result.idcardUrl        = this.idcardUrl;
         result.isAuth           = this.isAuth;
         result.level            = this.level;
         result.modifyTime       = this.modifyTime;
         result.name             = this.name;
         result.nickname         = this.nickname;
         result.num              = this.num;
         result.offlineNoPushMsg = this.offlineNoPushMsg;
         result.onlinestate      = this.onlinestate;
         result.password         = this.password;
         result.phone            = this.phone;
         result.provinceId       = this.provinceId;
         result.sex              = this.sex;
         //result.status = this.status;
         result.telephone     = this.telephone;
         result.totalConsume  = this.totalConsume;
         result.totalRecharge = this.totalRecharge;
         result.toUserId      = this.toUserId;
         result.toNickname    = this.nickname;
         result.userKey       = this.userKey;
         result.userType      = this.userType;
         result.vip           = this.vip;
         Applicate.AccountDbContext.Entry(result).State = EntityState.Modified;
         Applicate.AccountDbContext.SaveChanges();
     }
 }
Esempio n. 3
0
        public void UpdateDataOfUserDetial()
        {
            DataOfFriends friendObj = new DataOfFriends()
            {
                toUserId = this.userId
            }.GetByUserId();;

            if (friendObj != null)
            {
                friendObj.active           = this.active;
                friendObj.areaCode         = this.areaCode;
                friendObj.areaId           = this.areaId;
                friendObj.attCount         = this.attCount;
                friendObj.balance          = this.balance;
                friendObj.birthday         = this.birthday;
                friendObj.cityId           = this.cityId;
                friendObj.companyId        = this.companyId;
                friendObj.countryId        = this.countryId;
                friendObj.createTime       = this.createTime;
                friendObj.description      = this.description;
                friendObj.fansCount        = this.fansCount;
                friendObj.friendsCount     = this.friendsCount;
                friendObj.idcard           = this.idcard;
                friendObj.idcardUrl        = this.idcardUrl;
                friendObj.isAuth           = this.isAuth;
                friendObj.level            = this.level;
                friendObj.modifyTime       = this.modifyTime;
                friendObj.name             = this.name;
                friendObj.nickname         = this.nickname;
                friendObj.num              = this.num;
                friendObj.offlineNoPushMsg = this.offlineNoPushMsg;
                friendObj.onlinestate      = this.onlinestate;
                friendObj.password         = this.password;
                friendObj.phone            = this.phone;
                friendObj.provinceId       = this.provinceId;
                friendObj.sex              = this.sex;
                friendObj.avatarName       = this.avatarName;
                friendObj.status           = this.status;
                friendObj.telephone        = this.Telephone;
                friendObj.totalConsume     = this.totalConsume;
                friendObj.totalRecharge    = this.totalRecharge;
                friendObj.userId           = this.userId;
                friendObj.userKey          = this.userKey;
                friendObj.userType         = this.userType;
                friendObj.vip              = this.vip;
                friendObj.avatarName       = this.avatarName;
                friendObj.Update();
            }
        }
Esempio n. 4
0
        public DataOfFriends toModel(string strJson)
        {
            DataOfFriends msgObj = JsonConvert.DeserializeObject <DataOfFriends>(strJson);

            return(msgObj);
        }