Exemple #1
0
 private DbParameter[] makeParameterForUpdate(SiteMemberInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@UserPwd",         model.UserPwd),
         Db.Helper.MakeInParameter("@RealName",        model.RealName),
         Db.Helper.MakeInParameter("@HeadPicPath",     model.HeadPicPath),
         Db.Helper.MakeInParameter("@Sex",             model.Sex),
         Db.Helper.MakeInParameter("@MobileNum",       model.MobileNum),
         Db.Helper.MakeInParameter("@IDNum",           model.IDNum),
         Db.Helper.MakeInParameter("@Email",           model.Email),
         Db.Helper.MakeInParameter("@QQ",              model.QQ),
         Db.Helper.MakeInParameter("@WeChat",          model.WeChat),
         Db.Helper.MakeInParameter("@TotalCost",       model.TotalCost),
         Db.Helper.MakeInParameter("@TotalPoints",     model.TotalPoints),
         Db.Helper.MakeInParameter("@UsedPoints",      model.UsedPoints),
         Db.Helper.MakeInParameter("@AddTime",         model.AddTime),
         Db.Helper.MakeInParameter("@Remarks",         model.Remarks),
         Db.Helper.MakeInParameter("@InviteNum",       model.InviteNum),
         Db.Helper.MakeInParameter("@InviterUserName", model.InviterUserName),
         Db.Helper.MakeInParameter("@InviterRealName", model.InviterRealName),
         Db.Helper.MakeInParameter("@ExtraFields",     FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@UserName",        model.UserName)
     };
     return(paras);
 }
Exemple #2
0
        public int Update(SiteMemberInfo model, DbTransaction tran)
        {
            string strSql = SQL_UPDATE + PK_PARA_SET;

            DbParameter[] para = makeParameterForUpdate(model);
            return(Db.Helper.ExecuteNonQuery(tran, strSql, para));
        }
Exemple #3
0
        public int Update(SiteMemberInfo model)
        {
            string strSql = SQL_UPDATE + PK_PARA_SET;

            DbParameter[] paras = makeParameterForUpdate(model);
            return(Db.Helper.ExecuteNonQuery(strSql, paras));
        }
Exemple #4
0
 private void fillModel(DbDataReader dr, SiteMemberInfo model)
 {
     model.UserName        = dr.GetString(0);
     model.UserPwd         = dr.GetString(1);
     model.RealName        = dr.GetString(2);
     model.HeadPicPath     = dr.GetString(3);
     model.Sex             = dr.GetString(4);
     model.MobileNum       = dr.GetString(5);
     model.IDNum           = dr.GetString(6);
     model.Email           = dr.GetString(7);
     model.QQ              = dr.GetString(8);
     model.WeChat          = dr.GetString(9);
     model.TotalCost       = dr.GetDecimal(10);
     model.TotalPoints     = dr.GetInt32(11);
     model.UsedPoints      = dr.GetInt32(12);
     model.AddTime         = dr.GetDateTime(13);
     model.Remarks         = dr.GetString(14);
     model.InviteNum       = dr.GetString(15);
     model.InviterUserName = dr.GetString(16);
     model.InviterRealName = dr.GetString(17);
     model.ExtraFields     = FieldsHelper.XmlDeserialize(dr.GetString(18));
 }
Exemple #5
0
 public int Add(SiteMemberInfo model, DbTransaction tran)
 {
     DbParameter[] para = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(tran, SQL_ADD, para));
 }
Exemple #6
0
 public int Add(SiteMemberInfo model)
 {
     DbParameter[] paras = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(SQL_ADD, paras));
 }