// Init public EcranPriseRendezVous() { InitializeComponent(); MgtClient monMgtClient = MgtClient.GetInstance(); MgtAnimal monMgtAnimal = new MgtAnimal(); Clients monClientSelectionne; Veterinaires monVeto; COMBO_Veto.DataSource = MgtVeterinaires.getAllVeto(); monVeto = (Veterinaires)COMBO_Veto.Items[0]; COMBO_Client.DataSource = monMgtClient.AfficherTout(); monClientSelectionne = (Clients)COMBO_Client.Items[0]; COMBO_Animal.DataSource = monMgtAnimal.AfficherTout().FindAll(t => t.CodeClient == monClientSelectionne.CodeClient); if (COMBO_Animal.Items.Count > 0) { COMBO_Animal.SelectedIndex = 0; } else { BTN_Suppr.Enabled = false; } DATE_RendezVous.MinDate = DateTime.Now; dataGrid.Columns["CodeVeto"].Visible = false; dataGrid.Columns["CodeAnimal"].Visible = false; ChangementDate(); ChargementDataGrid(); }
// 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); }
private void BTN_ajouterVeto_Click(object sender, EventArgs e) { EcranVetoAjouter _ecranAjouterVeterinaire; _ecranAjouterVeterinaire = new EcranVetoAjouter(); _ecranAjouterVeterinaire.Show(); DataGridVeto.DataSource = MgtVeterinaires.getAllVeto(); }
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(); }
public EcranAgenda() { InitializeComponent(); combo_agenda_veto.DataSource = MgtVeterinaires.getAllVeto(); dateTimePicker_agenda_date.Value = DateTime.Now; dataGridView_agenda.Columns["CodeVeto"].Visible = false; dataGridView_agenda.Columns["CodeAnimal"].Visible = false; }
public void EcranVeterinaires_Load(object sender, EventArgs e) { DataGridVeto.DataSource = MgtVeterinaires.getAllVeto(); }
public ecranReinitialisation() { InitializeComponent(); combo_reinit_nom.DataSource = MgtVeterinaires.getAllVeto(); }