Exemple #1
0
        public ManageTournament()
        {
            InitializeComponent();

            this.StartPosition = FormStartPosition.CenterScreen;

            List <TorneoEntity> tornei = SqlDal_Tournaments.GetTorneiAttivi(false);

            this.comboBox1.DataSource            = tornei.ToArray();
            this.comboBox1.ValueMember           = "Id";
            this.comboBox1.DisplayMember         = "Name";
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1_SelectedIndexChanged);
            this.comboBox1.SelectedItem          = 0;

            //La inizializzo a 0
            List <DisciplinaEntity> discipline = SqlDal_Tournaments.GetDisciplineByIdTorneo(0);

            this.comboBox2.DataSource    = discipline.ToArray();
            this.comboBox2.ValueMember   = "IdDisciplina";
            this.comboBox2.DisplayMember = "Nome";
            this.comboBox2.SelectedItem  = 0;

            buttonLoadIscritti.DialogResult = DialogResult.OK;
            buttonClose.DialogResult        = DialogResult.Abort;

            buttonPrintList.Enabled = false;
        }
        public CaricaGironiDaDisciplina(bool export)
        {
            InitializeComponent();
            var dbType = Helper.GetDbType();

            this.StartPosition = FormStartPosition.CenterScreen;

            if (export)
            {
                this.buttonOk.Text = "Carica Risultati";
            }

            List <TorneoEntity> tornei = !export?SqlDal_Tournaments.GetTorneiAttivi(false) : SqlDal_Tournaments.GetTorneiConclusi(false);

            this.comboBox1.DataSource            = tornei.ToArray();
            this.comboBox1.ValueMember           = "Id";
            this.comboBox1.DisplayMember         = "Name";
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1_SelectedIndexChanged);

            //La inizializzo a 0
            List <DisciplinaEntity> discipline = SqlDal_Tournaments.GetDisciplineByIdTorneo(0);

            this.comboBox2.DataSource    = discipline.ToArray();
            this.comboBox2.ValueMember   = "IdDisciplina";
            this.comboBox2.DisplayMember = "Nome";



            buttonOk.DialogResult     = DialogResult.OK;
            buttonCancel.DialogResult = DialogResult.Abort;
        }
        private void LoadTornei()
        {
            List <TorneoEntity> tornei = SqlDal_Tournaments.GetTorneiAttivi(true);

            this.comboBoxTornei.DataSource    = tornei.ToArray();
            this.comboBoxTornei.ValueMember   = "TournamentId";
            this.comboBoxTornei.DisplayMember = "TournamentName";
            this.comboBoxTornei.SelectedItem  = 0;
        }
Exemple #4
0
        public CreaGironiDaDisciplina()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;

            List <TorneoEntity> tornei = SqlDal_Tournaments.GetTorneiAttivi(false);

            this.comboBox1.DataSource            = tornei.ToArray();
            this.comboBox1.ValueMember           = "Id";
            this.comboBox1.DisplayMember         = "Name";
            this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.Tornei_SelectedIndexChanged);

            //La inizializzo a 0
            List <DisciplinaEntity> discipline = SqlDal_Tournaments.GetDisciplineByIdTorneo(0);

            this.comboBox2.DataSource    = discipline.ToArray();
            this.comboBox2.ValueMember   = "IdDisciplina";
            this.comboBox2.DisplayMember = "Nome";

            buttonOk.DialogResult     = DialogResult.OK;
            buttonCancel.DialogResult = DialogResult.Abort;
        }
 private void LoadActiveTournaments()
 {
     activeTournamentList = SqlDal_Tournaments.GetTorneiAttivi(true);
     dataGridActiveTournament.ItemsSource = activeTournamentList;
 }