示例#1
0
        /// <summary>
        /// 更新用户细节
        /// </summary>
        /// <returns></returns>
        public void UpdateUserDetail(UserDetailInfo userDetailInfo)
        {
            DbParameter[] parms = {
                                       GenerateInParam("@lastvisittime",SqlDbType.DateTime,8,userDetailInfo.LastVisitTime),
                                       GenerateInParam("@lastvisitip",SqlDbType.Char,15,userDetailInfo.LastVisitIP),
                                       GenerateInParam("@lastvisitrgid",SqlDbType.SmallInt,2,userDetailInfo.LastVisitRgId),
									   GenerateInParam("@registertime",SqlDbType.DateTime,8,userDetailInfo.RegisterTime),
                                       GenerateInParam("@registerip",SqlDbType.Char,15,userDetailInfo.RegisterIP),
                                       GenerateInParam("@registerrgid",SqlDbType.SmallInt,2,userDetailInfo.RegisterRgId),
									   GenerateInParam("@gender",SqlDbType.TinyInt,1,userDetailInfo.Gender),
                                       GenerateInParam("@realname",SqlDbType.NVarChar,10,userDetailInfo.RealName),
									   GenerateInParam("@bday",SqlDbType.DateTime,8,userDetailInfo.Bday),
                                       GenerateInParam("@idcard",SqlDbType.VarChar,18,userDetailInfo.IdCard),
									   GenerateInParam("@regionid",SqlDbType.SmallInt,2,userDetailInfo.RegionId),
									   GenerateInParam("@address",SqlDbType.NVarChar,150,userDetailInfo.Address),
									   GenerateInParam("@bio",SqlDbType.NVarChar,300,userDetailInfo.Bio),
									   GenerateInParam("@uid",SqlDbType.Int,4,userDetailInfo.Uid)
								   };

            RDBSHelper.ExecuteScalar(CommandType.StoredProcedure,
                                     string.Format("{0}updateuserdetail", RDBSHelper.RDBSTablePre),
                                     parms);
        }
示例#2
0
文件: Users.cs 项目: qq550723504/zone
        /// <summary>
        /// 从IDataReader创建UserDetailInfo
        /// </summary>
        public static UserDetailInfo BuildUserDetailFromReader(IDataReader reader)
        {
            UserDetailInfo userDetailInfo = new UserDetailInfo();

            userDetailInfo.Uid = TypeHelper.ObjectToInt(reader["uid"]);
            userDetailInfo.LastVisitTime = TypeHelper.ObjectToDateTime(reader["lastvisittime"]);
            userDetailInfo.LastVisitIP = reader["lastvisitip"].ToString();
            userDetailInfo.LastVisitRgId = TypeHelper.ObjectToInt(reader["lastvisitrgid"]);
            userDetailInfo.RegisterTime = TypeHelper.ObjectToDateTime(reader["registertime"]);
            userDetailInfo.RegisterIP = reader["registerip"].ToString();
            userDetailInfo.RegisterRgId = TypeHelper.ObjectToInt(reader["registerrgid"]);
            userDetailInfo.Gender = TypeHelper.ObjectToInt(reader["gender"]);
            userDetailInfo.RealName = reader["realname"].ToString();
            userDetailInfo.Bday = TypeHelper.ObjectToDateTime(reader["bday"]);
            userDetailInfo.IdCard = reader["idcard"].ToString();
            userDetailInfo.RegionId = TypeHelper.ObjectToInt(reader["regionid"]);
            userDetailInfo.Address = reader["address"].ToString();
            userDetailInfo.Bio = reader["bio"].ToString();

            return userDetailInfo;
        }
示例#3
0
文件: Users.cs 项目: qq550723504/zone
 /// <summary>
 /// 更新用户细节
 /// </summary>
 /// <returns></returns>
 public static void UpdateUserDetail(UserDetailInfo userDetailInfo)
 {
     BrnMall.Data.Users.UpdateUserDetail(userDetailInfo);
 }
示例#4
0
文件: Users.cs 项目: qq550723504/zone
 /// <summary>
 /// 更新用户细节
 /// </summary>
 /// <returns></returns>
 public static void UpdateUserDetail(UserDetailInfo userDetailInfo)
 {
     BrnMall.Core.BMAData.RDBS.UpdateUserDetail(userDetailInfo);
     if (_usernosql != null)
         _usernosql.UpdateUserDetail(userDetailInfo);
 }