static SessionManagementState() { open_issue_buttons = new List <PSI_Button>(); open_play_buttons = new List <PSI_Button>(); open_sales_buttons = new List <PSI_Button>(); close_issue_buttons = new List <PSI_Button>(); close_sales_buttons = new List <PSI_Button>(); close_play_buttons = new List <PSI_Button>(); schedule = new ScheduleDataSet(StaticDsnConnection.dsn); schedule_currents = new ScheduleCurrents(schedule); schedule.Create(); schedule.Fill(); session_state = new SessionStateDataset(); DsnSQLUtil.MatchCreate(StaticDsnConnection.dsn, session_state); session_state.Fill(StaticDsnConnection.dsn); //DsnSQLUtil.FillDataSet( StaticDsnConnection.dsn, session_state, ); active_sessions = new DataView(session_state.session_day_sessions , "active_flag<>0" + " or open_for_sales_flag<>0" + " or open_for_issue_flag<>0" + " or open_for_play_flag<>0" , "bingoday,session_order", DataViewRowState.CurrentRows); if (active_sessions.Count > 0) { SessionManagementState.current_session = active_sessions[0].Row; } }
public ScheduleDesigner(OpenSkieScheduler.ScheduleDataSet schedule) { //schedule.SetTableReload( FormTableUpdate ); this.schedule = schedule; schedule_currents = new ScheduleCurrents(schedule); ControlList.schedule = schedule; ControlList.data = schedule_currents; InitializeComponent(); }
public PriceEditor2() { schedule = ControlList.schedule; price_data = schedule.session_price_data; current_price_data = schedule.Tables[CurrentPriceData.TableName] as CurrentPriceData; data = ControlList.data; data.SetSessionPriceExceptionSetCurrent += new ScheduleCurrents.OnSetCurrent(UpdatedCurrent); data.SetSessionCurrent += new ScheduleCurrents.OnSetCurrent(data_SetSessionCurrent); dsn = ControlList.schedule.schedule_dsn; InitializeComponent(); Disposed += new EventHandler(PriceEditor2_Disposed); }
public ConfigureGamePackPoints(OpenSkieScheduler3.ScheduleDataSet sched) { schedule = sched; schedule_currents = new ScheduleCurrents(schedule); current_points = new BindingSource(); points_table = sched.Tables[RankPointsExtended.TableName] as RankPointsExtended; if (points_table == null) { points_table = new BingoGameCore4.Database.RankPointsExtended(sched); } current_points.DataSource = points_table; InitializeComponent(); }
public ScheduleDesigner() { //OpenSkieSchedule.GamesRelateToSessions = true; //OpenSkieSchedule.UseGuid = true; //OpenSkieSchedule.PacksRelateToPrizes = true; schedule = new OpenSkieScheduler.ScheduleDataSet(StaticDsnConnection.dsn); schedule_currents = new ScheduleCurrents(schedule); schedule.Create(); // this requires p2p events. //schedule.SetTableReload( FormTableUpdate ); ControlList.schedule = schedule; ControlList.data = schedule_currents; schedule_currents = new ScheduleCurrents(schedule); InitializeComponent(); }
public SessionPlayer() { entropy = new Random(); schedule = new ScheduleDataSet(StaticDsnConnection.dsn); schedule.Fill(); currents = new ScheduleCurrents(schedule); pack_play_table = new DataTable(); pack_play_table.Columns.Add("Pack Name", typeof(String)); pack_play_table.Columns.Add("Min", typeof(int)); pack_play_table.Columns.Add("Max", typeof(int)); pack_play_table.Columns.Add("Avg", typeof(int)); pack_play_table.Columns.Add("percent average", typeof(int)); pack_play_table.Columns.Add("percent above average", typeof(int)); InitializeComponent(); }
public PackEditor(DataRow pack) { this.pack = pack; schedule = pack.Table.DataSet as ScheduleDataSet; data = new ScheduleCurrents(schedule); data.SetCurrentPack(pack); if (data == null) { MessageBox.Show("Pack must be in a Schedule dataset."); return; } cardset_range_id = CardsetRange.PrimaryKey; cardset_id = CardsetInfo.PrimaryKey; InitializeComponent(); this.FormClosing += new FormClosingEventHandler(PackEditor_FormClosing); }
public SnapshotSelector(ScheduleCurrents currents) { this.currents = currents; this.schedule = currents.Schedule; schedule.Clear(); this.schedule.snapshot = true; try { DataTable tmp = new SessionTable(); tmp.Prefix = ((DataTable)this.schedule.sessions).Prefix; tmp.TableName = ((DataTable)this.schedule.sessions).TableName; tmp.Columns[SessionTable.NameColumn].Unique = false; DsnSQLUtil.FillDataTable(schedule.schedule_dsn, tmp, null, null); snapshot_sessions = new DataView(tmp, null, SessionTable.PrimaryKey, DataViewRowState.CurrentRows); InitializeComponent(); } catch { this.schedule.snapshot = false; } }
static ItemManagmentState() { item_dataset = new ItemDataSet(); item_dataset.Init(); item_dataset_dsn = StaticDsnConnection.dsn; dataset_state = new DataSetConnection(item_dataset); dataset_state.Create(item_dataset_dsn); dataset_state.Fill(item_dataset_dsn); schedule = new ScheduleDataSet(); schedule_currents = new ScheduleCurrents(schedule); dvm_schedule = new DataViewManager(schedule); schedule.schedule_dsn = item_dataset_dsn; schedule.Create(); schedule.Fill(); current_electronic_items = schedule_currents.current_bundles; //current_macro_items = new DataView( item_dataset.macro_item_assignments, "Table1_meta_pos_macro_items.session=0", "name1", DataViewRowState.CurrentRows ); current_assigned_macro_items = new DataView(item_dataset.macro_item_assignments, "session=0", "name1,name2,receipt_string", DataViewRowState.CurrentRows); current_macro_items = new DataView(item_dataset.pos_macro_items, "session=0", "name1", DataViewRowState.CurrentRows); current_floor_paper_macro_items = new DataView(item_dataset.floor_item_map , "macro_item<>0 and Parent(macro_item_floor_item_map).session=0" , null , DataViewRowState.CurrentRows); current_floor_paper_paper_items = new DataView(item_dataset.floor_item_map , "paper_item<>0 or ( macro_item=0 and electronic_item=0 and misc_item=0) and floor_name<>'-None-'" , null , DataViewRowState.CurrentRows); current_floor_paper_misc_items = new DataView(item_dataset.floor_item_map , "misc_item<>0" , null , DataViewRowState.CurrentRows); current_floor_paper_elec_items = new DataView(item_dataset.floor_item_map , "electronic_item<>0" , null , DataViewRowState.CurrentRows); current_floor_paper_elec_items.Sort = "paper_item_name"; inventory_types = item_dataset.item_descriptions.DefaultView.ToTable(true, new string[] { "inv_type" }); current_items = new ItemDataView(); current_item_descriptions = new DataView(ItemManagmentState.item_dataset.item_descriptions , "" , "item_name" , DataViewRowState.CurrentRows); current_unassigned_items = new DataView(item_dataset.items , "item_description_id is NULL" , null , DataViewRowState.CurrentRows); object x = item_dataset.pos_macro_items.Compute("max(session)", null); if (x != null && DBNull.Value != x) { SetMaxSession(Convert.ToInt32(item_dataset.pos_macro_items.Compute("max(session)", null))); } scanner = new BarcodeScanner(); // later someone will register for the read data scanner.DataReceived += new BarcodeScanner.CallThisWithData(scanner_DataReceived); item_listboxes = new List <XListbox>(); item_serial_listboxes = new List <XListbox>(); inventory_type_listboxes = new List <XListbox>(); InitWebInterface(); }