Пример #1
0
        public IndividualTimedHeatEvent createHeat()
        {
            IndividualTimedHeatEvent ITHE = new IndividualTimedHeatEvent();

            ITHE.Name         = this.Name + " Heat";
            ITHE.Description  = this.Description;
            ITHE.Championship = this.Championship;
            this.Championship.addEvent(ITHE);

            ITHE.DataEntryTemplate   = this.DataEntryTemplate;
            ITHE.CertificateTemplate = this.CertificateTemplate;
            ITHE.ResultsTemplate     = this.ResultsTemplate;
            ITHE.VestTemplate        = this.VestTemplate;

            foreach (EventGroups er in this.Groups)
            {
                ITHE.addGroup(er.Group);
            }

            //ITHE.EventRanges = EventRanges.copyEventRanges(this.EventRanges);

            ITHE.MaxCompetitors            = MaxCompetitors;
            ITHE.MinCompetitors            = MinCompetitors;
            ITHE.MaxCompetitorsPerTeam     = MaxCompetitors;
            ITHE.MaxGuests                 = MaxGuests;
            ITHE.TopIndividualCertificates = TopIndividualCertificates;
            ITHE.TopLowerYearGroupInividualCertificates = TopLowerYearGroupInividualCertificates;
            ITHE.TeamASize = TeamASize;
            ITHE.TeamBSize = TeamBSize;
            ITHE.TeamBForScoringTeamOnly = TeamBForScoringTeamOnly;
            ITHE.ScoringTeams            = ScoringTeams;
            ITHE.Lanes = Lanes;


            ITHE.EventRanges.MaxCompetitors            = MaxCompetitorsPerHeat;
            ITHE.EventRanges.TopIndividualCertificates = 0;
            ITHE.EventRanges.TopLowerYearGroupInividualCertificates = 0;
            ITHE.EventRanges.TeamASize    = 0;
            ITHE.EventRanges.TeamBSize    = 0;
            ITHE.EventRanges.ScoringTeams = 0;

            ITHE.Final = this;

            //this._Heats.Add(ITHE);

            //DState.IO.Add<AEvent> ( ITHE );
            ITHE.Save( );
            this.voidStorage( );
            return(ITHE);
        }
Пример #2
0
        public static IndividualTimedHeatEvent copyHeat(IndividualTimedFinalEvent Final, IndividualTimedHeatEvent Heat)
        {
            IndividualTimedHeatEvent ITHE = new IndividualTimedHeatEvent( )
            {
                Name         = Heat.Name,
                Description  = Heat.Description,
                Championship = Final.Championship
            };

            Final.Championship.addEvent(ITHE);

            ITHE.DataEntryTemplate   = null; // we are not going to set the templates for the entry forms.
            ITHE.CertificateTemplate = null;
            ITHE.ResultsTemplate     = null;
            ITHE.VestTemplate        = null;

            foreach (EventGroups er in Final.Groups)   // this is a bit of bodge as we are taking the groups from the final not cloning the head.
            {
                ITHE.addGroup(er.Group);
            }

            ITHE.MaxCompetitors            = Heat.MaxCompetitors;
            ITHE.MinCompetitors            = Heat.MinCompetitors;
            ITHE.MaxCompetitorsPerTeam     = Heat.MaxCompetitors;
            ITHE.MaxGuests                 = Heat.MaxGuests;
            ITHE.TopIndividualCertificates = Heat.TopIndividualCertificates;
            ITHE.TopLowerYearGroupInividualCertificates = Heat.TopLowerYearGroupInividualCertificates;
            ITHE.TeamASize = Heat.TeamASize;
            ITHE.TeamBSize = Heat.TeamBSize;
            ITHE.TeamBForScoringTeamOnly = Heat.TeamBForScoringTeamOnly;
            ITHE.ScoringTeams            = Heat.ScoringTeams;
            ITHE.Lanes = Heat.Lanes;


            ITHE.EventRanges.MaxCompetitors            = Heat.EventRanges.MaxCompetitors;
            ITHE.EventRanges.TopIndividualCertificates = Heat.EventRanges.TopIndividualCertificates;
            ITHE.EventRanges.TopLowerYearGroupInividualCertificates = Heat.EventRanges.TopLowerYearGroupInividualCertificates;
            ITHE.EventRanges.TeamASize    = Heat.EventRanges.TeamASize;
            ITHE.EventRanges.TeamBSize    = Heat.EventRanges.TeamBSize;
            ITHE.EventRanges.ScoringTeams = Heat.EventRanges.ScoringTeams;

            ITHE.Final = Final;

            //this._Heats.Add(ITHE);

            //DState.IO.Add<AEvent> ( ITHE );
            ITHE.Save( );
            Final.voidStorage( );
            return(ITHE);
        }
Пример #3
0
 public IndividualTimedHeatEvent(IndividualTimedHeatEvent Event, IndividualTimedFinalEvent Final, Championship Championship)
     : base(Event, Championship)
 {
     this.Final = Final;
 }