示例#1
0
        /// <summary>
        /// It makes XmlDocument from 'queryxml' parameter of the requested URL
        /// </summary>
        /// <returns>If it is success, return XmlDocument
        /// If it is not needed to proceess, return null
        /// If not matched functionName or if parameters of the requested url is invalid, return null</returns>
        public XmlDocument GetXmlDocFromQueryXmlOfRequestedUrl(string functionName)
        {
            if (!this.CheckIfNeedToProcessURLQuery(functionName))
            {
                return(null);
            }

            NameValueCollection nvcQueryString = EESUtil.ParsingHttpQueryString(EESUtil.GetHttpQueryString());
            XmlDocument         xmldocQueryXml = new XmlDocument();

            try
            {
                xmldocQueryXml.LoadXml(nvcQueryString["queryxml"]);
            }
            catch
            {
                return(null);
            }

            return(xmldocQueryXml);
        }
示例#2
0
        /// <summary>
        /// It check if the page is to needed to process parameters of the requsted URL.
        /// Example of a url needed to process : http://192.168.1.94/ees/EES.application?func=SPCChartViewUC&dllname=eSPC/BISTel.eSPC.Page.dll&classname=BISTel.eSPC.Page.Report.SPCChartViewUC
        /// &queryxml=%3Cees_querystring%3E%3Cpage_info%3E%3Cdll%3EeSPC%2FBISTel.eSPC.Page.dll%3C%2Fdll%3E%3Cclass%3EBISTel.eSPC.Page.Report.SPCChartViewUC%3C%2Fclass%3E%3Cpage%3ESPCChartViewUC
        /// %3C%2Fpage%3E%3CpageTitle%3ESPCChartData%3C%2FpageTitle%3E%3Cpage_type%3Elink%3C%2Fpage_type%3E%3C%2Fpage_info%3E%3Crequest%3E%3CMODEL_CONFIG_RAWID%3E%3Cvalue%3E600104%3C%2Fvalue
        /// %3E%3C%2FMODEL_CONFIG_RAWID%3E%3CCHART_TYPE%3E%3Cvalue%3ERAW%3C%2Fvalue%3E%3C%2FCHART_TYPE%3E%3COCAP_RAWID%3E%3Cvalue%3E100037977%3C%2Fvalue%3E%3C%2FOCAP_RAWID%3E%3COCAP_DTTS
        /// %3E%3Cvalue%3E2010-06-09+10%3A55%3A46.508%3C%2Fvalue%3E%3C%2FOCAP_DTTS%3E%3C%2Frequest%3E%3C%2Fees_querystring%3E
        /// </summary>
        /// <param name="functionName">Function name of page</param>
        /// <returns>Wheather it is needed to process</returns>
        public bool CheckIfNeedToProcessURLQuery(string functionName)
        {
            if (string.IsNullOrEmpty(EESUtil.GetHttpQueryString()))
            {
                return(false);
            }

            NameValueCollection nvcQueryString = EESUtil.ParsingHttpQueryString(EESUtil.GetHttpQueryString());

            if (String.IsNullOrEmpty(nvcQueryString["func"]) ||
                String.IsNullOrEmpty(nvcQueryString["queryxml"]))
            {
                return(false);
            }

            if (functionName != nvcQueryString["func"])
            {
                return(false);
            }

            return(true);
        }