public void AfwezigAanwezig(Gebruiker gebruiker) { repoGebruiker = new RepositoryGebruiker(new MSSQLGebruiker()); if (gebruiker.Aanwezig == true) { repoGebruiker.ZetGebruikerOpAfwezig(gebruiker.ID); } else { repoGebruiker.ZetGebruikerOpAanwezig(gebruiker.ID); } }
private void txtAanmelden_TextChanged(object sender, EventArgs e) { try { rg.ZetGebruikerOpAanwezig(Convert.ToInt32(txtAanmelden.Text)); MessageBox.Show("Bezoeker aangemeld."); this.Close(); } catch (FoutBijUitvoerenQueryException exc) { MessageBox.Show(exc.Message); } }
private void txtBezoekerAanmelden_TextChanged(object sender, EventArgs e) { if (txtBezoekerAanmelden.Text != "") { try { rg.ZetGebruikerOpAanwezig(Convert.ToInt32(txtBezoekerAanmelden.Text)); txtBezoekerAanmelden.Text = ""; } catch (Exception ex) { MessageBox.Show(ex.Message); } AanwezigeBezoekerslijstVullen(); } }