public ExportScorebookPublishFmt()
        {
            // Retrieve data from database
            mySanctionNum = Properties.Settings.Default.AppSanctionNum;

            if ( mySanctionNum == null ) {
                MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" );
            } else {
                if ( mySanctionNum.Length < 6 ) {
                    MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" );
                } else {
                    CalcScoreSummary curCalcSummary = new CalcScoreSummary();

                    DataTable curTourDataTable = getTourData( mySanctionNum );
                    if ( curTourDataTable.Rows.Count > 0 ) {
                        myTourRow = curTourDataTable.Rows[0];
                        myTourRules = (String)myTourRow["Rules"];
                        myTourClass = myTourRow["Class"].ToString().Trim();

                        int curSlalomRounds = 0, curTrickRounds = 0, curJumpRounds = 0;
                        try {
                            curSlalomRounds = Convert.ToInt16( myTourRow["SlalomRounds"].ToString() );
                        } catch {
                            curSlalomRounds = 0;
                        }
                        try {
                            curTrickRounds = Convert.ToInt16( myTourRow["TrickRounds"].ToString() );
                        } catch {
                            curTrickRounds = 0;
                        }
                        try {
                            curJumpRounds = Convert.ToInt16( myTourRow["JumpRounds"].ToString() );
                        } catch {
                            curJumpRounds = 0;
                        }
                        if ( curSlalomRounds > myTourRounds ) { myTourRounds = curSlalomRounds; }
                        if ( curTrickRounds > myTourRounds ) { myTourRounds = curTrickRounds; }
                        if ( curJumpRounds > myTourRounds ) { myTourRounds = curJumpRounds; }

                        AgeGroupDropdownList curAgeGroupDropdownList = new AgeGroupDropdownList( myTourRow );
                        myAgeDivDataTable = curAgeGroupDropdownList.AgeDivDataTable;

                    }
                }
            }
        }
        //Constructor
        public TourEventReg()
        {
            getTourInfo();

            mySkierClassList = new ListSkierClass();
            mySkierClassList.ListSkierClassLoad();

            myMatchCommand = "";
            myMatchCommandPrev = "";
            myMatchDialog = new ImportMatchDialogForm();

            if ( myTourRow == null ) {
                myAgeDivList = new AgeGroupDropdownList();
            } else {
                String curRules = (String)myTourRow["Rules"];
                myAgeDivList = new AgeGroupDropdownList( myTourRow );
            }
        }
        public void SelectList_Load(Int16 inSkiYearAge, String inGender, DataRow inTourRow, EventHandler parentEvent)
        {
            String curListCode = "", curListValue = "";
            RadioButtonWithValue curRadioButton;
            int curItemLoc  = 1;
            int curItemSize = 0;
            int curIdx      = 1;

            this.Controls.Clear();
            myAgeGroupDropdownList = new AgeGroupDropdownList(inTourRow);
            ArrayList   myDropdownList = myAgeGroupDropdownList.getDivListForAge(inSkiYearAge, inGender);
            IEnumerator myList         = myDropdownList.GetEnumerator();

            while (myList.MoveNext())
            {
                curListCode = (String)myList.Current;
                curItemSize = curListValue.Length * 8;

                curRadioButton          = new RadioButtonWithValue();
                curRadioButton.AutoSize = true;
                curRadioButton.Location = new System.Drawing.Point(1, curItemLoc);
                curRadioButton.Name     = curListValue;
                curRadioButton.Size     = new System.Drawing.Size(curItemSize, 15);
                curRadioButton.TabIndex = curIdx;
                curRadioButton.TabStop  = true;
                curRadioButton.Text     = curListCode;
                curRadioButton.UseVisualStyleBackColor = true;
                curRadioButton.Value  = curListCode;
                curRadioButton.Click += new System.EventHandler(radioButton_Click);
                if (parentEvent != null)
                {
                    curRadioButton.Click += new System.EventHandler(parentEvent);
                }
                curItemLoc += 17;
                this.Controls.Add(curRadioButton);
            }
        }
 private void loadEventGroupListFromData()
 {
     AgeGroupDropdownList curAgeGroupDropdownList = new AgeGroupDropdownList( myTourRow );
     ArrayList curDropdownList = new ArrayList();
     ArrayList curAgeGroupList = curAgeGroupDropdownList.DropdownList;
     curDropdownList.Add( "All" );
     for ( int idx = 0; idx < curAgeGroupList.Count; idx++ ) {
         curDropdownList.Add( curAgeGroupList[idx] );
     }
     EventGroupList.DataSource = curDropdownList;
 }
        private void LoadDataButton_Click( object sender, EventArgs e )
        {
            bool curLoadActive = true;
            String curMethodName = "Tournament:TourDivOrder:LoadDataButton";
            AgeGroupDropdownList curAgeGroupDropdownList = new AgeGroupDropdownList( myTourRow );

            String curMsg = "";
            bool curReturn = true;
            int rowsProc = 0;

            String curEvent = "Slalom";
            if ( slalomButton.Checked ) {
                curEvent = "Slalom";
            } else if ( trickButton.Checked ) {
                curEvent = "Trick";
            } else if ( jumpButton.Checked ) {
                curEvent = "Jump";
            }

            try {
                if ( myTourDivDataTable.Rows.Count > 0 ) {
                    String dialogMsg = "You have existing division order data!"
                        + "\n Do you want to reset the data?";
                    DialogResult msgResp =
                        MessageBox.Show( dialogMsg, "Change Warning",
                            MessageBoxButtons.OKCancel,
                            MessageBoxIcon.Warning,
                            MessageBoxDefaultButton.Button1 );
                    if ( msgResp == DialogResult.OK ) {
                        curLoadActive = true;
                    } else {
                        curLoadActive = false;
                    }
                }
                if ( curLoadActive ) {
                    try {
                        StringBuilder curSqlStmt = new StringBuilder("Delete DivOrder WHERE SanctionId = '" + mySanctionNum + "' AND Event = '" + curEvent + "'");
                        rowsProc = DataAccess.ExecuteCommand( curSqlStmt.ToString() );
                        Log.WriteFile( curMethodName + ":Rows=" + rowsProc.ToString() + " " + curSqlStmt.ToString() );

                        int curInsertCount = 0;
                        String curSqlStmtInsert = "Insert Into DivOrder ( "
                            + "SanctionId, Event, AgeGroup, RunOrder, LastUpdateDate "
                            + ") Values ( '" + mySanctionNum + "', '" + curEvent + "'";

                        foreach ( DataRow curRow in curAgeGroupDropdownList.AgeDivDataTable.Rows ) {
                            if ( !(( (String)curRow["Division"] ).Equals( "OF" ) ) ) {
                                curSqlStmt = new StringBuilder(curSqlStmtInsert
                                    + ", '" + (String)curRow["Division"] + "'"
                                    + ", " + ( ((int)curRow["SortSeq"]) * 10 ).ToString()
                                    + ", getDate() )");
                                rowsProc = DataAccess.ExecuteCommand( curSqlStmt.ToString() );
                                curInsertCount += rowsProc;
                            }
                        }
                        Log.WriteFile( curMethodName + ":Rows=" + curInsertCount.ToString() + " " + curSqlStmtInsert );
                        MessageBox.Show( "Added rows=" + curInsertCount.ToString() + " to division order" );

                    } catch ( Exception excp ) {
                        curReturn = false;
                        curMsg = "Error attempting to load division data \n" + excp.Message;
                        MessageBox.Show( curMsg );
                        Log.WriteFile( curMethodName + curMsg );
                    } finally {
                        navRefresh_Click( null, null );
                    }
                }
            } catch ( Exception excp ) {
                curMsg = "Error attempting to load division data \n" + excp.Message;
                MessageBox.Show( curMsg );
                Log.WriteFile( curMethodName + curMsg );
            }
        }
