public static ParametreCommandeAfficherLesBovins GetParametreAfficherLesBovins(string chargeUtile) { List <Bovin> bovins = JsonConvert.DeserializeObject <List <Bovin> >(chargeUtile); ParametreCommandeAfficherLesBovins param = new ParametreCommandeAfficherLesBovins { ListeDesBovins = bovins }; return(param); }
public override void Execute() { if (Parametre != null) { ParametreCommandeAfficherLesBovins param = (ParametreCommandeAfficherLesBovins)Parametre; StringBuilder bovins = new StringBuilder(); foreach (Bovin bovin in param.ListeDesBovins) { bovins.Append(bovin.ToString() + Environment.NewLine); } MessageBox.Show(bovins.ToString(), "Liste des bovins", MessageBoxButton.OK, MessageBoxImage.Information); } }