Пример #1
0
        private void LoopThroughProcess(string[] args, XmlNode xmlNode, Process process)
        {
            if (args[0] != string.Empty)
            {
                args[0] = CommonXml.RenameIntegerPath(args[0]);

                xmlNode = xmlNode.SelectSingleNode(args[0]);

                if (xmlNode != null)
                {
                    if (process.CheckGroups(CommonXml.GetAttributeValue(xmlNode, "rights")))
                    {
                        XmlNodeList contentNodes = xmlNode.SelectNodes("*");

                        LoopThroughProcessOneByOne(contentNodes, "template", process, args);
                        LoopThroughProcessOneByOne(contentNodes, "handle", process, args);
                        LoopThroughProcessOneByOne(contentNodes, "redirect", process, args);
                        LoopThroughProcessOneByOne(contentNodes, "load", process, args);

                        args = Common.Common.RemoveOne(args);

                        if (args != null)
                        {
                            LoopThroughProcess(args, xmlNode, process);
                        }
                    }
                    else
                    {
                        string redirectUrl = GetRedirectUrl(process.CurrentProcess);

                        process.HttpPage.Response.Redirect(redirectUrl); // ToDo: is this the way to do it
                    }
                }
            }
        }