Ejemplo n.º 6
0
 public CheckEventRecord(DataRow inTourRow)
 {
     myAgeGroupList = new AgeGroupDropdownList(inTourRow);
     myTourRules    = (String)inTourRow["Rules"];
 }
        private void NopsCalcForm_Load(object sender, EventArgs e)
        {
            // Set window size based on saved values
            if (Properties.Settings.Default.NopsCalcForm_Location.X > 0
                && Properties.Settings.Default.NopsCalcForm_Location.Y > 0) {
                this.Location = Properties.Settings.Default.NopsCalcForm_Location;
            }

            // Loads data into the 'waterskiDataSet.ListAgeDivisions' table.
            AgeGroupDropdownList myAgeGroupList = null;
            String curSanctionNum = Properties.Settings.Default.AppSanctionNum;
            DataTable curTourDataTable = getTourData( curSanctionNum );
            if (curTourDataTable.Rows.Count > 0) {
                DataRow curTourRow = curTourDataTable.Rows[0];
                myAgeGroupList = new AgeGroupDropdownList( curTourRow );
            } else {
                myAgeGroupList = new AgeGroupDropdownList( null );
            }

            listAgeDivisionsComboBox.DataSource = myAgeGroupList.DropdownList;

            // Loads data into the 'waterskiDataSet.NopsData' table.
            myFilterCommand = "AgeGroup = '" + listAgeDivisionsComboBox.SelectedValue + "'";
        }
        private void writeIndexHeader( StreamWriter outBuffer, String inPlcmtOrg, DataTable inSlalomScores, DataTable inTrickScores, DataTable inJumpScores, DataTable inOverallScores )
        {
            String curDiv = "", curDivName = "", curGroup = "", prevGroup = "";
            DataRow curRowScore;
            DataRow[] curScoreSlalomRows, curScoreTrickRows, curScoreJumpRows, curScoreOverallRows;
            AgeGroupDropdownList myAgeGroupDropdownList = new AgeGroupDropdownList( myTourRow );

            StringBuilder outLine = new StringBuilder( "" );
            outLine.Append( "\n<br/><br/><a name=PageTop></a><div Class=\"SectionTitle\">" );
            outLine.Append( "<br/>Index of Scoring Results" );
            outLine.Append( "</div>" );
            outLine.Append( "\n<div class=\"MainContent\">" );
            outLine.Append( "<br/><a href=#MasterSummary>MasterSummary</a>" );
            if (isTeamAvailable()) {
                outLine.Append( "<br/><a href=#TeamCombined>Team Results</a>" );
            }
            outLine.Append( "<br/><br/>\n<Table Class=\"DataGridView\">" );
            outBuffer.WriteLine( outLine.ToString() );

            outLine = new StringBuilder( "" );
            outLine.Append( "\n<tr><th>Division</th><td>Slalom</td><td>Tricks</td><td>Jump</td><td>Overall</td></tr>" );
            outBuffer.WriteLine( outLine.ToString() );

            foreach ( DataRow curRowDiv in myAgeGroupDropdownList.AgeDivDataTable.Rows ) {
                outLine = new StringBuilder( "" );
                curDiv = (String)curRowDiv["Division"];
                curDivName = (String)curRowDiv["DivisionName"];

                curScoreSlalomRows = inSlalomScores.Select( "AgeGroup = '" + curDiv + "'" );
                curScoreTrickRows = inTrickScores.Select( "AgeGroup = '" + curDiv + "'" );
                curScoreJumpRows = inJumpScores.Select( "AgeGroup = '" + curDiv + "'" );
                curScoreOverallRows = inOverallScores.Select( "AgeGroup = '" + curDiv + "' AND QualifyOverall = 'Yes'" );

                if ( curScoreSlalomRows.Length > 0
                    || curScoreTrickRows.Length > 0
                    || curScoreJumpRows.Length > 0
                    || curScoreOverallRows.Length > 0 ) {

                    outLine.Append( "\n<tr><th>" + curDivName + "</th>" );
                    if ( inPlcmtOrg.ToLower().Equals( "divgr" ) ) {
                        prevGroup = "";
                        outLine.Append( "<td>" );
                        if ( curScoreSlalomRows.Length == 0 ) {
                            outLine.Append( "&nbsp;" );
                        } else {
                            for ( int curIdx = 0; curIdx < curScoreSlalomRows.Length; curIdx++ ) {
                                curRowScore = curScoreSlalomRows[curIdx];
                                curGroup = (String)curRowScore["EventGroup"];
                                if ( !( curGroup.Equals( prevGroup ) ) ) {
                                    if ( prevGroup.Length > 0 ) {
                                        outLine.Append( "<br/>" );
                                    }
                                    outLine.Append( "<a href=#SlalomResults" + curDiv + "-" + curGroup + ">" + curDivName + " - " + curGroup + " Slalom</a>" );
                                }
                                prevGroup = curGroup;
                            }
                        }
                        outLine.Append( "</td>" );

                        prevGroup = "";
                        outLine.Append( "<td>" );
                        if ( curScoreTrickRows.Length == 0 ) {
                            outLine.Append( "&nbsp;" );
                        } else {
                            for ( int curIdx = 0; curIdx < curScoreTrickRows.Length; curIdx++ ) {
                                curRowScore = curScoreTrickRows[curIdx];
                                curGroup = (String)curRowScore["EventGroup"];
                                if ( !( curGroup.Equals( prevGroup ) ) ) {
                                    if ( prevGroup.Length > 0 ) {
                                        outLine.Append( "<br/>" );
                                    }
                                    outLine.Append( "<a href=#TrickResults" + curDiv + "-" + curGroup + ">" + curDivName + " - " + curGroup + " Trick</a>" );
                                }
                                prevGroup = curGroup;
                            }
                        }
                        outLine.Append( "</td>" );

                        prevGroup = "";
                        outLine.Append( "<td>" );
                        if ( curScoreJumpRows.Length == 0 ) {
                            outLine.Append( "&nbsp;" );
                        } else {
                            for ( int curIdx = 0; curIdx < curScoreJumpRows.Length; curIdx++ ) {
                                curRowScore = curScoreJumpRows[curIdx];
                                curGroup = (String)curRowScore["EventGroup"];
                                if ( !( curGroup.Equals( prevGroup ) ) ) {
                                    if ( prevGroup.Length > 0 ) {
                                        outLine.Append( "<br/>" );
                                    }
                                    outLine.Append( "<a href=#JumpResults" + curDiv + "-" + curGroup + ">" + curDivName + " - " + curGroup + " Jump</a>" );
                                }
                                prevGroup = curGroup;
                            }
                        }
                        outLine.Append( "</td>" );

                        prevGroup = "";
                        outLine.Append( "<td>" );
                        if ( curScoreOverallRows.Length == 0 ) {
                            outLine.Append( "&nbsp;" );
                        } else {
                            for ( int curIdx = 0; curIdx < curScoreOverallRows.Length; curIdx++ ) {
                                curRowScore = curScoreOverallRows[curIdx];
                                curGroup = (String)curRowScore["EventGroup"];
                                if ( !( curGroup.Equals( prevGroup ) ) ) {
                                    if ( prevGroup.Length > 0 ) {
                                        outLine.Append( "<br/>" );
                                    }
                                    outLine.Append( "<a href=#OverallResults" + curDiv + "-" + curGroup + ">" + curDivName + " - " + curGroup + " Overall</a>" );
                                }
                                prevGroup = curGroup;
                            }
                        }
                        outLine.Append( "</td>" );

                    } else {
                        if ( curScoreSlalomRows.Length > 0 ) {
                            outLine.Append( "<td><a href=#SlalomResults" + curDiv + ">" + curDivName + " Slalom</a></td>" );
                        } else {
                            outLine.Append( "<td>&nbsp;</td>" );
                        }
                        if ( curScoreTrickRows.Length > 0 ) {
                            outLine.Append( "<td><a href=#TrickResults" + curDiv + ">" + curDivName + " Trick</a></td>" );
                        } else {
                            outLine.Append( "<td>&nbsp;</td>" );
                        }
                        if ( curScoreJumpRows.Length > 0 ) {
                            outLine.Append( "<td><a href=#JumpResults" + curDiv + ">" + curDivName + " Jump</a></td>" );
                        } else {
                            outLine.Append( "<td>&nbsp;</td>" );
                        }
                        if ( curScoreOverallRows.Length > 0 ) {
                            outLine.Append( "<td><a href=#OverallResults" + curDiv + ">" + curDivName + " Overall</a></td>" );
                        } else {
                            outLine.Append( "<td>&nbsp;</td>" );
                        }
                    }

                    outLine.Append( "</tr>" );
                    outBuffer.WriteLine( outLine.ToString() );
                }
            }

            outLine = new StringBuilder( "" );
            outLine.Append( "\n</Table></div>" );
            outBuffer.WriteLine( outLine.ToString() );

            return;
        }
        public void SelectList_Load(Int16 inSkiYearAge, String inGender, DataRow inTourRow, EventHandler parentEvent)
        {
            String curListCode = "", curListValue = "";
            RadioButtonWithValue curRadioButton;
            int curItemLoc = 1;
            int curItemSize = 0;
            int curIdx = 1;
            this.Controls.Clear();
            myAgeGroupDropdownList = new AgeGroupDropdownList( inTourRow );
            ArrayList myDropdownList = myAgeGroupDropdownList.getDivListForAge( inSkiYearAge, inGender );
            IEnumerator myList = myDropdownList.GetEnumerator();
            while ( myList.MoveNext() ) {
                curListCode = (String)myList.Current;
                curItemSize = curListValue.Length * 8;

                curRadioButton = new RadioButtonWithValue();
                curRadioButton.AutoSize = true;
                curRadioButton.Location = new System.Drawing.Point( 1, curItemLoc );
                curRadioButton.Name = curListValue;
                curRadioButton.Size = new System.Drawing.Size( curItemSize, 15 );
                curRadioButton.TabIndex = curIdx;
                curRadioButton.TabStop = true;
                curRadioButton.Text = curListCode;
                curRadioButton.UseVisualStyleBackColor = true;
                curRadioButton.Value = curListCode;
                curRadioButton.Click += new System.EventHandler( radioButton_Click );
                if ( parentEvent != null ) {
                    curRadioButton.Click += new System.EventHandler( parentEvent );
                }
                curItemLoc += 17;
                this.Controls.Add( curRadioButton );
            }
        }
        private void ScoreEntry_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.JumpEntry_Width > 0) {
                this.Width = Properties.Settings.Default.JumpEntry_Width;
            }
            if (Properties.Settings.Default.JumpEntry_Height > 0) {
                this.Height = Properties.Settings.Default.JumpEntry_Height;
            }
            if (Properties.Settings.Default.JumpEntry_Location.X > 0
                && Properties.Settings.Default.JumpEntry_Location.Y > 0) {
                this.Location = Properties.Settings.Default.JumpEntry_Location;
            }
            myTourProperties = TourProperties.Instance;
            mySortCommand = myTourProperties.RunningOrderSortJump;
            int curDelim = mySortCommand.IndexOf( "AgeGroup" );
            if (curDelim < 0) {
            } else if (curDelim > 0) {
                mySortCommand = mySortCommand.Substring( 0, curDelim ) + "DivOrder" + mySortCommand.Substring( curDelim + "AgeGroup".Length );
                myTourProperties.RunningOrderSortJump = mySortCommand;
            } else {
                mySortCommand = "DivOrder" + mySortCommand.Substring( "AgeGroup".Length );
                myTourProperties.RunningOrderSortJump = mySortCommand;
            }

            ResizeNarrow.Visible = false;
            ResizeNarrow.Enabled = false;
            ResizeWide.Visible = true;
            ResizeWide.Enabled = true;
            ResizeNarrow.Location = ResizeWide.Location;

            EventRunInfoLabel.Text = "   Event Start:\n" + "   Event Delay:\n" + "Skiers, Passes:";
            EventRunInfoData.Text = "";
            EventRunPerfLabel.Text = "Event Duration:\n" + "Mins Per Skier:\n" + " Mins Per Pass:"******"";
            EventDelayReasonTextBox.Visible = false;
            EventDelayReasonLabel.Visible = false;
            StartTimerButton.Visible = false;
            PauseTimerButton.Visible = true;
            StartTimerButton.Location = PauseTimerButton.Location;

            String[] curList = { "SkierName", "Div", "DivOrder", "EventGroup", "RunOrder", "TeamCode", "EventClass", "RankingScore", "RankingRating", "HCapBase", "HCapScore", "Status" };
            sortDialogForm = new SortDialogForm();
            sortDialogForm.ColumnListArray = curList;

            filterDialogForm = new Common.FilterDialogForm();
            filterDialogForm.ColumnListArray = curList;

            eventGroupSelect = new EventGroupSelect();
            rerideReasonDialogForm = new RerideReason();
            skierDoneReasonDialogForm = new SkierDoneReason();

            // Retrieve data from database
            mySanctionNum = Properties.Settings.Default.AppSanctionNum;
            Cursor.Current = Cursors.WaitCursor;

            if (mySanctionNum == null) {
                MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option");
            } else {
                if (mySanctionNum.Length < 6) {
                    MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option");
                } else {
                    //Retrieve selected tournament attributes
                    DataTable curTourDataTable = getTourData(mySanctionNum);
                    if (curTourDataTable.Rows.Count > 0) {
                        myTourRow = curTourDataTable.Rows[0];
                        myTourRules = (String)myTourRow["Rules"];
                        if ( myTourRules.ToLower().Equals( "ncwsa" ) ) {
                            TeamCode.Visible = true;
                        } else {
                            TeamCode.Visible = false;
                        }

                        if ( (byte)myTourRow["JumpRounds"] > 0 ) {
                            mySanctionYear = Convert.ToInt16( mySanctionNum.Substring( 0, 2 ) );

                            //Load round selection list based on number of rounds specified for the tournament
                            roundSelect.SelectList_Load( myTourRow["JumpRounds"].ToString(), roundSelect_Click );
                            roundActiveSelect.SelectList_LoadHorztl( myTourRow["JumpRounds"].ToString(), roundActiveSelect_Click );
                            roundActiveSelect.RoundValue = "1";
                            roundSelect.RoundValue = "1";

                            //Load jump speed selection list
                            JumpSpeedSelect.SelectList_Load( JumpSpeedSelect_Change );

                            //Load ramp height selection list
                            RampHeightSelect.SelectList_Load( RampHeightSelect_Change );

                            mySkierClassList = new ListSkierClass();
                            mySkierClassList.ListSkierClassLoad();
                            scoreEventClass.DataSource = mySkierClassList.DropdownList;
                            scoreEventClass.DisplayMember = "ItemName";
                            scoreEventClass.ValueMember = "ItemValue";

                            myRuleType = ((String)myTourRow["Rules"]).ToUpper();
                            myTourClass = myTourRow["Class"].ToString().ToUpper();
                            myClassCRow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'C'")[0];
                            myClassERow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'E'")[0];
                            myAgeDivList = new AgeGroupDropdownList( myTourRow );

                            //Setup for meter input if using meters to calculate distances
                            NumJudges = Convert.ToInt16( myTourProperties.JumpEntryNumJudges);
                            if ( NumJudges > 0 ) {
                                JumpCalcMetersCB.Checked = true;
                                JumpCalcVideoCB.Checked = false;
                            } else {
                                JumpCalcMetersCB.Checked = false;
                                JumpCalcVideoCB.Checked = true;
                            }

                            //Retrieve boat times
                            StringBuilder curSqlStmt = new StringBuilder( "" );
                            curSqlStmt.Append( "SELECT ListCode, CodeValue, MinValue, MaxValue, CodeDesc FROM CodeValueList WHERE ListName = 'JumpBoatTime3Seg' ORDER BY SortSeq" );
                            myTimesDataTable = getData( curSqlStmt.ToString() );

                            //Retrieve maximum speeds by age group
                            getMaxSpeedData();

                            //Retrieve minimum speeds by class
                            getMinSpeedData();

                            //Retrieve maximum ramp heights by age group
                            getMaxRampData();

                            //Retrieve list of divisions and scores that require 3 segment validation for L and R tournaments
                            try {
                                DataTable curTourClassDataTable = mySkierClassList.getTourClassList();
                                myClassRow = curTourClassDataTable.Select( "ListCode = '" + myTourClass + "'" )[0];
                                if ((Decimal)myClassRow["ListCodeNum"] > (Decimal)myClassERow["ListCodeNum"]) {
                                    getJump3TimesDivData();
                                } else {
                                    myJump3TimesDivDataTable = null;
                                }
                            } catch {
                                myJump3TimesDivDataTable = null;
                            }

                            //Get list of approved tow boats
                            getApprovedTowboats();
                            BoatSelectInfoLabel.Visible = false;
                            listApprovedBoatsDataGridView.Visible = false;

                            //Retrieve and load tournament event entries
                            loadEventGroupList( Convert.ToByte( roundActiveSelect.RoundValue ) );

                            if (ExportLiveWeb.LiveWebLocation.Length > 1) {
                                LiveWebLabel.Visible = true;
                            } else {
                                LiveWebLabel.Visible = false;
                            }
                        } else {
                            MessageBox.Show( "The jump event is not defined for the active tournament" );
                        }
                    } else {
                        MessageBox.Show( "The active tournament is not properly defined.  You must select from the Administration menu Tournament List option" );
                    }
                }
            }
            Cursor.Current = Cursors.Default;
        }
        private void writeIndexHeader(StreamWriter outBuffer, String inPlcmtOrg, DataTable inOverallScores)
        {
            String curDiv = "", curDivName = "";
            int curDivCountSlalom = 0, curDivCountTrick = 0, curDivCountJump = 0;
            AgeGroupDropdownList myAgeGroupDropdownList = new AgeGroupDropdownList( myTourRow );

            StringBuilder outLine = new StringBuilder( "" );
            outLine.Append( "\n<br/><br/><a name=PageTop></a><div Class=\"SectionTitle\">" );
            outLine.Append( "<br/>Index of Scoring Results" );
            outLine.Append( "</div>" );
            outLine.Append( "\n<div class=\"MainContent\">" );
            outLine.Append( "<br/><a href=#MasterSummary>Go to MasterSummary</a>" );
            if (isTeamAvailable()) {
                outLine.Append( "<br/><a href=#TeamCombined>Team Results</a>" );
            }
            outLine.Append( "<br/><br/>\n<Table Class=\"DataGridView\">" );
            outBuffer.WriteLine( outLine.ToString() );

            outLine = new StringBuilder( "" );
            outLine.Append( "\n<tr><th>Division</th><td>Slalom</td><td>Tricks</td><td>Jump</td><td>Overall</td></tr>" );
            outBuffer.WriteLine( outLine.ToString() );

            foreach (DataRow curRowDiv in myAgeGroupDropdownList.AgeDivDataTable.Rows) {
                outLine = new StringBuilder( "" );
                curDiv = (String)curRowDiv["Division"];
                curDivName = (String)curRowDiv["DivisionName"];

                curDivCountSlalom = getSkierCountDiv( mySanctionNum, "Slalom", curDiv );
                curDivCountTrick = getSkierCountDiv( mySanctionNum, "Trick", curDiv );
                curDivCountJump = getSkierCountDiv( mySanctionNum, "Jump", curDiv );

                if (curDivCountSlalom > 0 || curDivCountTrick > 0 || curDivCountJump > 0) {
                    outLine.Append( "\n<tr><th>" + curDivName + "</th>" );
                    outLine.Append( "<td>" );
                    if (curDivCountSlalom > 0) {
                        outLine.Append( "<a href=#SlalomResults" + curDiv + ">" + curDivName + " Slalom</a>" );
                    } else {
                        outLine.Append( "&nbsp;" );
                    }
                    outLine.Append( "</td>" );

                    outLine.Append( "<td>" );
                    if (curDivCountTrick > 0) {
                        outLine.Append( "<a href=#TrickResults" + curDiv + ">" + curDivName + " Trick</a>" );
                    } else {
                        outLine.Append( "&nbsp;" );
                    }
                    outLine.Append( "</td>" );

                    outLine.Append( "<td>" );
                    if (curDivCountJump > 0) {
                        outLine.Append( "<a href=#JumpResults" + curDiv + ">" + curDivName + " Jump</a>" );
                    } else {
                        outLine.Append( "&nbsp;" );
                    }
                    outLine.Append( "</td>" );

                    outLine.Append( "<td>" );
                    if (curDivCountSlalom > 0 || curDivCountTrick > 0 | curDivCountJump > 0) {
                        outLine.Append( "<a href=#OverallResults" + curDiv + ">" + curDivName + " Overall</a>" );
                    } else {
                        outLine.Append( "&nbsp;" );
                    }
                    outLine.Append( "</td>" );

                    outLine.Append( "</tr>" );
                    outBuffer.WriteLine( outLine.ToString() );
                }
            }

            outLine = new StringBuilder( "" );
            outLine.Append( "\n</Table></div>" );
            outBuffer.WriteLine( outLine.ToString() );

            return;
        }