private void Init() { IEnumerable <TypeBiereWPF> typeBieres = Dal.GetAll().Select(p => p.GetTypeBiereWPF()); foreach (TypeBiereWPF item in typeBieres) { TypeBieres.Add(item); } IEnumerable <BiereWPF> bieres = DalBiere.GetAll().Select(p => p.GetBiereWPF()); foreach (BiereWPF item in bieres) { Bieres.Add(item); } IEnumerable <ClientWPF> clients = DalClient.GetAll().Select(p => p.GetClientWPF()); foreach (ClientWPF item in clients) { Clients.Add(item); } IEnumerable <CommandeWPF> commandes = DalCom.GetAll().Select(p => p.GetCommandeWPF()); foreach (CommandeWPF item in commandes) { Commandes.Add(item); } IEnumerable <ContactWPF> contacts = DalContact.GetAll().Select(p => p.GetContactWPF()); foreach (ContactWPF item in contacts) { Contacts.Add(item); } IEnumerable <EmploiWPF> emplois = DalEmploi.GetAll().Select(p => p.GetEmploiWPF()); foreach (EmploiWPF item in emplois) { Emplois.Add(item); } IEnumerable <EvenementWPF> evenements = DalEvent.GetAll().Select(p => p.GetEvenementWPF()); foreach (EvenementWPF item in evenements) { Evenements.Add(item); } IEnumerable <HorraireWPF> horraires = DalHorraire.GetAll().Select(p => p.GetHorraireWPF()); foreach (HorraireWPF item in horraires) { Horraires.Add(item); } IEnumerable <MessageWPF> messages = DalMessage.GetAll().Select(p => p.GetMessageWPF()); foreach (MessageWPF item in messages) { Messages.Add(item); } IEnumerable <RecompenseWPF> recompenses = DalRecomp.GetAll().Select(p => p.GetRecompenseWPF()); foreach (RecompenseWPF item in recompenses) { Recompenses.Add(item); } }
public void AjouterCommande(CommandeWPF a) { a.commandeId = DalCom.Create(a.GetCommandeDal()); // a.commandeId = DalCom.GetAll().LastOrDefault().commandeId; Commandes.Add(a); }