public SessionGameGroupGameOrder(DsnConnection odbc, DataSet dataset)
            : base(odbc, dataset
                   , dataset.Tables[SessionTable.TableName] as XDataTable
                   , new MySQLRelationMap(new object[] {
            dataset.Tables[SessionTable.TableName] as XDataTable
            , MySQLRelationMap.MapOp.SaveRelationPoint
            , MySQLRelationMap.MapOp.FollowTo
            , PackGroupTable.TableName
            , MySQLRelationMap.MapOp.InvokNameChangeEvent
            , MySQLRelationMap.MapOp.FollowTo
            , GameTable.TableName
            , MySQLRelationMap.MapOp.InvokNameChangeEvent
        }).ToString()
                   //, ".session_has_game_group.\\game_group_in_session$/game_group_has_game.\\game_in_game_group$"
                   , false
                   , false
                   , new DataColumn[] { new DataColumn("game_number", typeof(int))
                                        , new DataColumn("ball_timer", typeof(int))
                                        , new DataColumn("overlap_prior", typeof(bool))
                                        , new DataColumn("progressive", typeof(bool))
                                        , new DataColumn("bonanza", typeof(bool))
                                        , new DataColumn("wild", typeof(bool))
                                        , new DataColumn("double_wild", typeof(bool))
                                        , new DataColumn("blind", typeof(bool))
                                        , new DataColumn("single_hotball", typeof(bool))
                                        , new DataColumn(ColorInfoTable.PrimaryKey, XDataTable.DefaultAutoKeyType) }
                   )
        {
            foreach (string name in DataColumns)
            {
                this.Columns[name].AllowDBNull  = false;
                this.Columns[name].DefaultValue = 0;
            }
            if (dataset != null)
            {
                DataTable child;
                dataset.Relations.Add(SessionGameGroupGameOrder.color_name = MySQLDataTable.StripPlural(MySQLDataTable.StripInfo(SessionGameGroupGameOrder.TableName))
                                                                             + "_is_"
                                                                             + MySQLDataTable.StripPlural(MySQLDataTable.StripInfo(ColorInfoTable.TableName))
                                      , dataset.Tables[ColorInfoTable.TableName].Columns[ColorInfoTable.PrimaryKey]
                                      , (child = dataset.Tables[SessionGameGroupGameOrder.TableName]).Columns[ColorInfoTable.PrimaryKey]
                                      );
                ForeignKeyConstraint fkc = child.Constraints[color_name] as ForeignKeyConstraint;
                if (fkc != null)
                {
                    fkc.DeleteRule = Rule.SetNull;
                }
            }

            number_column = NumberColumn;
            AddingRow    += new OnNewRow(initrow);
            FixupRow     += new OnFixupRow(SessionGameGroupGameOrder_FixupRow);

            //Create();
            //base.Fill(null, NumberColumn+",overlap_prior");

            ColumnChanged += new DataColumnChangeEventHandler(SessionGameGroupGameOrder_ColumnChanged);
        }
Example #2
0
        void Init()
        {
            base.TableName = TableName;
            //Columns.Add( "Name", typeof( string ) );
            //Columns.Add( SessionPrizeOrder.NumberColumn, typeof( int ) );

            AddingRow += new OnNewRow(initrow);

            FixupRow        += new OnFixupRow(SessionGameGroupPrizeOrder_FixupRow);
            this.RowChanged += new DataRowChangeEventHandler(SessionPrizeMetaRelation_RowChanging);
            //Create();
        }
Example #3
0
        public SessionGameOrder(DsnConnection odbc, DataSet dataset)
            : base(odbc, dataset
                   , new DataColumn[] { new DataColumn("ball_timer", typeof(int))
                                        , new DataColumn("overlap_prior", typeof(bool))
                                        , new DataColumn("progressive", typeof(bool))
                                        , new DataColumn("bonanza", typeof(bool))
                                        , new DataColumn("wild", typeof(bool))
                                        , new DataColumn("double_wild", typeof(bool))
                                        , new DataColumn("blind", typeof(bool))
                                        , new DataColumn("single_hotball", typeof(bool))
                                        , new DataColumn(ColorInfoTable.PrimaryKey, XDataTable.DefaultAutoKeyType) }
                   )
        {
            if (dataset != null)
            {
                DataTable child;

                /*
                 * dataset.Relations.Add( SessionGameGroupGameOrder.color_name = MySQLDataTable.StripPlural( MySQLDataTable.StripInfo( SessionGameGroupGameOrder.TableName ) )
                 + "_is_"
                 + MySQLDataTable.StripPlural( MySQLDataTable.StripInfo( ColorInfoTable.TableName ) )
                 + , dataset.Tables[ColorInfoTable.TableName].Columns[ColorInfoTable.PrimaryKey]
                 + , ( child = dataset.Tables[SessionGameGroupGameOrder.TableName] ).Columns[ColorInfoTable.PrimaryKey]
                 + );
                 + ForeignKeyConstraint fkc = child.Constraints[color_name] as ForeignKeyConstraint;
                 + if( fkc != null )
                 + fkc.DeleteRule = Rule.SetNull;
                 */
            }

            //number_column = NumberColumn;
            AddingRow += new OnNewRow(initrow);
            FixupRow  += new OnFixupRow(SessionGameGroupGameOrder_FixupRow);

            //Create();
            //base.Fill(null, NumberColumn+",overlap_prior");

            ColumnChanged += new DataColumnChangeEventHandler(SessionGameGroupGameOrder_ColumnChanged);
        }