Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!PXAccess.FeatureInstalled <FeaturesSet.payrollModule>())
        {
            return;
        }

        PREarningTypeMaint graph = PXGraph.CreateInstance <PREarningTypeMaint>();
        string             url   = PXDataSource.getMainForm(graph.GetType());

        if (url == null)
        {
            return;
        }

        graph.Unload();
        PXContext.Session.RedirectGraphType[PXUrl.ToAbsoluteUrl(url)] = graph.GetType();
        Response.Redirect(this.ResolveUrl(url));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        var graph = PXGraph.CreateInstance <FileHandler>();

        try
        {
            BoxFolderCache relatedFolder = graph.FoldersByFolderID.Select(Request.QueryString["itemID"]);
            new EntityHelper(graph).NavigateToRow(relatedFolder.RefNoteID, PXRedirectHelper.WindowMode.Same);
        }
        catch (PXRedirectRequiredException ex)
        {
            string url = PXDataSource.getMainForm(ex.Graph.GetType());
            if (url != null)
            {
                ex.Graph.Unload();
                PXContext.Session.RedirectGraphType[PXUrl.ToAbsoluteUrl(url)] = ex.Graph.GetType();
                Response.Redirect(this.ResolveUrl(url));
            }
        }
    }