Пример #1
0
    //---------------------------------------------------------------------------
    /// <summary>
    /// The page Init event handler.
    /// </summary>
    protected override void OnInit(EventArgs e)
    {
        if (!this.IsCallback)
        {
            MainFrameHelpers.RegisterMainFrameScripts(this);
        }

        this.project = this.Request.QueryString["Project"];
        if (!string.IsNullOrEmpty(this.project))
        {
            ProjectBrowserMaint.SelectProjectByName(this.project);
        }

        string screenID = this.Request.QueryString["EditScreenID"];

        if (!string.IsNullOrEmpty(screenID))
        {
            ProjectBrowserMaint.ContextScreenID = screenID;
        }

        if (!PX.Common.PXContext.PXIdentity.AuthUser.IsInRole(PXAccess.GetCustomizerRole()))
        {
            Redirector.Redirect(System.Web.HttpContext.Current, string.Format("~/Frames/Error.aspx?exceptionID={0}&typeID={1}", "Access denied", "error"));
        }

        base.OnInit(e);
    }
    //---------------------------------------------------------------------------
    /// <summary>
    /// The page Init event handler.
    /// </summary>
    protected override void OnInit(EventArgs e)
    {
        if (!this.IsCallback)
        {
            MainFrameHelpers.RegisterMainFrameScripts(this);
        }

        this.project = this.Request.QueryString["Project"];
        if (!string.IsNullOrEmpty(this.project))
        {
            ProjectBrowserMaint.SelectProjectByName(this.project);
        }

        string screenID = this.Request.QueryString["EditScreenID"];

        if (!string.IsNullOrEmpty(screenID))
        {
            ProjectBrowserMaint.ContextScreenID = screenID;
        }

        base.OnInit(e);
    }