コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }