Example #1
0
        public EClient Select(EClient eClient)
        {
            EClient       eResult = null;
            DataRow       dataRow;
            List <string> listColumns;

            dataRow = dClient.Select(eClient);
            if (dataRow != null)
            {
                listColumns = dataRow.GetColumns();
                eResult     = new EClient(dataRow, listColumns);
            }
            return(eResult);
        }
Example #2
0
 // Enregistre le telephone id dans la BDD
 internal bool SaveTelephone(Telephone tele)
 {
     try
     {
         if (tele.IdClient == 0)
         {
             tele.IdClient = DClient.Select(c => c.Id).Max();
         }
         DTelephone.Add(tele);
         SaveChanges();
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }
Example #3
0
 // Enregistre le tel id dans la BDD
 internal bool SaveAdresse(Adresse adressebol)
 {
     try
     {
         adressebol.IdClient = DClient.Select(c => c.Id).Max();
         if (adressebol != null)
         {
             DAdresse.Add(adressebol);
         }
         SaveChanges();
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }