V10 ResourcesGuides
ResourcesGuides
Guides
Back | List of Articles

How to create context panels with Visual Studio?

Last changed in 02/12/2020

The PRIMAVERA ERP's extensibility technology allows you to create context panels where developers can totally control the content and presentation.

Unlike related information panels, which are necessarily linked to an information category and can only be called from that category, context panels can be called anywhere and at any time using code. For example, you can build a dashboard that uses a web service to display the exchange rate of several currencies against the euro and display it as soon as you open the ERP.

 width=

Context panels are created based on forms, which means that all you need to do is add a form with the content you wish to display to the applicable extension and call the panel using the api PSO.DockingManager() .

using Primavera.Extensibility.BusinessEntities.ExtensibilityService.EventArgs;
using Primavera.Extensibility.Platform.Services;

namespace Primavera.PainelContexto
{
    public class DashboardCambios:Plataforma
    {
        public override void DepoisDeAbrirEmpresa(ExtensibilityEventArgs e)
        {
            // Form with the exrate service.
            UIDashboardCambios dashboard = new UIDashboardCambios ();

            if (PSO.DockingManager.Existe('ID_DashboadMoeda'))
            {
                dashboard.UpdateCurrencies();
                PSO.DockingManager.ActualizaPainel('ID_DashboadMoeda', dashboard);
            }
            else
            {
                dashboard.LoadCurrencies();
                PSO.DockingManager.AbrePainel(StdBE100.StdBETipos.DockingEstilo.estiloDireita,
                                                300,
                                                0,
                                                'ID_DashboadMoeda',
                                                'Dashboad Moeda',
                                                ',
                                                dashboard);
            }
        }
    }
}
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
Getting Started How to create an integration project with Visual Studio? How to create an Interface Extensibility Project (PEX) with Visual Studio? How to create an API (Engine) extensibility project with Visual Studio? How to create user tabs with Visual Studio?