public ClubManagement()
        {
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();

            clubConnection = new ClubConnection();

            countryConnection = new CountryConnection();
            this.countries    = countryConnection.GetCountries();

            foreach (DataRow dr in countries.Tables[0].Rows)
            {
                cmbCCountryChooses.Items.Add(dr[1].ToString());
            }
            cmbCCountryChooses.SelectedIndex = 0;

            this.clubUpdateCities("CY");
        }
        public ClubManagement()
        {
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            InitializeComponent();

            clubConnection = new ClubConnection();

            countryConnection = new CountryConnection();
            this.countries = countryConnection.GetCountries();

            foreach (DataRow dr in countries.Tables[0].Rows)
            {
                cmbCCountryChooses.Items.Add(dr[1].ToString());

            }
            cmbCCountryChooses.SelectedIndex = 0;

            this.clubUpdateCities("CY");
        }
        //
        //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;
        }
Exemplo n.º 4
0
        private void initialize()
        {
            addressConnection  = new AddressConnection();
            locationConnection = new LocationConnection();
            //cities kai countries
            cityConnection    = new CityConnection();
            countryConnection = new CountryConnection();
            this.countries    = countryConnection.GetCountries();

            foreach (DataRow dr in countries.Tables[0].Rows)
            {
                cmbECountryChooses.Items.Add(dr[1].ToString());
            }
            cmbECountryChooses.SelectedIndex = 0;

            this.eventUpdateCities("CY");


            //events
            eventConnection = new EventConnection();
            this.events     = eventConnection.getEvents();
            cmbTEventChooser.Items.Add("Select Event");

            foreach (DataRow dr in events.Tables[0].Rows)
            {
                cmbTEventChooser.Items.Add(dr[1].ToString());
            }
            cmbTEventChooser.SelectedIndex = 0;

            //ages
            cmbTAgeFrom.Items.Add("From");
            cmbTAgeTo.Items.Add("To");
            for (int i = 5; i <= 60; i++)
            {
                cmbTAgeFrom.Items.Add(i.ToString());
                cmbTAgeTo.Items.Add(i.ToString());
            }
            cmbTAgeFrom.SelectedIndex = 0;
            cmbTAgeTo.SelectedIndex   = 0;

            //levels
            cmbTLevelFrom.Items.Add("From");
            cmbTLevelFrom.Items.Add("A");
            cmbTLevelFrom.Items.Add("B");
            cmbTLevelFrom.Items.Add("C");
            cmbTLevelFrom.Items.Add("D");

            cmbTLevelTo.Items.Add("To");
            cmbTLevelTo.Items.Add("A");
            cmbTLevelTo.Items.Add("B");
            cmbTLevelTo.Items.Add("C");
            cmbTLevelTo.Items.Add("D");

            cmbTLevelFrom.SelectedIndex = 0;
            cmbTLevelTo.SelectedIndex   = 0;


            //games
            cmbTGame.Items.Add("Select game type");
            cmbTGame.Items.Add("Game A");
            cmbTGame.Items.Add("Game B");
            cmbTGame.Items.Add("Game C");
            cmbTGame.Items.Add("Game D");
            cmbTGame.Items.Add("Game E");

            cmbTGame.SelectedIndex = 0;
        }