// LA Methode pour le CheckBox, definit si l'offre est actuel public void Print() { try { ReportingOffre reportingOffre = new ReportingOffre(CurrentOffre.TypeImmobilier.TypeNom, CurrentOffre.Region.NomRegion, CurrentOffre.Adresse, CurrentOffre.Nombre_Etages, CurrentOffre.Etage, CurrentOffre.Pieces, CurrentOffre.Surface, CurrentOffre.Prix, CurrentOffre.Client.PrenomNom, CurrentOffre.IsActuel, CurrentOffre.NomOffre); OffreForm report = new OffreForm(new OffreReport(reportingOffre)); report.ShowDialog(); } catch (Exception) { MessageBox.Show("D'abord choisissez une Offre", "Avertissement", MessageBoxButton.OK, MessageBoxImage.Error); } }
public void Print() { try { ReportedVente reportedVente = new ReportedVente(CurrentVente.DateVenteFormated, CurrentVente.Agent.PrenomNom, CurrentVente.Client.PrenomNom, CurrentVente.Offre.Client.PrenomNom, CurrentVente.ComissionAgence, CurrentVente.ComissionAgent); ReportingOffre ro = new ReportingOffre(CurrentVente.Offre.NomOffre, CurrentVente.Offre.Adresse, CurrentVente.Offre.Prix, CurrentVente.Offre.Surface); reportedVente.reportingOffre = ro; VenteForm report = new VenteForm(new VenteReport(reportedVente)); report.ShowDialog(); } catch (Exception) { MessageBox.Show("D'abord choisissez une Vente", "Avertissement", MessageBoxButton.OK, MessageBoxImage.Error); } }
public void Print() { if (CurrentClient.Id != 0 && CurrentClient != null) { ReportedClient reportedClient = new ReportedClient(CurrentClient.PrenomNom, CurrentClient.Adresse, CurrentClient.Telephone); reportedClient.ReportedVentesListe = new List <VenteAcheteurReport>(); reportedClient.ReportedVentesVendeurListe = new List <VenteVendeurReport>(); reportedClient.ReportedOffres = new List <OffreReport>(); foreach (Offre v in CurrentClient.ListeVentes) { VenteClient va = new VenteClient(v.DateVenteFormated, v.NomOffre, v.Surface, v.Prix, v.Adresse, v.Region.NomRegion); VenteVendeurReport vr = new VenteVendeurReport(va); reportedClient.ReportedVentesVendeurListe.Add(vr); } foreach (Vente v in CurrentClient.Ventes) { VenteClient va = new VenteClient(v.DateVenteFormated, v.Offre.NomOffre, v.Offre.Surface, v.Offre.Prix, v.Offre.Adresse, v.Offre.Region.NomRegion); VenteAcheteurReport vr = new VenteAcheteurReport(va); reportedClient.ReportedVentesListe.Add(vr); } foreach (Offre o in CurrentClient.Offres) { ReportingOffre reportedOffre = new ReportingOffre(o.NomOffre, o.Adresse, o.Prix, o.Surface, o.IsActuel, o.Etage, o.Nombre_Etages); OffreReport or = new OffreReport(reportedOffre); reportedClient.ReportedOffres.Add(or); } ClientForm report = new ClientForm(new ClientReport(reportedClient)); report.ShowDialog(); } else { MessageBox.Show("D'abord choisissez un Client", "Avertissement", MessageBoxButton.OK, MessageBoxImage.Error); } }