コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string path = Constants.ModulePath;

            switch (this.LoadView)
            {
            case GroupMode.Setup:
                path += "Setup.ascx";
                break;

            case GroupMode.List:
                path += "List.ascx";
                break;

            case GroupMode.View:
                path += "GroupView.ascx";
                break;
            }

            GroupsModuleBase ctl = new GroupsModuleBase();

            ctl = (GroupsModuleBase)this.LoadControl(path);
            ctl.ModuleConfiguration = this.ModuleConfiguration;
            this.plhContent.Controls.Add(ctl);
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e) {
     string path = Constants.ModulePath;
     switch (LoadView) {
         case GroupMode.Setup:
             path += "Setup.ascx";
             break;
         case GroupMode.List:
             path += "List.ascx";
             break;
         case GroupMode.View:
             path += "GroupView.ascx";
             break;
     }
     GroupsModuleBase ctl = new GroupsModuleBase();
     ctl = (GroupsModuleBase)LoadControl(path);
     ctl.ModuleConfiguration = this.ModuleConfiguration;
     plhContent.Controls.Add(ctl);
 }
コード例 #3
0
ファイル: View.ascx.cs プロジェクト: misterPaul0/Curt
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Page_Load runs when the control is loaded
 /// </summary>
 /// -----------------------------------------------------------------------------
 private void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (GroupId < 0)
         {
             if (TabId != GroupListTabId && !UserInfo.IsInRole(PortalSettings.AdministratorRoleName))
             {
                 Response.Redirect(Globals.NavigateURL(GroupListTabId));
             }
         }
         GroupsModuleBase ctl = (GroupsModuleBase)LoadControl(ControlPath);
         ctl.ModuleConfiguration = this.ModuleConfiguration;
         plhContent.Controls.Clear();
         plhContent.Controls.Add(ctl);
     }
     catch (Exception exc) //Module failed to load
     {
         Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
コード例 #4
0
ファイル: View.ascx.cs プロジェクト: Mariusz11711/DNN
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Page_Load runs when the control is loaded.
        /// </summary>
        /// -----------------------------------------------------------------------------
        private void Page_Load(object sender, EventArgs e)
        {
            try
            {
                JavaScript.RequestRegistration(CommonJs.DnnPlugins);
                if (this.GroupId < 0)
                {
                    if (this.TabId != this.GroupListTabId && !this.UserInfo.IsInRole(this.PortalSettings.AdministratorRoleName))
                    {
                        this.Response.Redirect(this._navigationManager.NavigateURL(this.GroupListTabId));
                    }
                }

                GroupsModuleBase ctl = (GroupsModuleBase)this.LoadControl(this.ControlPath);
                ctl.ModuleConfiguration = this.ModuleConfiguration;
                this.plhContent.Controls.Clear();
                this.plhContent.Controls.Add(ctl);
            }
            catch (Exception exc) // Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }