//Pour charger les clients afin de les afficher dans le dgv private ObservableCollection <C_AchatVente> ChargerAchat(string chConn, string Index) { ObservableCollection <C_AchatVente> rep = new ObservableCollection <C_AchatVente>(); List <C_AchatVente> lTmp = new Model.G_AchatVente(chConn).Lire(Index); foreach (C_AchatVente Tmp in lTmp) { if (Tmp.typeOperation == "achat") { rep.Add(Tmp); } } return(rep); }
public void Modifier() { if (AchatSelectionnee != null) { C_AchatVente Tmp = new Model.G_AchatVente(chConnexion).Lire_ID(AchatSelectionnee.idOperation); UnAchat = new VM_UnAchat(); UnAchat.IDOperation = Tmp.idOperation; UnAchat.IDVoiture = Tmp.idVoiture; UnAchat.IDClient = Tmp.idClient; UnAchat.Prix = Tmp.prixOperation; UnAchat.Date = Tmp.dateOperation; UnAchat.IDPaiement = Tmp.idPaiement; UnAchat.Type = Tmp.typeOperation; nAjout = BcpAchats.IndexOf(AchatSelectionnee); ActiverUneFiche = true; } }