Page 654 - IT2
P. 654
if(t.dureeEstimee== Convert.ToInt32( textBox1.Text )&& Convert.ToInt32(
textBox2.Text.Trim().Substring(3, 2))== DateTime.Now.Month)
foreach (Patient p in t.lp)
dataGridView1.Rows.Add(p.Cin, p.Genre, p.Age, p.Nom, p.Prenom, p.Tel1, p.Adresse);
}
}
5. Créer le code du bouton Statistique permettant d’afficher le total des patients transporté par
une ambulance donnée en paramètre.
public List<Transport> lt;
private void button1_Click(object sender, EventArgs e)
{
int total = 0;
foreach (Transport t in lt)
{
if(t.ambulance.Numero1== Convert.ToInt32(textBox1.Text))
total += t.lp.Count;
}
textBox2.Text= total.ToString();
}
Filière Epreuve Session 13/13
TDI (CDS de 2 à 3) Synthèse V2 (Correction) Juillet 2014
www.itlearning-settat.com
Email: admission@itlearning-settat.com
Tél.:0661077812

