CSReportDll.cReportSectionLine.load C# (CSharp) Метод

load() приватный Метод

private load ( CSXml xDoc, XmlNode nodeObj ) : bool
xDoc CSXml
nodeObj XmlNode
Результат bool
        internal bool load(CSXml.cXml xDoc, XmlNode nodeObj) 
        {
            XmlNode nodeObjCtrls = null;
            XmlNode nodeObjCtrl = null;
            XmlNode nodeObjAspect = null;

            cReportControl ctrl = null;

            // TODO: fix me - this is Spanish - English bug we should use Index
            //
            m_index = xDoc.getNodeProperty(nodeObj, "Indice").getValueInt(eTypes.eInteger);
            m_idField = xDoc.getNodeProperty(nodeObj, "IdField").getValueString(eTypes.eText);
            m_hasFormulaHide = xDoc.getNodeProperty(nodeObj, "HasFormulaHide").getValueBool(eTypes.eBoolean);

            nodeObjAspect = nodeObj;

            XmlNode nodeObjAux = nodeObj;
            if (!m_formulaHide.load(xDoc, nodeObjAux)) 
            { 
                return false; 
            }

            if (!m_aspect.load(xDoc, nodeObjAspect)) 
            { 
                return false; 
            }

            nodeObjCtrls = xDoc.getNodeFromNode(nodeObj, C_NODERPTCONTROLS);

            if (xDoc.nodeHasChild(nodeObjCtrls)) 
            {
                nodeObjCtrl = xDoc.getNodeChild(nodeObjCtrls);

                while (nodeObjCtrl != null) {
                    String key = xDoc.getNodeProperty(nodeObjCtrl, "Key").getValueString(eTypes.eText);
                    ctrl = m_controls.add(null, key);
                    if (!ctrl.load(xDoc, nodeObjCtrl)) 
                    { 
                        return false; 
                    }
                    nodeObjCtrl = xDoc.getNextNode(nodeObjCtrl);
                }
            }

            return true;
        }

Usage Example

Пример #1
0
        internal bool load(CSXml.cXml xDoc, XmlNode nodeObj)
        {
            XmlNode            nodeObjSecLn  = null;
            XmlNode            nodeObjAspect = null;
            cReportSectionLine secLn         = null;

            m_name = xDoc.getNodeProperty(nodeObj, "Name").getValueString(eTypes.eText);

            // TODO: fix me - this is Spanish - English bug we should use Index
            //
            m_index = xDoc.getNodeProperty(nodeObj, "Indice").getValueInt(eTypes.eInteger);

            setTypeSection((csRptSectionType)xDoc.getNodeProperty(nodeObj, "TypeSection").getValueInt(eTypes.eInteger));
            m_hasFormulaHide = xDoc.getNodeProperty(nodeObj, "HasFormulaHide").getValueBool(eTypes.eBoolean);

            nodeObjAspect = nodeObj;
            if (!m_aspect.load(xDoc, nodeObjAspect))
            {
                return(false);
            }

            XmlNode nodeObjAux = nodeObj;

            if (!m_formulaHide.load(xDoc, nodeObjAux))
            {
                return(false);
            }

            m_sectionLines.clear();

            nodeObj = xDoc.getNodeFromNode(nodeObj, C_NODERPTSECTIONLINES);
            if (xDoc.nodeHasChild(nodeObj))
            {
                nodeObjSecLn = xDoc.getNodeChild(nodeObj);
                while (nodeObjSecLn != null)
                {
                    String key = xDoc.getNodeProperty(nodeObjSecLn, "Key").getValueString(eTypes.eText);
                    secLn = m_sectionLines.add(null, key, -1);
                    if (!secLn.load(xDoc, nodeObjSecLn))
                    {
                        return(false);
                    }
                    secLn.setSectionName(m_name);
                    nodeObjSecLn = xDoc.getNextNode(nodeObjSecLn);
                }
            }

            return(true);
        }