private void ScoreEntry_Load(object sender, EventArgs e) { if (Properties.Settings.Default.SlalomEntry_Width > 0) { this.Width = Properties.Settings.Default.SlalomEntry_Width; } if (Properties.Settings.Default.SlalomEntry_Height > 0) { this.Height = Properties.Settings.Default.SlalomEntry_Height; } if (Properties.Settings.Default.SlalomEntry_Location.X > 0 && Properties.Settings.Default.SlalomEntry_Location.Y > 0) { this.Location = Properties.Settings.Default.SlalomEntry_Location; } myTourProperties = TourProperties.Instance; mySortCommand = myTourProperties.RunningOrderSortSlalom; int curDelim = mySortCommand.IndexOf( "AgeGroup" ); if (curDelim < 0) { } else if (curDelim > 0) { mySortCommand = mySortCommand.Substring( 0, curDelim ) + "DivOrder" + mySortCommand.Substring( curDelim + "AgeGroup".Length ); myTourProperties.RunningOrderSortSlalom = mySortCommand; } else { mySortCommand = "DivOrder" + mySortCommand.Substring( "AgeGroup".Length ); myTourProperties.RunningOrderSortSlalom = mySortCommand; } ResizeNarrow.Visible = false; ResizeNarrow.Enabled = false; ResizeWide.Visible = true; ResizeWide.Enabled = true; ResizeNarrow.Location = ResizeWide.Location; 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; rerideReasonDialogForm = new RerideReason(); skierDoneReasonDialogForm = new SkierDoneReason(); OptUpDialogForm = new SlalomOptUp(); myCheckEventRecord = new CheckEventRecord(); // 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["SlalomRounds"] > 0 ) { mySortCommand = myTourProperties.RunningOrderSortSlalom; EventRunInfoLabel.Text = " Event Start:\n" + " Event Delay:\n" + "Skiers, Passes:"; EventRunInfoData.Text = ""; EventRunPerfLabel.Text = "Event Duration:\n" + "Mins Per Skier:\n" + " Mins Per Pass:"******""; //Load round selection list based on number of rounds specified for the tournament roundSelect.SelectList_Load( myTourRow["SlalomRounds"].ToString(), roundSelect_Click ); roundActiveSelect.SelectList_LoadHorztl( myTourRow["SlalomRounds"].ToString(), roundActiveSelect_Click ); roundActiveSelect.RoundValue = "1"; //Load rope length selection list SlalomLineSelect.SelectList_Load( SlalomLineSelect_Change ); //Load slalom speed selection list SlalomSpeedSelect.SelectList_Load( SlalomSpeedSelect_Change ); mySkierClassList = new ListSkierClass(); mySkierClassList.ListSkierClassLoad(); scoreEventClass.DataSource = mySkierClassList.DropdownList; scoreEventClass.DisplayMember = "ItemName"; scoreEventClass.ValueMember = "ItemValue"; myTourClass = myTourRow["Class"].ToString().ToUpper(); myClassCRow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'C'")[0]; myClassERow = mySkierClassList.SkierClassDataTable.Select("ListCode = 'E'")[0]; //Determine required number of judges for event myNumJudges = 5; StringBuilder curSqlStmt = new StringBuilder( "" ); curSqlStmt.Append( "Select ListCode, CodeValue, MaxValue, MinValue FROM CodeValueList " ); curSqlStmt.Append( "Where ListName = 'SlalomJudgesNum' And ListCode = '" + myTourClass + "' ORDER BY SortSeq" ); DataTable curNumJudgesDataTable = getData( curSqlStmt.ToString() ); if (curNumJudgesDataTable.Rows.Count > 0) { setShowByNumJudges( Convert.ToInt16( (Decimal)curNumJudgesDataTable.Rows[0]["MaxValue"] )); } else { setShowByNumJudges ( 1 ); } if ( myNumJudges > 3 ) { ClassC5JudgeCB.Visible = false; ClassC5JudgeCB.Enabled = false; ClassR3JudgeCB.Visible = true; ClassR3JudgeCB.Enabled = true; ClassR3JudgeCB.Checked = true; } else { ClassC5JudgeCB.Visible = true; ClassC5JudgeCB.Enabled = true; ClassR3JudgeCB.Visible = false; ClassR3JudgeCB.Enabled = false; } //Retrieve and load boat times curSqlStmt = new StringBuilder( "" ); curSqlStmt.Append( "SELECT ListCode, ListCodeNum, SortSeq, CodeValue, MinValue, MaxValue, CodeDesc " ); curSqlStmt.Append( "FROM CodeValueList WHERE ListName = 'SlalomBoatTime' ORDER BY SortSeq" ); myTimesDataTable = getData( curSqlStmt.ToString() ); //Retrieve list of approved tournament boats getApprovedTowboats(); listApprovedBoatsDataGridView.Visible = false; BoatSelectInfoLabel.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 slalom 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 TrickListMaint_Load(object sender, EventArgs e) { if (Properties.Settings.Default.TrickList_Width > 0) { this.Width = Properties.Settings.Default.TrickList_Width; } if (Properties.Settings.Default.TrickList_Height > 0) { this.Height = Properties.Settings.Default.TrickList_Height; } if (Properties.Settings.Default.TrickList_Location.X > 0 && Properties.Settings.Default.TrickList_Location.Y > 0) { this.Location = Properties.Settings.Default.TrickList_Location; } winStatusMsg.Text = "Retrieving Trick list data"; Cursor.Current = Cursors.WaitCursor; sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnList = DataGridView.Columns; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnList = DataGridView.Columns; myDbConn = new global::System.Data.SqlServerCe.SqlCeConnection(); myDbConn.ConnectionString = Properties.Settings.Default.waterskiConnectionStringApp; //Get Trick list data getTrickList(); loadDataGridView(); }
private void SlalomSummary_Load(object sender, EventArgs e) { if (Properties.Settings.Default.SlalomScoreSummary_Width > 0) { this.Width = Properties.Settings.Default.SlalomScoreSummary_Width; } if (Properties.Settings.Default.SlalomScoreSummary_Height > 0) { this.Height = Properties.Settings.Default.SlalomScoreSummary_Height; } if (Properties.Settings.Default.SlalomScoreSummary_Location.X > 0 && Properties.Settings.Default.SlalomScoreSummary_Location.Y > 0) { this.Location = Properties.Settings.Default.SlalomScoreSummary_Location; } myTourProperties = TourProperties.Instance; bestScoreButton.Checked = true; if (myTourProperties.SlalomSummaryDataType.ToLower().Equals( "best" )) bestScoreButton.Checked = true; if ( myTourProperties.SlalomSummaryDataType.ToLower().Equals( "total" ) ) totalScoreButton.Checked = true; if ( myTourProperties.SlalomSummaryDataType.ToLower().Equals( "final" ) ) finalScoreButton.Checked = true; if ( myTourProperties.SlalomSummaryDataType.ToLower().Equals( "first" ) ) firstScoreButton.Checked = true; if ( myTourProperties.SlalomSummaryDataType.ToLower().Equals( "round" ) ) roundScoreButton.Checked = true; if (myTourProperties.SlalomSummaryDataType.ToLower().Equals( "h2h" )) h2hScoreButton.Checked = true; rawScoreButton.Checked = true; if ( myTourProperties.SlalomSummaryPlcmtMethod.ToLower().Equals( "points" ) ) pointsScoreButton.Checked = true; groupPlcmtButton.Checked = true; if ( myTourProperties.SlalomSummaryPlcmtOrg.ToLower().Equals( "tour" ) ) plcmtTourButton.Checked = true; if ( myTourProperties.SlalomSummaryPlcmtOrg.ToLower().Equals( "div" ) ) plcmtDivButton.Checked = true; if ( myTourProperties.SlalomSummaryPlcmtOrg.ToLower().Equals( "divgr" ) ) plcmtDivGrpButton.Checked = true; nopsPointsButton.Checked = true; if ( myTourProperties.SlalomSummaryPointsMethod.ToLower().Equals( "nops" ) ) nopsPointsButton.Checked = true; if ( myTourProperties.SlalomSummaryPointsMethod.ToLower().Equals( "plcmt" ) ) plcmtPointsButton.Checked = true; if ( myTourProperties.SlalomSummaryPointsMethod.ToLower().Equals( "kbase" ) ) kBasePointsButton.Checked = true; if ( myTourProperties.SlalomSummaryPointsMethod.ToLower().Equals( "hcap" ) ) handicapPointsButton.Checked = true; if ( myTourProperties.SlalomSummaryPointsMethod.ToLower().Equals( "ratio" ) ) ratioPointsButton.Checked = true; numPrelimTextBox.Text = myTourProperties.SlalomSummaryNumPrelim; String[] curList = { "MemberId", "SkierName", "City", "State", "SkiYearAge", "AgeGroup", "Event" , "EventClassSlalom", "PlcmtSlalom", "TeamSlalom", "HCapBaseSlalom" , "RoundSlalom", "ScoreSlalom", "PointsSlalom" , "FinalPassNum", "FinalSpeedMph", "FinalSpeedKph", "FinalLen", "FinalLenOff", "FinalPassScore" }; sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnListArray = curList; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnListArray = curList; // 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 { //Retrieve selected tournament attributes DataTable curTourDataTable = getTourData(); if (curTourDataTable.Rows.Count > 0) { myTourRow = curTourDataTable.Rows[0]; myTourRules = (String)myTourRow["Rules"]; if ( myTourProperties.SlalomScoreSummary_Sort.Length > 0 ) { mySortCommand = myTourProperties.SlalomScoreSummary_Sort; } else { mySortCommand = ""; } if (myTourRules.ToLower().Equals( "ncwsa" )) { Round.Visible = false; EventClass.Visible = false; TeamCodeNcwsa.Visible = true; TeamCode.Visible = false; } else { TeamCodeNcwsa.Visible = false; TeamCode.Visible = true; } loadGroupList(); } } } }
private void TourList_Load(object sender, EventArgs e) { if (Properties.Settings.Default.TourList_Width > 0) { this.Width = Properties.Settings.Default.TourList_Width; } if (Properties.Settings.Default.TourList_Height > 0) { this.Height = Properties.Settings.Default.TourList_Height; } if (Properties.Settings.Default.TourList_Location.X > 0 && Properties.Settings.Default.TourList_Location.Y > 0) { this.Location = Properties.Settings.Default.TourList_Location; } myTourProperties = TourProperties.Instance; mySortCommand = "SanctionId ASC"; sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnList = dataGridView.Columns; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnList = dataGridView.Columns; //Retrieve tournament list and set current position to active tournament navRefresh_Click( null, null ); }
private void MemberList_Load( object sender, EventArgs e ) { if ( Properties.Settings.Default.MemberList_Width > 0 ) { this.Width = Properties.Settings.Default.MemberList_Width; } if ( Properties.Settings.Default.MemberList_Height > 0 ) { this.Height = Properties.Settings.Default.MemberList_Height; } if ( Properties.Settings.Default.MemberList_Location.X > 0 && Properties.Settings.Default.MemberList_Location.Y > 0 ) { this.Location = Properties.Settings.Default.MemberList_Location; } mySanctionNum = Properties.Settings.Default.AppSanctionNum; if ( mySanctionNum == null ) { mySanctionNum = ""; } else { if ( mySanctionNum.Length < 6 ) { mySanctionNum = ""; } } myDbConn = new global::System.Data.SqlServerCe.SqlCeConnection(); myDbConn.ConnectionString = Properties.Settings.Default.waterskiConnectionStringApp; myEditMemberDialog = new EditMember(); sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnList = dataGridView.Columns; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnList = dataGridView.Columns; myMemberListDataTable = getMemberList(); myViewIdx = 0; loadDataGridView(); }
private void TourRegAddMember_Load(object sender, EventArgs e) { mySanctionNum = Properties.Settings.Default.AppSanctionNum; if (mySanctionNum == null) { MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" ); this.Close(); } else { if (mySanctionNum.Length < 6) { MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option"); this.Close(); } else { myDataModified = false; myDbConn = new global::System.Data.SqlServerCe.SqlCeConnection(); myDbConn.ConnectionString = Properties.Settings.Default.waterskiConnectionStringApp; DataGridView.Rows.Clear(); } } sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnList = DataGridView.Columns; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnList = DataGridView.Columns; myEditRegMemberDialog = new EditRegMember(); myEditMemberDialog = new EditMember(); //Initialize search fields and set starting position inputLastName.Text = ""; inputFirstName.Text = ""; inputMemberId.Text = ""; inputState.Text = ""; inputLastName.Focus(); }
private void Registration_Load( object sender, EventArgs e ) { if (Properties.Settings.Default.TourRegList_Width > 0) { this.Width = Properties.Settings.Default.TourRegList_Width; } if (Properties.Settings.Default.TourRegList_Height > 0) { this.Height = Properties.Settings.Default.TourRegList_Height; } if (Properties.Settings.Default.TourRegList_Location.X > 0 && Properties.Settings.Default.TourRegList_Location.Y > 0) { this.Location = Properties.Settings.Default.TourRegList_Location; } if (Properties.Settings.Default.TourRegList_Sort.Length > 0) { mySortCommand = Properties.Settings.Default.TourRegList_Sort; } else { mySortCommand = "SkierName ASC, AgeGroup ASC"; Properties.Settings.Default.TourRegList_Sort = mySortCommand; } String[] curList = { "SkierName", "AgeGroup", "ReadyToSki", "SlalomReg", "TrickReg", "JumpReg", "SlalomGroup", "TrickGroup", "JumpGroup", "EntryDue", "EntryPaid", "PaymentMethod", "JumpHeight", "TrickBoat", "AwsaMbrshpPaymt" }; sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnListArray = curList; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnListArray = curList; // 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" ); //this.Close(); } else { if (mySanctionNum.Length < 6) { MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" ); //this.Close(); } else { //Retrieve selected tournament attributes DataTable curTourDataTable = getTourData(); if (curTourDataTable.Rows.Count > 0) { myTourRow = curTourDataTable.Rows[0]; if ( myTourRow["SlalomRounds"] == DBNull.Value ) { myTourRow["SlalomRounds"] = 0; } if ( myTourRow["TrickRounds"] == DBNull.Value ) { myTourRow["TrickRounds"] = 0; } if ( myTourRow["JumpRounds"] == DBNull.Value ) { myTourRow["JumpRounds"] = 0; } if ( Convert.ToInt16( myTourRow["SlalomRounds"] ) == 0 ) { SlalomReg.Visible = false; SlalomGroup.Visible = false; RegCountSlalomLabel.Visible = false; SlalomRegCount.Visible = false; } if ( Convert.ToInt16( myTourRow["TrickRounds"] ) == 0 ) { TrickReg.Visible = false; TrickGroup.Visible = false; RegCountTrickLabel.Visible = false; TrickRegCount.Visible = false; } if ( Convert.ToInt16( myTourRow["JumpRounds"] ) == 0 ) { JumpReg.Visible = false; JumpGroup.Visible = false; RegCountJumpLabel.Visible = false; JumpRegCount.Visible = false; } myTourRegAddDialog = new TourRegAddMember(); myEditRegMemberDialog = new EditRegMember(); myTourEventReg = new TourEventReg(); myTourRegRowIdx = 0; loadTourRegView(); } else { MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" ); } } } isDataModified = false; }
private void ListNopsMaint_Load(object sender, EventArgs e) { if (Properties.Settings.Default.NopsMaint_Width > 0) { this.Width = Properties.Settings.Default.NopsMaint_Width; } if (Properties.Settings.Default.NopsMaint_Height > 0) { this.Height = Properties.Settings.Default.NopsMaint_Height; } if (Properties.Settings.Default.NopsMaint_Location.X > 0 && Properties.Settings.Default.NopsMaint_Location.Y > 0) { this.Location = Properties.Settings.Default.NopsMaint_Location; } winStatusMsg.Text = "Retrieving NOPS data"; Cursor.Current = Cursors.WaitCursor; mySortDialogForm = new SortDialogForm(); mySortDialogForm.ColumnList = DataGridView.Columns; myFilterDialogForm = new Common.FilterDialogForm(); myFilterDialogForm.ColumnList = DataGridView.Columns; LoadDataGridView(); }
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 RunningOrderTour_Load(object sender, EventArgs e) { if (Properties.Settings.Default.RunningOrder_Width > 0) { this.Width = Properties.Settings.Default.RunningOrder_Width; } if (Properties.Settings.Default.RunningOrder_Height > 0) { this.Height = Properties.Settings.Default.RunningOrder_Height; } if (Properties.Settings.Default.RunningOrder_Location.X > 0 && Properties.Settings.Default.RunningOrder_Location.Y > 0) { this.Location = Properties.Settings.Default.RunningOrder_Location; } isLoadInProg = true; myTourProperties = TourProperties.Instance; String[] curList = { "SkierName", "EventGroup", "Div", "DivOrder", "RunOrder", "TeamCode", "EventClass", "RankingScore", "RankingRating", "JumpHeight", "HCapBase", "HCapScore" }; sortDialogForm = new SortDialogForm(); sortDialogForm.ColumnListArray = curList; filterDialogForm = new Common.FilterDialogForm(); filterDialogForm.ColumnListArray = curList; // 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"); //this.Close(); } else { if (mySanctionNum.Length < 6) { MessageBox.Show("An active tournament must be selected from the Administration menu Tournament List option"); //this.Close(); } else { //Retrieve selected tournament attributes DataTable curTourDataTable = getTourData( mySanctionNum ); if ( curTourDataTable.Rows.Count > 0 ) { myTourRow = curTourDataTable.Rows[0]; myTourRules = (String)myTourRow["Rules"]; myTourEventClass = (String)myTourRow["EventClass"]; myTourClass = (String)myTourRow["Class"]; mySkierClassList = new ListSkierClass(); mySkierClassList.ListSkierClassLoad(); EventClass.DataSource = mySkierClassList.DropdownList; EventClass.DisplayMember = "ItemName"; EventClass.ValueMember = "ItemValue"; if ( myTourRow["SlalomRounds"] == DBNull.Value ) { myTourRow["SlalomRounds"] = 0; } if ( myTourRow["TrickRounds"] == DBNull.Value ) { myTourRow["TrickRounds"] = 0; } if ( myTourRow["JumpRounds"] == DBNull.Value ) { myTourRow["JumpRounds"] = 0; } if ( Convert.ToInt16( myTourRow["SlalomRounds"] ) == 0 ) { slalomButton.Visible = false; } if ( Convert.ToInt16( myTourRow["TrickRounds"] ) == 0 ) { trickButton.Visible = false; } if ( Convert.ToInt16( myTourRow["JumpRounds"] ) == 0 ) { jumpButton.Visible = false; } myFilterCmd = ""; if (slalomButton.Checked) { mySortCmd = myTourProperties.RunningOrderSortSlalom; } else if (trickButton.Checked) { mySortCmd = myTourProperties.RunningOrderSortTrick; } else if (jumpButton.Checked) { mySortCmd = myTourProperties.RunningOrderSortJump; } if (ExportLiveWeb.LiveWebLocation.Length > 1) { LiveWebLabel.Visible = true; } else { LiveWebLabel.Visible = false; } } else { MessageBox.Show( "An active tournament must be selected from the Administration menu Tournament List option" ); } } } isDataModified = false; isLoadInProg = false; }