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 ComboBox1_SelectedIndexChanged(object sender, System.EventArgs e) { if ((int)comboBox1.SelectedValue > 0) { ComboBox comboBox = (ComboBox)sender; List <DisciplinaEntity> discipline = SqlDal_Tournaments.GetDisciplineByIdTorneo((int)comboBox1.SelectedValue); this.comboBox2.DataSource = discipline.ToArray(); this.comboBox2.ValueMember = "IdDisciplina"; this.comboBox2.DisplayMember = "Nome"; } }
private void LoadAllResults() { var disciplines = SqlDal_Tournaments.GetDisciplineByIdTorneo(_idTorneo); foreach (var d in disciplines) { if (d.IdDisciplina == 0) { continue; //skip the empy record } TabItem item = new TabItem(); item.Header = d.Nome; item.Content = new TournamentReportByDiscipline(_idTorneo, d.IdDisciplina, d.Nome); tabControlResults.Items.Add(item); } tabControlResults.SelectedIndex = 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; }