public frmEditCompagne(Compaign compaign, bool newCampaign, string caption) { InitializeComponent(); // ribbonStatusBar.Ribbon = ribbonAnnonceur; //BBIView.Enabled = false; if (newCampaign) { // BBIView.Enabled = false; // BBISupp.Enabled = false; // BBINext.Enabled = false; // BBIPrev.Enabled = false; } editionCampagnePresenter = new EditionCampagnePresenter(this, new VagueRepository(), new AnnonceurRepository(), new FilterRepository(), new PlanTvRepository(), new PlanRdRepository(), new PlanPrRepository()); editionCampagnePresenter.Display(); SLUAnnonceur.Properties.DataSource = Annonceurs; SLUCible.Properties.DataSource = Filters; SLUVague.Properties.DataSource = Vague; /* GCTele.DataSource = PlanTvs; GVTv.Columns[0].Visible = false; GCRadio.DataSource = PlanRds; GVRadio.Columns[0].Visible = false; GCPresse.DataSource = PlanPresses; GVPresse.Columns[0].Visible = false; */ // DictionaryHelper.InitDictionary(spellChecker1); DialogResult = DialogResult.Cancel; sourceCompaign = compaign; _isCampaignModified = newCampaign; }
public frmEditCompagne(Compaign compaign, bool newCampaign, string caption) { InitializeComponent(); if (newCampaign) { // BBIView.Enabled = false; // BBISupp.Enabled = false; // BBINext.Enabled = false; // BBIPrev.Enabled = false; } editionCampagnePresenter = new EditionCampagnePresenter(this, new VagueRepository(), new AnnonceurRepository(), new FilterRepository(), new PlanTvRepository(), new PlanRdRepository(), new PlanPrRepository()); editionCampagnePresenter.Display(); SLUAnnonceur.Properties.DataSource = Annonceurs; var b = SLUAnnonceur.EditValue; if (!Annonceurs.Any() || Annonceurs == null || SLUAnnonceur.EditValue == null) SLUMarque.Properties.DataSource = new List<Marque>(); else { var listeMarques = Annonceurs.First(a => a.id.ToString() == SLUAnnonceur.EditValue).Marques; SLUMarque.Properties.DataSource = listeMarques.Any() ? listeMarques : new List<Marque>(); } SLUCible.Properties.DataSource = Filters; SLUVague.Properties.DataSource = Vague; /* GCTele.DataSource = PlanTvs; GVTv.Columns[0].Visible = false; GCRadio.DataSource = PlanRds; GVRadio.Columns[0].Visible = false; GCPresse.DataSource = PlanPresses; GVPresse.Columns[0].Visible = false; */ // DictionaryHelper.InitDictionary(spellChecker1); DialogResult = DialogResult.Cancel; sourceCompaign = compaign; _isCampaignModified = newCampaign; }