예제 #1
0
        public void DeleteRecompense(int i)
        {
            RecompenseWPF wpf = Recompenses.Where(p => p.recompenseId == i).FirstOrDefault();

            Recompenses.Remove(wpf);
            DalRecomp.Delete(i);
        }
예제 #2
0
 public void EditerRecompense(RecompenseWPF b)
 {
     if (Recompenses.Count() > 0)
     {
         for (int i = 0; i < Recompenses.Count(); i++)
         {
             if (Recompenses[i].recompenseId == b.recompenseId)
             {
                 Recompenses[i] = b;
                 i = Recompenses.Count() + 2;
             }
         }
     }
     DalRecomp.Update(b.GetRecompenseDal());
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
 public void AjouterRecompense(RecompenseWPF a)
 {
     a.recompenseId = DalRecomp.Create(a.GetRecompenseDal());
     // a.recompenseId = DalRecomp.GetAll().LastOrDefault().recompenseId;
     Recompenses.Add(a);
 }