Example #1
0
        public int Update(MemberFavInfo model)
        {
            string strSql = SQL_UPDATE + PK_PARA_SET;

            DbParameter[] paras = makeParameterForUpdate(model);
            return(Db.Helper.ExecuteNonQuery(strSql, paras));
        }
Example #2
0
        public int Update(MemberFavInfo model, DbTransaction tran)
        {
            string strSql = SQL_UPDATE + PK_PARA_SET;

            DbParameter[] para = makeParameterForUpdate(model);
            return(Db.Helper.ExecuteNonQuery(tran, strSql, para));
        }
Example #3
0
 private void fillModel(DbDataReader dr, MemberFavInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.UserName    = dr.GetString(1);
     model.FavType     = dr.GetString(2);
     model.FavObjID    = dr.GetString(3);
     model.AddTime     = dr.GetDateTime(4);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(5));
 }
Example #4
0
 private DbParameter[] makeParameterForAdd(MemberFavInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@UserName",    model.UserName),
         Db.Helper.MakeInParameter("@FavType",     model.FavType),
         Db.Helper.MakeInParameter("@FavObjID",    model.FavObjID),
         Db.Helper.MakeInParameter("@AddTime",     model.AddTime),
         Db.Helper.MakeInParameter("@ExtraFields", FieldsHelper.XmlSerialize(model.ExtraFields))
     };
     return(paras);
 }
Example #5
0
 public int Add(MemberFavInfo model)
 {
     DbParameter[] paras = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(SQL_ADD, paras));
 }
Example #6
0
 public int Add(MemberFavInfo model, DbTransaction tran)
 {
     DbParameter[] para = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(tran, SQL_ADD, para));
 }