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; 
            }
        }
 public void setControlType(csRptControlType rhs)
 {
     m_controlType = rhs;
 }
示例#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);
            }
        }
示例#4
0
        private void pSetSbPnlCtrl(
            String ctrlName, 
            csRptControlType ctrlType, 
            String formulaHide, 
            String formulaValue, 
            bool hasFormulaHide, 
            bool hasFormulaValue, 
            String fieldName) 
        {

            String msg = "";
            String strCtlType = "";

            switch (ctrlType) {
                case csRptControlType.CSRPTCTDBIMAGE:
                    strCtlType = "DbImage";
                    break;
                case csRptControlType.CSRPTCTFIELD:
                    strCtlType = "Field";
                    break;
                case csRptControlType.CSRPTCTIMAGE:
                    strCtlType = "Image";
                    break;
                case csRptControlType.CSRPTCTLABEL:
                    strCtlType = "Label";
                    break;
            }

            if (ctrlName != "") {
                msg = "Ctl:[" + ctrlName 
                    + "]Tipo:[" + strCtlType 
					+ "]F.Hide:[" + formulaHide.Substring(1, 100) 
                    + "]Activa[" + ((bool) hasFormulaHide).ToString() 
					+ "]F.Value:[" + formulaValue.Substring(1, 100) 
                    + "]Activa[" + ((bool) hasFormulaValue).ToString() 
                    + "]Field:[" + fieldName + "]";
            }
            m_fmain.setsbPnlCtrl(msg);
        }
示例#5
0
 public void setControlType(csRptControlType rhs)
 {
     m_controlType = rhs;
 }