Ejemplo n.º 1
0
 /// <summary>
 /// 用户信息注册
 /// </summary>
 /// <param name="userEo"></param>
 /// <returns></returns>
 public int RegisetUser(UserinfoEO userEo)
 {
     if (userEo != null)
     {
         return(userInfoMo.Add(userEo));
     }
     return(-1);
 }
Ejemplo n.º 2
0
        public string UserRegister(string dataStr)
        {
            //转为json对象
            JObject    jo     = (JObject)JsonConvert.DeserializeObject(dataStr);
            UserinfoEO userEo = new UserinfoEO();

            userEo.UserId          = Convert.ToUInt32(jo["userId"].ToString());
            userEo.OpenId          = jo["openId"].ToString();
            userEo.NickName        = jo["nickName"].ToString();
            userEo.RealName        = jo["realName"].ToString();
            userEo.Sex             = string.IsNullOrEmpty(jo["sex"].ToString()) ? 0 : Convert.ToInt32(jo["sex"].ToString());
            userEo.IdCard          = jo["idCard"].ToString();
            userEo.Country         = jo["country"].ToString();
            userEo.Province        = jo["province"].ToString();
            userEo.City            = jo["city"].ToString();
            userEo.HeadImgUrl      = jo["headImgUrl"].ToString();
            userEo.IsParent        = string.IsNullOrEmpty(jo["isParent"].ToString()) ? 0 : Convert.ToInt32(jo["isParent"].ToString());
            userEo.Phone           = jo["phone"].ToString();
            userEo.IsNew           = string.IsNullOrEmpty(jo["isNew"].ToString()) ? 0 : Convert.ToInt32(jo["isNew"].ToString());
            userEo.IsVip           = string.IsNullOrEmpty(jo["isVip"].ToString()) ? 0 : Convert.ToInt32(jo["isVip"].ToString());;
            userEo.VipId           = jo["vipId"].ToString();
            userEo.IsHighLevel     = string.IsNullOrEmpty(jo["isHighLevel"].ToString()) ? 0 : Convert.ToInt32(jo["isHighLevel"].ToString());
            userEo.CoverImg        = jo["coverImg"].ToString();
            userEo.Career          = jo["career"].ToString();
            userEo.LoveCount       = string.IsNullOrEmpty(jo["loveCount"].ToString()) ? 0 : Convert.ToInt32(jo["loveCount"].ToString());
            userEo.Feature         = jo["feature"].ToString();
            userEo.AddTime         = jo["addTime"].ToString();
            userEo.IsForbiden      = string.IsNullOrEmpty(jo["isForbiden"].ToString()) ? 0 : Convert.ToInt32(jo["isForbiden"].ToString());
            userEo.Height          = jo["height"].ToString();
            userEo.Birthday        = jo["birthday"].ToString();
            userEo.GirlOrBoyFriend = string.IsNullOrEmpty(jo["girlOrBoyFriend"].ToString()) ? 0 : Convert.ToInt32(jo["girlOrBoyFriend"].ToString());
            userEo.Shape           = string.IsNullOrEmpty(jo["shape"].ToString()) ? 0 : Convert.ToInt32(jo["shape"].ToString());
            userEo.Education       = string.IsNullOrEmpty(jo["education"].ToString()) ? 0 : Convert.ToInt32(jo["education"].ToString());
            userEo.Dirnk           = string.IsNullOrEmpty(jo["dirnk"].ToString()) ? 0 : Convert.ToInt32(jo["dirnk"].ToString());
            userEo.Smoke           = string.IsNullOrEmpty(jo["smoke"].ToString()) ? 0 : Convert.ToInt32(jo["smoke"].ToString());
            userEo.Marriage        = string.IsNullOrEmpty(jo["marriage"].ToString()) ? 0 : Convert.ToInt32(jo["marriage"].ToString());
            userEo.Salary          = jo["salary"].ToString();
            userEo.Car             = jo["car"].ToString();
            userEo.House           = jo["house"].ToString();
            userEo.Children        = string.IsNullOrEmpty(jo["children"].ToString()) ? 0 : Convert.ToInt32(jo["children"].ToString());
            userEo.Household       = string.IsNullOrEmpty(jo["household"].ToString()) ? "" : jo["household"].ToString();
            userEo.Settle          = string.IsNullOrEmpty(jo["settle"].ToString()) ? "" : jo["settle"].ToString();

            int res = -1;

            if (userEo != null)
            {
                res = userInfoBLL.RegisetUser(userEo);
            }
            string json = JsonConvert.SerializeObject(res);

            return(json);
        }
