/// <summary> /// Creates a fully populated session object /// </summary> /// <param name="bingoday"></param> /// <param name="session">DataRow from session_info table in OpenSkieScheduler</param> public BingoSession(DataRow session) { // this retains '75' as max_balls. DefaultCharacteristics(); this.schedule = session.Table.DataSet as ScheduleDataSet; BingoDealers.LoadDealers(schedule.packs); this.dataRowSession = session; this.session_name = session[SessionTable.NameColumn].ToString(); this.bingoday = DateTime.Now; this.session = 1; this.GameList = new BingoGameList(this); }
/// <summary> /// this specifically creates a BingoSession appropriate for RateRank application. /// </summary> /// <param name="schedule">OpenSkieSchedule.ScheduleDataset</param> /// <param name="bingoday">day to load</param> /// <param name="session_number">session number on that day to load</param> public BingoSession(ScheduleDataSet schedule, DateTime bingoday, int session_number) { // this retains '75' as max_balls. DefaultCharacteristics(); BingoDealers.LoadDealers(schedule.packs); this.dataRowSession = schedule.GetSession(bingoday, session_number); if (this.dataRowSession == null) { MessageBox.Show("Could not find session " + session_number + " scheduled on " + bingoday.ToShortDateString()); throw new Exception("Session Creation Failed"); } else { this.schedule = schedule; this.bingoday = bingoday; this.session = session_number; this.session_name = this.dataRowSession.ItemArray[7].ToString(); this.GameList = new BingoGameList(this); } }