public int getLastSaleId() { int maxs = 0; int maxc = 0; if (CommandeList.Count > 0) { maxc = CommandeList.Select(x => x.getId()).Max(); } if (saleList.Count > 0) { maxs = saleList.Select(x => x.getId()).Max(); } if (maxc > maxs) { return(maxc); } else { return(maxs); } }
public void Addcommande(Commande cmd) { CommandeList.Add(cmd); DatabaseClassInterface.addCommande(cmd); }