private void BTN_SupprimerVeto_Click(object sender, EventArgs e) { Veterinaires veto = (Veterinaires)DataGridVeto.CurrentRow.DataBoundItem; MgtVeterinaires.deleteVeto(veto); EcranVeterinaires_Load(sender, e); }
// Init public EcranConsultation(Agendas pAgenda) { InitializeComponent(); _monAgenda = pAgenda; _monAnimal = monMgtAnimal.AfficherUneSeul(pAgenda.CodeAnimal.Value); _monVeto = MgtVeterinaires.getOneVeto(pAgenda.CodeVeto.Value); TXT_CodeAnimal.Text = _monAnimal.CodeAnimal.Value.ToString(); TXT_Couleur.Text = _monAnimal.Couleur; TXT_Espece.Text = _monAnimal.Race.Espece; TXT_NomAnimal.Text = _monAnimal.NomAnimal; TXT_Race.Text = _monAnimal.Race.Race; TXT_Sexe.Text = _monAnimal.Sexe.ToString(); TXT_Tatouage.Text = _monAnimal.Tatouage; DATE_Acte.Text = pAgenda.DateRDV.Value.ToString(); COMBO_Veto.DataSource = MgtVeterinaires.getAllVeto(); for (int i = 0; i < COMBO_Veto.Items.Count; i++) { if (((Veterinaires)COMBO_Veto.Items[i]).CodeVeto.Value == pAgenda.CodeVeto.Value) { COMBO_Veto.SelectedIndex = i; break; } } COMBO_TypeActe.DataSource = MgtBaremes.AffichierTout().Select(x => x.TypeActe).Distinct().ToList <string>(); ChangementCOMBO(true, false); }
public void LoadInformations(Veterinaires vet) { Nom.Text = vet.Nom; Prenom.Text = vet.Prenom; Adresse.Text = vet.Adresse; Telephone.Text = vet.Telephone; Mail.Text = vet.Mail; }
private void BTN_ReinitialiserVeto_Click(object sender, EventArgs e) { Veterinaires veto = (Veterinaires)DataGridVeto.CurrentRow.DataBoundItem; ecranReinitialisation _ecranReinit; _ecranReinit = new ecranReinitialisation(); _ecranReinit.Show(); DataGridVeto.DataSource = MgtVeterinaires.getAllVeto(); }
// Click private void BTN_Urgence_Click(object sender, EventArgs e) { Agendas monAgenda = new Agendas(); Clients monClient = (Clients)COMBO_Client.SelectedItem; Animaux monAnimal = (Animaux)COMBO_Animal.SelectedItem; Veterinaires monVeto = (Veterinaires)COMBO_Veto.SelectedItem; monAgenda.CodeAnimal = monAnimal.CodeAnimal; monAgenda.CodeVeto = monVeto.CodeVeto; monAgenda.DateRDV = DateTime.Now; MgtAgenda.Ajouter(monAgenda); ChargementDataGrid(); }
public void LoadInfoCheval(string name) { cheval = databaseManager.InformationCheval(name); prop = databaseManager.RetrieveProprietaire(cheval.IdProprietaire); marechal = databaseManager.RetrieveMarechal(cheval.IdMarechal); veterinaire = databaseManager.RetrieveVeterinaire(cheval.IdVeterinaire); Nom.Content = cheval.Nom; Race.Text = cheval.Race; Sire.Text = cheval.Sire; Annee.Text = cheval.Annee.ToString(); Sexe.Text = cheval.Sexe; Robe.Text = cheval.Robe; Pere.Text = cheval.Pere; Mere.Text = cheval.Mere; Proprietaire.Text = prop != null ? prop.Nom : "Inconnu"; Veterinaire.Text = veterinaire != null ? veterinaire.Nom : "Inconnu"; Marechal.Text = marechal != null ? marechal.Nom : "Inconnu"; TreatInformations(); CheckButton(); }
private void BTN_Valider_Click(object sender, EventArgs e) { Clients monClient = (Clients)COMBO_Client.SelectedItem; Animaux monAnimal = (Animaux)COMBO_Animal.SelectedItem; Veterinaires monVeto = (Veterinaires)COMBO_Veto.SelectedItem; Agendas monAgenda = new Agendas(); monAgenda.CodeAnimal = monAnimal.CodeAnimal; monAgenda.CodeVeto = monVeto.CodeVeto; try { monAgenda.DateRDV = new DateTime(DATE_RendezVous.Value.Year, DATE_RendezVous.Value.Month, DATE_RendezVous.Value.Day, (int)COMBO_Heure.SelectedValue, (int)COMBO_Minutes.SelectedValue, 0); } catch (Exception ex) { throw new Exception("Problème lors du passage de la date concernant l'ajout d'un RDV en urgence :\n" + ex.Message); } MgtAgenda.Ajouter(monAgenda); ChargementDataGrid(); }
public static void resetPasswordVeto(Veterinaires veto, string newCode, string confirmMDP) { ADO_Veterinaires.reinitialiserMotPasseVeto(veto, newCode, confirmMDP); }
public static void deleteVeto(Veterinaires veto) { ADO_Veterinaires.supprimerVeto(veto); }