private void inscriptionGood(Clients myClient) { var clients = _db.Clients; foreach (Clients client in clients) { if (client.Nom.Equals(myClient.Nom) && myClient.Prenom.Equals(myClient.Prenom) && client.Adresse.Equals(myClient.Adresse) && client.Téléphone == myClient.Téléphone && client.Email.Equals(myClient.Email) && client.DateNaissance == myClient.DateNaissance) { if (!isModification) { MessageBox.Show("Client inscrit"); } else { MessageBox.Show("Client modifier"); } this.Hide(); ClientSheet clientInsert = new ClientSheet(myClient); clientInsert.Show(); clientList.InitializeClientList(""); } resetAllInput(); } }
private void allClientList_DoubleClick(object sender, EventArgs e) { int id = int.Parse(this.allClientList.SelectedItems[0].Text); Clients toShow = _db.Clients.Find(id); ClientSheet sheet = new ClientSheet(toShow); sheet.Show(); }