public virtual void LoadSectionData(ScheduleSection sectionData) { _sectionSummaryContent = (ISectionSummaryContent)_baseSummarySettings; _allowToSave = false; checkEditBusinessName.Text = String.Format("{0}", _sectionSummaryContent.Parent.Parent.ParentScheduleSettings.BusinessName); checkEditDecisionMaker.Text = String.Format("{0}", _sectionSummaryContent.Parent.Parent.ParentScheduleSettings.DecisionMaker); checkEditPresentationDate.Text = String.Format("Presentation Date: {0}", _sectionSummaryContent.Parent.Parent.ParentScheduleSettings.PresentationDate.HasValue ? _sectionSummaryContent.Parent.Parent.ParentScheduleSettings.PresentationDate.Value.ToString("MM/dd/yyyy") : String.Empty); checkEditFlightDates.Text = String.Format("Campaign Dates: {0}", _sectionSummaryContent.Parent.Parent.ParentScheduleSettings.FlightDates); checkEditBusinessName.Checked = _baseSummarySettings.ShowAdvertiser; checkEditDecisionMaker.Checked = _baseSummarySettings.ShowDecisionMaker; checkEditPresentationDate.Checked = _baseSummarySettings.ShowPresentationDate; checkEditFlightDates.Checked = _baseSummarySettings.ShowFlightDates; checkEditMonthlyInvestment.Checked = _baseSummarySettings.ShowMonthly; checkEditTotalInvestment.Checked = _baseSummarySettings.ShowTotal; checkEditTableOutput.Checked = _baseSummarySettings.TableOutput; UpdateTotals(); _allowToSave = true; }
public void Deserialize(XmlNode node) { foreach (XmlNode childNode in node.ChildNodes) { switch (childNode.Name) { case "SummaryType": { SectionSummaryTypeEnum temp; if (Enum.TryParse(childNode.InnerText, out temp)) { SummaryType = temp; } } break; } } Content = CreateContentBySummaryType(); var contentNode = node.SelectSingleNode("Content"); if (contentNode != null) { Content.Deserialize(contentNode); } }
public void ChangeSummaryType(SectionSummaryTypeEnum newType) { if (newType == SummaryType) { return; } SummaryType = newType; Content = CreateContentBySummaryType(); }
public void Deserialize(XmlNode node) { foreach (XmlNode childNode in node.ChildNodes) switch (childNode.Name) { case "SummaryType": { SectionSummaryTypeEnum temp; if (Enum.TryParse(childNode.InnerText, out temp)) SummaryType = temp; } break; } Content = CreateContentBySummaryType(); var contentNode = node.SelectSingleNode("Content"); if (contentNode != null) Content.Deserialize(contentNode); }
public SectionSummary(ScheduleSection parent) { Parent = parent; SummaryType = SectionSummaryTypeEnum.Custom; Content = CreateContentBySummaryType(); }
public void ChangeSummaryType(SectionSummaryTypeEnum newType) { if (newType == SummaryType) return; SummaryType = newType; Content = CreateContentBySummaryType(); }