Example #1
0
        public void RenderAndAttachCustomControl(ref System.Web.UI.WebControls.PlaceHolder ph, XmlDocument moduledoc, XmlDocument node)
        {
            System.Text.StringBuilder             html = new System.Text.StringBuilder();
            Framework.Utilities.ModulesProcessing mp   = new ModulesProcessing();

            foreach (XmlNode module in moduledoc)
            {
                this.Modules = mp.FetchModules(module);

                foreach (Module m in this.Modules)
                {
                    ph.Controls.Add(mp.LoadControl(m.Path, this.MasterPage, node, m.ParamList, this.Namespaces));
                }
                this.Modules = null;
            }
        }
Example #2
0
        public string RenderCustomControl(XmlDocument moduledoc, XmlDocument node)
        {
            System.Text.StringBuilder             html = new System.Text.StringBuilder();
            Framework.Utilities.ModulesProcessing mp   = new ModulesProcessing();

            foreach (XmlNode module in moduledoc)
            {
                this.Modules = mp.FetchModules(module);

                foreach (Module m in this.Modules)
                {
                    html.Append(mp.RenderView(mp.LoadControl(m.Path, this.MasterPage, node, m.ParamList, this.Namespaces)));
                }
                this.Modules = null;
            }

            return(html.ToString());
        }
        /// <summary>
        /// Each repeater on the master page will fire this event when its bound with presentation xml data.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DrawModule(object sender, RepeaterItemEventArgs e)
        {
            PlaceHolder placeholder = null;
            mp = new ModulesProcessing();
            Literal literal = null;

            if (e.Item.ItemType == ListItemType.Header)
            {
                literal = (Literal)e.Item.FindControl("litHeader");
                return;

            }
            if (e.Item.ItemType == ListItemType.Footer)
            {
                literal = (Literal)e.Item.FindControl("litFooter");
                return;
            }

            Utilities.Module module = (Utilities.Module)e.Item.DataItem;
            bool display = true;

            if (module == null) { return; }

            placeholder = (PlaceHolder)e.Item.FindControl("phHeader");

            if (placeholder == null)
                placeholder = (PlaceHolder)e.Item.FindControl("phActive");

            if (placeholder == null)
                placeholder = (PlaceHolder)e.Item.FindControl("phMain");

            if (placeholder == null)
                placeholder = (PlaceHolder)e.Item.FindControl("phPage");

            if (placeholder == null)
                placeholder = (PlaceHolder)e.Item.FindControl("phPassive");

            if (placeholder == null)
                placeholder = (PlaceHolder)e.Item.FindControl("phFooter");

            if (module.Path != "")
            {
                if (module.DisplayRule != string.Empty)
                    if (this.RDFData.SelectSingleNode(module.DisplayRule, this.RDFNamespaces).InnerText != "")
                    {
                        display = false;
                    }
                if (display == true)
                {
                    Framework.Utilities.DebugLogging.Log("Loading control for " + module.Path + " : " + module.ParamList);
                    placeholder.Controls.Add(mp.LoadControl(module.Path, this, this.RDFData, module.ParamList, this.RDFNamespaces));
                }
            }

            display = true;
        }
Example #4
0
        public string RenderCustomControl(XmlDocument moduledoc, XmlDocument node)
        {
            System.Text.StringBuilder html = new System.Text.StringBuilder();
            Framework.Utilities.ModulesProcessing mp = new ModulesProcessing();

            foreach (XmlNode module in moduledoc)
            {
                this.Modules = mp.FetchModules(module);

                foreach (Module m in this.Modules)
                {
                    html.Append(mp.RenderView(mp.LoadControl(m.Path, this.MasterPage, node, m.ParamList, this.Namespaces)));

                }
                this.Modules = null;
            }

            return html.ToString();
        }
Example #5
0
        public void RenderAndAttachCustomControl(ref System.Web.UI.WebControls.PlaceHolder ph, XmlDocument moduledoc, XmlDocument node)
        {
            System.Text.StringBuilder html = new System.Text.StringBuilder();
            Framework.Utilities.ModulesProcessing mp = new ModulesProcessing();

            foreach (XmlNode module in moduledoc)
            {
                this.Modules = mp.FetchModules(module);

                foreach (Module m in this.Modules)
                {
                    ph.Controls.Add(mp.LoadControl(m.Path, this.MasterPage, node, m.ParamList, this.Namespaces));

                }
                this.Modules = null;
            }
        }