public override bool UpdateToDB(DBManager db) { if (_paidGroupID <= 0) { return(false); } String[] key = { "paid_group_id", "name", "current_round", "rate_info" }; String[] val = { _paidGroupID.ToString(), _name, _currentRound.ToString(), PaidRateInfo.ToString(_rateInfo) }; return((db.Update("paid_group", key, val, "paid_group_id=" + _paidGroupID) > 0) ? true : false); }
public override bool AddToDB(DBManager db) { String[] key = { "paid_group_id", "name", "current_round", "rate_info" }; String[] val = { _paidGroupID.ToString(), _name, _currentRound.ToString(), PaidRateInfo.ToString(_rateInfo) }; return((db.Insert("paid_group", key, val) > 0) ? true : false); }