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

            DbParameter[] paras = makeParameterForUpdate(model);
            return(Db.Helper.ExecuteNonQuery(strSql, paras));
        }
예제 #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));
        }
예제 #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));
 }
예제 #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);
 }
예제 #5
0
 public int Add(MemberFavInfo model)
 {
     DbParameter[] paras = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(SQL_ADD, paras));
 }
예제 #6
0
 public int Add(MemberFavInfo model, DbTransaction tran)
 {
     DbParameter[] para = makeParameterForAdd(model);
     return(Db.Helper.ExecuteNonQuery(tran, SQL_ADD, para));
 }