private void opslaanButton_Click(object sender, EventArgs e) { Persoon persoon = PersoonOpslaan(); List <Inschrijving> inschrijvingen = DataInschrijving.GeefInschrijving(persoon); Nullable <int> inschrijvingId = null; foreach (Inschrijving ins in inschrijvingen) { if (!DataInschrijvingConferentieDagLink.BestaatLink(ins, InvokeCOnferentieListBox())) { inschrijvingId = DataInschrijving.InschrijvingToevoegen(persoon.ID); break; } } if (inschrijvingId != null) { InschrijvingToevoegen((int)inschrijvingId); DataFactuur.FactuurToevoegen(_prijs, (int)inschrijvingId, factuurUserControl2.Factuurnummer, DateTime.Now, null); MessageBox.Show("Inschrijving en factuur toegevoegd. Er wordt nu een bericht verzonden met een bevesteging.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); //InschrijvingToegevoegd(); //ZendProgressBar.Visible = true; Thread thread = new Thread(ZendEMail); thread.IsBackground = true; thread.Start(); } else { MessageBox.Show("Deze inschrijving is al toegevoegd.", "Opgepast", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void coneferentieComboBox_SelectedIndexChanged(object sender, EventArgs e) { Conferentie conf = (Conferentie)coneferentieComboBox.SelectedItem; sessieComboBox.Items.Clear(); expertComboBox.Items.Clear(); conferentieDagComboBox.Items.Clear(); conferentieDagComboBox.Items.AddRange(DataInschrijvingConferentieDagLink.GeefIngeschrevenDagenVanPersoon(_persoon.ID, conf.ID).ToArray()); }
private void InschrijvingToevoegen(int inschrijvingsId) { foreach (ConferentieDag dag in conferentieDagenCheckedListBox.CheckedItems) { if (!DataInschrijvingConferentieDagLink.BestaatLink(dag.ID, inschrijvingsId)) { DataInschrijvingConferentieDagLink.LinkToevoegen(dag.ID, inschrijvingsId); } } }
private void AanvullenIsnchrijvingen() { List <Tuple <Persoon, Conferentie, int> > a = DataInschrijvingConferentieDagLink.GeefInschrijvingen(); foreach (Tuple <Persoon, Conferentie, int> tuple in a) { ListViewItem lvi = new ListViewItem(tuple.Item1.ToString()); lvi.SubItems.AddRange(new string[] { tuple.Item2.NaamConferentie, tuple.Item3.ToString() }); inschrijvingenItemListVieuw1.Add(tuple, lvi); } }
private void EvaluatieForm_Load(object sender, EventArgs e) { coneferentieComboBox.Items.AddRange(DataInschrijvingConferentieDagLink.GeefInschrijvingenVanPersoon(_persoon.ID).ToArray()); }