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; DataGridView.Rows.Clear(); myTourRow = getTourData(); } } 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 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; }