public static bool NeedsAncestorCalculator(XElement ancestorCalcElement) { bool bNeedsCalculators = false; string sUseSameCalculator = EditHelpers.XmlLinq.GetAttributeValue(ancestorCalcElement, AppHelpers.Calculator.cUseSameCalculator); if (!string.IsNullOrEmpty(sUseSameCalculator)) { bNeedsCalculators = GeneralHelpers.ConvertToBoolean(sUseSameCalculator); } return(bNeedsCalculators); }
public static bool NeedsAncestorCalculator(ContentURI calcDocURI, XElement ancestorXmlDocElement) { bool bNeedsCalculators = false; XElement ancestorCalculatorElement = EditHelpers.XmlLinq.GetElement(ancestorXmlDocElement, AppHelpers.LinkedViews.LINKEDVIEWS_TYPES.linkedview.ToString(), calcDocURI.URIId.ToString()); string sUseSameCalculator = string.Empty; if (ancestorCalculatorElement != null) { sUseSameCalculator = EditHelpers.XmlLinq.GetAttributeValue(ancestorCalculatorElement, AppHelpers.Calculator.cUseSameCalculator); } if (!string.IsNullOrEmpty(sUseSameCalculator)) { bNeedsCalculators = GeneralHelpers.ConvertToBoolean(sUseSameCalculator); } return(bNeedsCalculators); }