public int Update(MemberFavInfo model) { string strSql = SQL_UPDATE + PK_PARA_SET; DbParameter[] paras = makeParameterForUpdate(model); return(Db.Helper.ExecuteNonQuery(strSql, paras)); }
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)); }
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)); }
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); }
public int Add(MemberFavInfo model) { DbParameter[] paras = makeParameterForAdd(model); return(Db.Helper.ExecuteNonQuery(SQL_ADD, paras)); }
public int Add(MemberFavInfo model, DbTransaction tran) { DbParameter[] para = makeParameterForAdd(model); return(Db.Helper.ExecuteNonQuery(tran, SQL_ADD, para)); }