private void button5_Click(object sender, EventArgs e) { if ((this.listBoxGRP_2.SelectedIndex != -1)) { string lib = this.listBoxGRP_2.SelectedItem.ToString(); this.listBoxGRP_1.Items.Add(this.listBoxGRP_2.SelectedItem); this.listBoxGRP_2.Items.Remove(this.listBoxGRP_2.SelectedItem); int num = BDGestionAccess2013.GROUPES_GETIDBYLIB(lib); BDGestionAccess2013.DELETE_GRPPERS(num, personneAmodifier.idPers); } else { this.InfoLab.Text = "Selectionnez un groupe dans la liste de droite"; } }
private void button6_Click(object sender, EventArgs e) { string g = ""; if ((this.comboBoxSupprGRP.SelectedItem != null)) { if (this.comboBoxSupprGRP.SelectedItem.ToString() != "") { g = this.comboBoxSupprGRP.SelectedItem.ToString(); int num = BDGestionAccess2013.GROUPES_GETIDBYLIB(this.comboBoxSupprGRP.SelectedItem.ToString()); BDGestionAccess2013.DELETE_GROUPE(num); this.InfoLab.Text = "Le groupe " + g + " a été supprimé"; this.miseAjourGroupes(); } } }
private void CreerButt_Click(object sender, EventArgs e) { PersonneClass p = null; if ((this.textBoxNom.Text != "") && (this.textBoxNom.Text != "")) { if (!modeModif) { // A BETONNER p = new PersonneClass(); p.civilite = this.comboBox1.Text; p.prenom = this.textBoxpn.Text; p.nom = this.textBoxNom.Text; p.dateNaissance = this.dateTimePicker1.Value.ToShortDateString(); p.e_mail = this.textBoxEmail.Text; p.telfixe = this.textBoxTelfixe.Text; p.telportable = this.textBoxTelMob.Text; p.fax = this.textBoxFax.Text; p.adresse = this.textBoxAdr.Text; p.cp = this.textBoxCP.Text; p.ville = this.textBoxVille.Text; p.bp = this.textBoxBP.Text; p.adrImage = this.textBoxImage.Text; p.note = this.textBoxNote.Text; p.adrDocCV = this.textBoxCV.Text; p.site = this.textBoxSite.Text; p.activite = this.textBoxActivite.Text; BDGestionAccess2013.CREA_PERSONNE(p); this.InfoLab.Text = "La personne a été créée"; } else { p = this.personneAmodifier; p.civilite = this.comboBox1.Text; p.prenom = this.textBoxpn.Text; p.nom = this.textBoxNom.Text; p.dateNaissance = this.dateTimePicker1.Value.ToShortDateString(); p.e_mail = this.textBoxEmail.Text; p.telfixe = this.textBoxTelfixe.Text; p.telportable = this.textBoxTelMob.Text; p.fax = this.textBoxFax.Text; p.adresse = this.textBoxAdr.Text; p.cp = this.textBoxCP.Text; p.ville = this.textBoxVille.Text; p.bp = this.textBoxBP.Text; p.adrImage = this.textBoxImage.Text; p.note = this.textBoxNote.Text; p.adrDocCV = this.textBoxCV.Text; p.site = this.textBoxSite.Text; p.activite = this.textBoxActivite.Text; BDGestionAccess2013.MODIFIE_PERSONNE(p); this.InfoLab.Text = "La personne a été modifiée"; } } else { this.InfoLab.Text = "Commencez à créer votre contact sur l'onglet [joindre rapidement]"; } foreach (string o in this.listBoxGRP_2.Items) { int idg = BDGestionAccess2013.GROUPES_GETIDBYLIB(o); int idp = BDGestionAccess2013.PERSONNES_GETIDBYPERS(p); BDGestionAccess2013.CREA_GRPPERS(idg, idp); } this.RechargerContacts(); }