Esempio n. 1
0
 public ResultWindow()
 {
     InitializeComponent();
     foreach (Party party in sql.LoadAllParties())
     {
         cbParty.Items.Add(party);
     }
     foreach (Election election in sql.LoadElections())
     {
         cbElections.Items.Add(election);
     }
     lblTitle.Visible    = false;
     election.parties    = new List <Party>();
     election.results    = new List <ElectionResult>();
     tbDateTime.Visible  = true;
     lblDateTime.Visible = true;
     Update.Text         = "Nieuw resultaat";
 }
Esempio n. 2
0
 private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tabControl.SelectedTab == tabControl.TabPages["tpParties"])
     {
         lbParties.Items.Clear();
         foreach (Party party in sql.LoadAllParties())
         {
             lbParties.Items.Add(party);
         }
     }
     else if (tabControl.SelectedTab == tabControl.TabPages["tpResults"])
     {
     }
     else if (tabControl.SelectedTab == tabControl.TabPages["tpCoalition"])
     {
         cbCoaltion.Items.Clear();
         foreach (Coalition coalition in sql.LoadAllCoalitions())
         {
             cbCoaltion.Items.Add(coalition);
         }
     }
 }