private void castButton_Click(object sender, EventArgs e) { // Cast aCast = new Cast(); aVotarBll = new VotarBLL(); aCastBll = new CastBLL(); aCast.VotarEmail = emailTextBox.Text; aCast.Symbol = symbolComboBox.Text; // aVotar.VotarEmail = emailVotar; //List<Votar> emails = new List<Votar>(); //emails = aVotarBll.CollectEmail(aVotar.VotarEmail,winnersNumber); //foreach (Votar aEmail in emails) //{ //} maxCastNo = aCast.MaxNoOfWinners; //if (aCast.MaxNoOfWinners > 0) //{ // maxCastNo = 1; //} string msg = aCastBll.Save(maxCastNo, aCast.Symbol, aCast.VotarEmail); // currentSymbol,emailVotar MessageBox.Show(msg); aCast.MaxNoOfWinners--; }
public CandidateEntryUI() { InitializeComponent(); aCast = new Cast(); aVotar = new Votar(); aMixedCandidateCastBll = new MixedCandidateCastBLL(); aCandidateBll = new CandidateBLL(); symbolComboBox.DisplayMember = "CandidateSymbol"; List <Candidate> candidates = new List <Candidate>(); aCastBll = new CastBLL(); candidates = aCandidateBll.GetSymbol(); foreach (Candidate symbol in candidates) { symbolComboBox.Items.Add(symbol); } }