How to use the PRIMAVERA ERP SDK controls?
The SDK is a library of standards and business components for the PRIMAVERA environment. It allows partners and external development teams to quickly and easily create ERP add-ons. Using the SDK beings several advantages, among which, we highlight: Step 1 - Referencing To be able to use the SDK, you need to add the components from the PRISDK100.dll assembly available under 'PRIMAVERASG100APL' to the toolbox. Step 2 - Initializing the SDK context After referencing the PRISDK100.dll assembly, all you need to do is select the desired control in the toolbox and proceed with the initialization of the usage context. This context is simply a verification of the environment where controls are being run, since these should only be used in the context of the ERP. In other words, this is the moment when you start the platform and the engine. This initialization should be run preferably when the form is loaded (in the form's load event) Note: The SDK context only needs to be initialized once. Step 3 - Initializing controls After adding the forms, all controls must be initialized with the previously created context. To do this, call the Initialize() method for each control, as shown below. Like in the previous step, this initialization should also preferably be performed when the form is loaded (in the form's load event).Using the SDK
//The gobal variable that holds the context and must be passed to the controls.
private clsSDKContexto sdkContexto;
//Function that initializes the SDK context.
private void InicializaSDKContexto()
{
if(sdkContexto == null)
{
sdkContexto = new clsSDKContexto();
//Initialize the SDK contexto from the BSO object and corresponding module.
sdkContexto.Inicializa(BSO, 'ERP');
//Initialize the platform in the context and verify the digital signature.
PSO.InicializaPlataforma(sdkContext);
}
}
//The gobal variable that holds the SDK context created in step 2 is passed by parameter.
Control.Inicializa(sdkContexto)
login para deixar a sua opinião.