public KataSystem(string gameId, string participationId) { InitializeComponent(); this._gameId = gameId; this._ParticipationId = participationId; GameConnection gameconn = new GameConnection(); this._game = gameconn.GetGameById(gameId).Tables[0]; JudgeConnection judgeconn = new JudgeConnection(); this._judges = judgeconn.GetJudges().Tables[0]; foreach (DataRow dr in _judges.Rows) { this.eventJudgePickerA.Items.Add("" + dr[1] + " " + dr[2]); this.eventJudgePickerB.Items.Add("" + dr[1] + " " + dr[2]); this.eventJudgePickerC.Items.Add("" + dr[1] + " " + dr[2]); this.eventJudgePickerD.Items.Add("" + dr[1] + " " + dr[2]); this.eventJudgePickerE.Items.Add("" + dr[1] + " " + dr[2]); } string gametype = this._game.Rows[0][4].ToString(); if (gametype == "") { } else { } }
private void btnJDelete_Click(object sender, RoutedEventArgs e) { judgeConnection = new JudgeConnection(); judgeConnection.deleteJudge(_personId); MessageBox.Show("Succesfully deleted!"); PersonManagement pm = new PersonManagement(); pm.Activate(); pm.Show(); this.Hide(); }
private void btnJSaveNew_Click(object sender, RoutedEventArgs e) { judgeConnection = new JudgeConnection(); judgeConnection.InsertNewJudge(_judgeFirstName, _judgeLastName, _judgeFathersName, _judgeSex, _judgeDateOfBirth, _judgeFirstPhone, _judgeSecondPhone, _judgeEmail, _judgeAddress, _judgeAddressNum, _judgeTK, _judgeCountryCode, _judgeCity, _judgeRank, _judgeClass); MessageBox.Show("Succesfully saved!"); PersonManagement pm = new PersonManagement(); pm.Activate(); pm.Show(); this.Hide(); }
// //mixali min frikaris afto einai gia na grouparis kodika //arxizi me #region <name> //lai telion me #endregion // public PersonManagement() { //auto anoigei to parathiro sto kentro tis othonis WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; //here should be the loading of the locations and clubs and countries InitializeComponent(); athleteConnection = new AthleteConnection(); judgeConnection = new JudgeConnection(); // //NOTE // //mixali listeners vaze katefthian apo to xaml oxi karfota mesa ston kodika // //athleteFirstName.TextChanged += new TextChangedEventHandler(athleteFirstName_TextChanged); //prostetoume cities oses theloume countryConnection = new CountryConnection(); this.countries = countryConnection.GetCountries(); foreach (DataRow dr in countries.Tables[0].Rows) { cmbACountryChooses.Items.Add(dr[1].ToString()); cmbJCountryChooses.Items.Add(dr[1].ToString()); } cmbACountryChooses.SelectedIndex = 0; cmbJCountryChooses.SelectedIndex = 0; this.athleteUpdateCities("CY"); //9th dan - 10th dan- Wide Red optional as Sensei Ilija Yorga himself wore a Black Belt, Master's title //6th dan - 8th dan - White and Red, Master's title //1st dan - 5th dan - Black //1st kyu - Brown (at least 25 Month of traning or more) //2nd kyu - Blue (at least 18 Month of traning or more) //3rd kyu - Green (at least 15 Month of traning or more) //4th kyu - Orange (at least 9 Month of traning or more) //5th kyu - Yellow (at least 7 Month of traning or more) //6th kyu - White (at least 5 Month of traning or more) //prosthetoume athlete_rank cmbAthleteRankChooses.Items.Add("White - 6th kyu"); cmbAthleteRankChooses.Items.Add("Yellow - 5th kyu"); cmbAthleteRankChooses.Items.Add("Orange - 4th kyu"); cmbAthleteRankChooses.Items.Add("Green - 3th kyu"); cmbAthleteRankChooses.Items.Add("Blue - 2nd kyu"); cmbAthleteRankChooses.Items.Add("Brown - 1st kyu"); cmbAthleteRankChooses.Items.Add("Black - 1st dan"); cmbAthleteRankChooses.Items.Add("Black - 2nd dan"); cmbAthleteRankChooses.Items.Add("Black - 3th dan"); cmbAthleteRankChooses.Items.Add("Black - 4th dan"); cmbAthleteRankChooses.Items.Add("Black - 5th dan"); cmbAthleteRankChooses.Items.Add("White/Red - 6th dan"); cmbAthleteRankChooses.Items.Add("White/Red - 7th dan"); cmbAthleteRankChooses.Items.Add("White/Red - 8th dan"); cmbAthleteRankChooses.Items.Add("Red - 9th dan"); cmbAthleteRankChooses.Items.Add("Red - 10th dan"); cmbAthleteRankChooses.SelectedIndex = 0; //prosthetoume judge class cmbJudgeRankChooses.Items.Add("White - 6th kyu"); cmbJudgeRankChooses.Items.Add("Yellow - 5th kyu"); cmbJudgeRankChooses.Items.Add("Orange - 4th kyu"); cmbJudgeRankChooses.Items.Add("Green - 3th kyu"); cmbJudgeRankChooses.Items.Add("Blue - 2nd kyu"); cmbJudgeRankChooses.Items.Add("Brown - 1st kyu"); cmbJudgeRankChooses.Items.Add("Black - 1st dan"); cmbJudgeRankChooses.Items.Add("Black - 2nd dan"); cmbJudgeRankChooses.Items.Add("Black - 3th dan"); cmbJudgeRankChooses.Items.Add("Black - 4th dan"); cmbJudgeRankChooses.Items.Add("Black - 5th dan"); cmbJudgeRankChooses.Items.Add("White/Red - 6th dan"); cmbJudgeRankChooses.Items.Add("White/Red - 7th dan"); cmbJudgeRankChooses.Items.Add("White/Red - 8th dan"); cmbJudgeRankChooses.Items.Add("Red - 9th dan"); cmbJudgeRankChooses.Items.Add("Red - 10th dan"); cmbJudgeRankChooses.SelectedIndex = 0; //prosthetoume clubs this.clubs = clubConnection.GetClubs(); foreach (DataRow dr in clubs.Tables[0].Rows) { cmbAClubChooses.Items.Add(dr[1]); } cmbAClubChooses.SelectedIndex = 0; //cmbAClubChooses.Items.Add("Pro Kata Club (P.K.C.)"); //cmbAClubChooses.Items.Add("Allo Club"); //prosthetoume judge classes cmbJClassChooses.Items.Add("A"); cmbJClassChooses.Items.Add("B"); cmbJClassChooses.SelectedIndex = 0; }
private void btnJSave_Click(object sender, RoutedEventArgs e) { judgeConnection = new JudgeConnection(); judgeConnection.UpdateJudge(_personId, _judgeFirstName, _judgeLastName, _judgeFathersName, _judgeSex, _judgeDateOfBirth, _judgeFirstPhone, _judgeSecondPhone, _judgeEmail, _judgeAddress, _judgeAddressNum, _judgeTK, _judgeCountryCode, _judgeCity, _judgeRank, _judgeClass); MessageBox.Show("Succesfully saved!"); }