public VM_Achat()
        {
            UnAchat = new VM_UnAchat();
            string Index = UnAchat.IDOperation.ToString();

            BcpAchats       = ChargerAchat(chConnexion, Index);
            ActiverUneFiche = false;
            cConfirmer      = new BaseCommande(Confirmer);
            cAnnuler        = new BaseCommande(Annuler);
            cAjouter        = new BaseCommande(Ajouter);
            cModifier       = new BaseCommande(Modifier);
            cSupprimer      = new BaseCommande(Supprimer);
            cEssaiSelMult   = new BaseCommande(EssaiSelMult);
        }
 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;
     }
 }
 public void Ajouter()
 {
     UnAchat         = new VM_UnAchat();
     nAjout          = -1;
     ActiverUneFiche = true;
 }