public void LoadContentData(DigitalProductsContent content)
		{
			_content = content;

			_allowToSave = false;
			buttonXCategory.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowCategory;
			buttonXGroup.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowGroup;
			buttonXProduct.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowProduct;
			buttonXImpressions.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowImpressions;
			buttonXCPM.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowCPM;
			buttonXRate.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowRate;
			buttonXInvestment.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowInvestment;
			buttonXInfo.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowInfo;
			buttonXLocation.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowLocation;
			buttonXScreenshot.Checked = _content.StandalonePackage.DigitalPackageSettings.ShowScreenshot;
			switch (_content.StandalonePackage.DigitalPackageSettings.Formula)
			{
				case FormulaType.CPM:
					checkEditFormulaCPM.Checked = true;
					checkEditFormulaInvestment.Checked = false;
					checkEditFormulaImpressions.Checked = false;
					break;
				case FormulaType.Investment:
					checkEditFormulaCPM.Checked = false;
					checkEditFormulaInvestment.Checked = true;
					checkEditFormulaImpressions.Checked = false;
					break;
				case FormulaType.Impressions:
					checkEditFormulaCPM.Checked = false;
					checkEditFormulaInvestment.Checked = false;
					checkEditFormulaImpressions.Checked = true;
					break;
			}
			_allowToSave = true;
		}
		public void LoadContentData(DigitalProductsContent content)
		{
			_content = content;

			_allowToSave = false;
			buttonXDimensions.Enabled = _content.ScheduleSettings.DigitalProductListViewSettings.EnableDigitalDimensions;
			buttonXLocation.Enabled = _content.ScheduleSettings.DigitalProductListViewSettings.EnableDigitalLocation;
			buttonXStrategy.Enabled = _content.ScheduleSettings.DigitalProductListViewSettings.EnableDigitalStrategy;
			buttonXTargeting.Enabled = _content.ScheduleSettings.DigitalProductListViewSettings.EnableDigitalTargeting;
			buttonXRichMedia.Enabled = _content.ScheduleSettings.DigitalProductListViewSettings.EnableDigitalRichMedia;

			buttonXDimensions.Checked = _content.ScheduleSettings.DigitalProductListViewSettings.ShowDigitalDimensions;
			buttonXLocation.Checked = _content.ScheduleSettings.DigitalProductListViewSettings.ShowDigitalLocation;
			buttonXStrategy.Checked = _content.ScheduleSettings.DigitalProductListViewSettings.ShowDigitalStrategy;
			buttonXTargeting.Checked = _content.ScheduleSettings.DigitalProductListViewSettings.ShowDigitalTargeting;
			buttonXRichMedia.Checked = _content.ScheduleSettings.DigitalProductListViewSettings.ShowDigitalRichMedia;
			_allowToSave = true;
		}
Esempio n. 3
0
        public DigitalProduct(DigitalProductsContent parent)
        {
            Parent          = parent;
            UniqueID        = Guid.NewGuid();
            Category        = string.Empty;
            Websites        = new List <string>();
            AddtionalInfo   = new List <ProductInfo>();
            PackageRecord   = new ProductPackageRecord(this);
            AdPlanSettings  = new DigitalProductAdPlanSettings();
            RateType        = "CPM";
            EnableLocation  = true;
            EnableTarget    = true;
            EnableRichMedia = true;

            OutputData = new DigitalProductOutputData(this);

            ApplyDefaultView();
        }
		public void UpdateData(
			DigitalProductsContent content,
			IDigitalScheduleSettings scheduleSettings,
			Action onDataChanged)
		{
			Content = content;
			ScheduleSettings = scheduleSettings;
			_onDataChanged = onDataChanged;

			gridControl.DataSource = new BindingList<DigitalProduct>(Content.DigitalProducts);

			if (ListManager.Instance.ProductSources.All(productSource => String.IsNullOrEmpty(productSource.SubCategory)))
			{
				gridColumnCategory.RowCount = 2;
				gridColumnSubCategory.Visible = false;
			}

			if (ListManager.Instance.LockedMode)
			{
				gridColumnWidth.OptionsColumn.ReadOnly = true;
				gridColumnWidth.OptionsColumn.AllowEdit = false;
				gridColumnHeight.OptionsColumn.ReadOnly = true;
				gridColumnHeight.OptionsColumn.AllowEdit = false;
				repositoryItemComboBoxProductName.TextEditStyle = TextEditStyles.DisableTextEditor;
			}

			repositoryItemComboBoxRateType.Items.Clear();
			repositoryItemComboBoxRateType.Items.AddRange(ListManager.Instance.PricingStrategies);
			repositoryItemComboBoxLocation.Items.Clear();
			repositoryItemComboBoxLocation.Items.AddRange(ListManager.Instance.ColumnPositions);

			if (_dragDropHelper == null)
			{
				_dragDropHelper = new GridDragDropHelper(advBandedGridView, true, handledColumns: new[] { gridColumnPosition });
				_dragDropHelper.AfterDrop += DigitalProductsAfterDrop;
			}
		}
		public void LoadContent(DigitalProductsContent editedContent)
		{
			_editedContent = editedContent;
			_settingsControls.OfType<ISettingsControl>().ToList().ForEach(c => c.LoadContentData(_editedContent));
		}