protected void Page_Load(object sender, EventArgs e)
    {
        var  id = Request.QueryString["id"];
        Guid resourceId;

        if (id == null || !Guid.TryParse(id, out resourceId))
        {
            throw new InvalidOperationException(string.Format("Resource with id {0} not found", id));
        }
        var           graph  = (ResourceMaint)this.DefaultDataSource.DataGraph;
        IPXMasterPage master = Page.Master as IPXMasterPage;

        if (master != null && graph != null && graph.Resources.Current != null)
        {
            master.ScreenTitle = graph.Resources.Current.SitemapTitle ?? graph.Resources.Current.ResourceName;
        }
        var tokenResourceAndApplication = graph.GetAuthTokenResourceAndApplication(resourceId);

        if (tokenResourceAndApplication == null)
        {
            throw new InvalidOperationException(string.Format("Resource with id {0} not found", id));
        }
        resourceHtml.Text = graph.ResourceHtml(tokenResourceAndApplication.Item1, tokenResourceAndApplication.Item2,
                                               tokenResourceAndApplication.Item3);
    }
Ejemplo n.º 2
0
    protected virtual void Page_Init(object sender, EventArgs e)
    {
        IPXMasterPage pxMaster = Master as IPXMasterPage;

        if (pxMaster != null)
        {
            pxMaster.CustomizationAvailable = false;
        }
    }
    protected void form_DataBinding(object sender, EventArgs e)
    {
        PXGenericInqGrph graph  = (PXGenericInqGrph)this.DefaultDataSource.DataGraph;
        IPXMasterPage    master = Page.Master as IPXMasterPage;

        if (master != null && graph != null && graph.Design != null)
        {
            master.ScreenTitle = graph.Design.SitemapTitle ?? graph.Design.Name;
        }
    }