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

private load ( CSXml xDoc, XmlNode nodeObj ) : bool
xDoc CSXml
nodeObj System.Xml.XmlNode
Результат bool
Пример #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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        internal bool load(CSXml.cXml xDoc, XmlNode nodeObj)
        {
            m_keyPaint = xDoc.getNodeProperty(nodeObj, "KeyPaint").getValueString(eTypes.eText);
            m_name     = xDoc.getNodeProperty(nodeObj, "Name").getValueString(eTypes.eText);

            try { m_hasFormulaHide = xDoc.getNodeProperty(nodeObj, "HasFormulaHide").getValueBool(eTypes.eBoolean); }
            catch { }
            try { m_hasFormulaValue = xDoc.getNodeProperty(nodeObj, "HasFormulaValue").getValueBool(eTypes.eBoolean); }
            catch { }
            try { m_controlType = (csRptControlType)xDoc.getNodeProperty(nodeObj, "ControlType").getValueInt(eTypes.eInteger); }
            catch { }
            try { m_tag = xDoc.getNodeProperty(nodeObj, "Tag").getValueString(eTypes.eText); }
            catch { }
            try { m_exportColIdx = xDoc.getNodeProperty(nodeObj, "ExportColIdx").getValueInt(eTypes.eLong); }
            catch { }
            try { m_isFreeCtrl = xDoc.getNodeProperty(nodeObj, "IsFreeCtrl").getValueBool(eTypes.eBoolean); }
            catch { }

            try
            {
                if (!m_field.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_image.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_label.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_line.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_formulaHide.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_formulaValue.load(xDoc, nodeObj))
                {
                    return(false);
                }
                if (!m_chart.load(xDoc, nodeObj))
                {
                    return(false);
                }

                // TODO: remove me after all reports were migrated
                //
                if (m_label.getAspect().getFormat() == "" && m_field.getFieldType() == (int)CSDataBase.csAdoDataType.adDBTimeStamp)
                {
                    m_label.getAspect().setFormat("dd/MM/yyyy");
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }