public VM_Vente() { UneVente = new VM_UneVente(); string Index = UneVente.IDOperation.ToString(); BcpVente = ChargerVente(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 (VenteSelectionnee != null) { C_AchatVente Tmp = new Model.G_AchatVente(chConnexion).Lire_ID(VenteSelectionnee.idOperation); UneVente = new VM_UneVente(); UneVente.IDOperation = Tmp.idOperation; UneVente.IDVoiture = Tmp.idVoiture; UneVente.IDClient = Tmp.idClient; UneVente.Prix = Tmp.prixOperation; UneVente.Date = Tmp.dateOperation; UneVente.IDPaiement = Tmp.idPaiement; UneVente.Type = Tmp.typeOperation; nAjout = BcpVente.IndexOf(VenteSelectionnee); ActiverUneFiche = true; } }
public void Ajouter() { UneVente = new VM_UneVente(); nAjout = -1; ActiverUneFiche = true; }