private void button2AbririMotor_Click(object sender, EventArgs e) { try { BSO = new ErpBS100.ErpBS(); StdBE100.StdBETipos.EnumTipoPlataforma tipoPlataforma = StdBE100.StdBETipos.EnumTipoPlataforma.tpEmpresarial; BSO.AbreEmpresaTrabalho(tipoPlataforma, "DEMO", "primavera", "qualquer"); //use this service to trigger the API events. ExtensibilityService service = new ExtensibilityService(); service.Initialize(BSO); // Check if service is operational if (service.IsOperational) { // Inshore that all extensions are loaded. service.LoadExtensions(); } label2EstadoMotor.Text = "Motor aberto..."; } catch (Exception) { label2EstadoMotor.Text = " Erro ao abrir o motor!"; } }
private void button1_Click(object sender, EventArgs e) { try { PSO = new StdPlatBS100.StdPlatBS(); StdBE100.StdBETransaccao trans = new StdBE100.StdBETransaccao(); StdPlatBS100.StdBSConfApl ConfApl = new StdPlatBS100.StdBSConfApl(); ConfApl.Utilizador = "primavera"; ConfApl.PwdUtilizador = "qualquer"; ConfApl.Instancia = "Default"; ConfApl.AbvtApl = "ERP"; ConfApl.LicVersaoMinima = "10.00"; StdBE100.StdBETipos.EnumTipoPlataforma tipoPlataforma = StdBE100.StdBETipos.EnumTipoPlataforma.tpEmpresarial; PSO.AbrePlataformaEmpresa("DEMO", trans, ConfApl, tipoPlataforma); label1EstadoPlataforma.Text = "Plataforma Aberto..."; } catch (Exception) { label1EstadoPlataforma.Text = "Erro ao abrir Plataforma!"; } }