Ejemplo n.º 3
0
 public void GetUserInfoDetail(string userId)
 {
     //获取玩家详细信息
     if (!string.IsNullOrEmpty(userId))
     {
         UserinfoEO userInfoDetail = userInfoBLL.GetUserInfoDetail(userId);
         if (userInfoDetail != null)
         {
             string json = JsonConvert.SerializeObject(userInfoDetail);
             Context.Response.Write(json);
             Context.Response.End();
         }
     }
 }
Ejemplo n.º 4
0
        public string UserRegister(string userId,
                                   string openId,
                                   string nickName        = null,
                                   string realName        = null,
                                   string sex             = null,
                                   string country         = null,
                                   string province        = null,
                                   string city            = null,
                                   string headImgUrl      = null,
                                   string isParent        = null,
                                   string phone           = null,
                                   string career          = null,
                                   string height          = null,
                                   string birthday        = null,
                                   string girlOrBoyFriend = null,
                                   string shape           = null,
                                   string education       = null,
                                   string dirnk           = null,
                                   string smoke           = null,
                                   string marriage        = null,
                                   string salary          = null,
                                   string car             = null,
                                   string house           = null,
                                   string children        = null)
        {
            UserinfoEO userEo = new UserinfoEO();

            userEo.UserId          = Convert.ToUInt32(userId);
            userEo.OpenId          = openId;
            userEo.NickName        = nickName;
            userEo.RealName        = realName;
            userEo.Sex             = string.IsNullOrEmpty(sex) ? 0 : Convert.ToInt32(sex);
            userEo.IdCard          = "";
            userEo.Country         = country;
            userEo.Province        = province;
            userEo.City            = city;
            userEo.HeadImgUrl      = headImgUrl;
            userEo.IsParent        = string.IsNullOrEmpty(isParent) ? 0 : Convert.ToInt32(isParent);
            userEo.Phone           = phone;
            userEo.IsNew           = 0;
            userEo.IsVip           = 0;
            userEo.VipId           = "-1";
            userEo.IsHighLevel     = 0;
            userEo.CoverImg        = "-1";
            userEo.Career          = career;
            userEo.LoveCount       = 0;
            userEo.Feature         = "";
            userEo.AddTime         = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            userEo.IsForbiden      = 0;
            userEo.Height          = height;
            userEo.Birthday        = birthday;
            userEo.GirlOrBoyFriend = string.IsNullOrEmpty(girlOrBoyFriend) ? 0 : Convert.ToInt32(girlOrBoyFriend);
            userEo.Shape           = string.IsNullOrEmpty(shape) ? 0 : Convert.ToInt32(shape);
            userEo.Education       = string.IsNullOrEmpty(education) ? 0 : Convert.ToInt32(education);
            userEo.Dirnk           = string.IsNullOrEmpty(dirnk) ? 0 : Convert.ToInt32(dirnk);
            userEo.Smoke           = string.IsNullOrEmpty(smoke) ? 0 : Convert.ToInt32(smoke);
            userEo.Marriage        = string.IsNullOrEmpty(marriage) ? 0 : Convert.ToInt32(marriage);
            userEo.Salary          = salary;
            userEo.Car             = car;
            userEo.House           = house;
            userEo.Children        = string.IsNullOrEmpty(children) ? 0 : Convert.ToInt32(children);
            userEo.Household       = "";
            userEo.Settle          = "";

            int res = -1;

            if (userEo != null)
            {
                res = userInfoBLL.RegisetUser(userEo);
            }
            string json = JsonConvert.SerializeObject(res);

            return(json);
        }