Esempio n. 1
0
		public static List<PlayerOpponentSummary> GetList(SafeDataReader dr)
		{
			var list = new List<PlayerOpponentSummary>();
			while (dr.Read())
				list.Add(PlayerOpponentSummary.Get(dr));
			return list;
		}
Esempio n. 2
0
		public static List<PlayerMatch> GetListAll(SafeDataReader dr)
		{
			var list = new List<PlayerMatch>();
			while (dr.Read())
				list.Add(PlayerMatch.Get(dr));
			return list;
		}
Esempio n. 3
0
		public static List<MatchSummary> GetList(SafeDataReader dr)
		{
			var list = new List<MatchSummary>();
			while (dr.Read())
				list.Add(MatchSummary.Get(dr));
			dr.Close();
			return list;
		}
Esempio n. 4
0
		public static List<PlayerMatch> GetListMostRecent(SafeDataReader dr, int n)
		{
			var list = new List<PlayerMatch>();
			while (dr.Read() && n-- > 0)
				list.Add(PlayerMatch.Get(dr));
			dr.Close();
			return list;
		}
Esempio n. 5
0
		//protected override void DataPortal_Fetch(object Criteria)
		//{
		//    Criteria crit = (Criteria)Criteria;
		//    using (SafeDataReader dr = DbHelper.ExecuteReader("csla_get_event", crit.ID))
		//    {
		//        if (!dr.Read())
		//        {
		//            throw new RecordNotFoundException(string.Format("Event not found (ID:{0})", crit.ID));
		//        }
		//        _Fetch(dr);
		//    }
		//    MarkOld();
		//}

		//protected override void DataPortal_Insert()
		//{
		//    Util.CheckAddAccess();

		//    //insert or update object data into database 
		//    log.Debug("updating event " + ToString());

		//    DbResultsDictionary ret = DbHelper.ExecuteNonQuery("csla_save_event", Util.IDParam(_ID, IsNew), _Name, _ClassificationID, _BeginDate.DbValue, _EndDate.DbValue, _EventType, _TeamPlay);
		//    _ID = (int)ret["@ID"];
		//    log.Info(string.Format("New id is {0}", _ID));
		//}

		//protected override void DataPortal_Update()
		//{
		//    Util.CheckEditAccess();

		//    //insert or update object data into database 
		//    log.Debug("updating event " + ToString());

		//        DbResultsDictionary ret = DbHelper.ExecuteNonQuery("csla_save_event", Util.IDParam(_ID, IsNew), _Name, _ClassificationID, _BeginDate.DbValue, _EndDate.DbValue, _EventType, _TeamPlay);
		//        if (IsNew)
		//        {
		//            _ID = (int)ret["@ID"];
		//            log.Info(string.Format("New id is {0}", _ID));
		//        }
		//}

		//protected override void DataPortal_DeleteSelf()
		//{
		//    Util.CheckDeleteAccess();
		//    DbHelper.ExecuteNonQuery("csla_delete_event", ID);
		//}

		//protected override void DataPortal_Delete(object Criteria)
		//{
		//    Criteria crit = (Criteria)Criteria;
		//    DbHelper.ExecuteNonQuery("csla_delete_event", crit.ID);
		//}
		#endregion


		public static List<TennisEvent> GetList(SafeDataReader dr)
		{
			var list = new List<TennisEvent>();
			while (dr.Read())
				list.Add(TennisEvent.Get(dr));
			return list;
		}