static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddOnFacturadeProveedor"); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); PurchaseInvoices pObjpurchaseInvoices = new PurchaseInvoices(); LogService.WriteInfo("Addon Iniciado"); //Menu MyMenu = new Menu(); //MyMenu.AddMenuItems(); //oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //Initialize Tables UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); CyCServiceFactory lObjCyCServiceFactory = new CyCServiceFactory(); lObjCyCServiceFactory.GetSetupService().InitializeTables(); UIApplication.ShowSuccess(string.Format("Addon de compras iniciado correctamente")); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } //Using Utilities DIApplication.. DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); SetupService lObjSetupService = new SetupService(); lObjSetupService.InitializeTables(); EarringsRanks pObjEarringsRanks = new EarringsRanks(); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); BatchCreator mObjBatchCreator = new BatchCreator(); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); oApp.Run(); LogService.WriteSuccess("Application running"); } catch (Exception ex) { LogService.WriteError(ex); System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddOnFinances"); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); Application.SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent); UIApplication.ShowSuccess(string.Format("Addon Finanzas iniciado correctamente")); LogService.WriteSuccess(string.Format("Addon Finanzas iniciado correctamente")); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
public frmTest() { DIApplication.DIConnect(); InitializeComponent(); tmrWorkerOne.Start(); tmrWorkerTwo.Start(); tmrWorkerThree.Start(); tmrWorkerFour.Start(); }
public void CheckXMLStatusTest() { DIApplication.DIConnect((SAPbobsCOM.Company)UGRSap.GetCompany()); try { var file = @"C:\Users\ssandoval\Desktop\Qualisys Saul\PROJECTS\Union Ganadera\Compras\XML Enero- Feb\1b123a60-karla consuelo franco guitierrez.xml"; var lObjReadXML = new ReadXMLService(); var objectXML = lObjReadXML.ReadXML(file); var result = lObjReadXML.CheckVoucherStatus(objectXML); Assert.IsTrue(result); return; } catch (Exception ex) { Assert.Fail(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddOnMaquinaria"); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //Using Utilities DIApplication.. DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); //Initialize Tables UIApplication.ShowSuccess("Inicializando tablas"); MachinerySeviceFactory lObjMachinerySeviceFactory = new MachinerySeviceFactory(); lObjMachinerySeviceFactory.GetSetupService().InitializeTables(); UIApplication.ShowSuccess("Addon de Maquinaria iniciado correctamente"); LogService.WriteSuccess(string.Format("Addon de Maquinaria iniciado correctamente")); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("Addon_Permissions"); //Using Utilities DIApplication.. DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); PermissionsFactory lObjPermissionsFactorty = new PermissionsFactory(); lObjPermissionsFactorty.GetSetupService().InitializeTables(); EarringsRanks pObjEarringsRanks = new EarringsRanks(); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); LogService.WriteSuccess("Addon_Permissions 0.0.11 cargado con exito"); oApp.Run(); UIApplication.ShowMessage("Addon Permissions 0.0.11 agregado con exito"); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); //CONFIGURACION AccountingAccountsSetupLoginService lObjSetupLoginService = new AccountingAccountsSetupLoginService(); lObjSetupLoginService.CreateTable(); AccountingAccountsSetupDBService lObjSetupDBService = new AccountingAccountsSetupDBService(); lObjSetupDBService.CreateTable(); //IMPORTACION //Logg AccountingAccountsLoggService lObjLoggService = new AccountingAccountsLoggService(); lObjLoggService.CreateTable(); AccountingAccountsLoggDetailService lObjLoggDetailService = new AccountingAccountsLoggDetailService(); lObjLoggDetailService.CreateTable(); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); //BatchNameCua batchNameCua = new BatchNameCua(); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //Using Utilities DIApplication.. //DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); Services.SetupService lObjSetupService = new Services.SetupService(); lObjSetupService.InitializeTables(); UIApplication.ShowSuccess(string.Format("Addon de cuarentenaria iniciado correctamente")); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddOnCompras"); Menu MyMenu = new Menu(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //TestXML(); //Initialize Tables UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); PurchasesServiceFactory lObjFoodProductionFactory = new PurchasesServiceFactory(); lObjFoodProductionFactory.GetSetupService().InitializeTables(); UIApplication.ShowSuccess(string.Format("AddonCompras 1.2.69 iniciado correctamente")); LogService.WriteSuccess(string.Format("AddonCompras 1.2.69 iniciado correctamente")); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); System.Windows.Forms.Application.Exit(); } }
static void Main(string[] args) { try { Application oApp = null; if (args.Length < 1) { oApp = new Application(); } else { oApp = new Application(args[0]); } LogService.Filename("AddonTransportes"); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); Menu MyMenu = new Menu(); Freights lObjFreights = new Freights(); MyMenu.AddMenuItems(); oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent); Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent); //Initialize Tables UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); TransportServiceFactory mObjServiceFactory = new TransportServiceFactory(); mObjServiceFactory.GetSetUpService().InitializeTables(); UIApplication.ShowSuccess(string.Format("Addon de transportes 1.0.18 iniciado correctamente")); LogService.WriteSuccess("Addon de transportes 1.0.18 iniciado correctamente"); oApp.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
static void Main(string[] args) { Credentials lObjCredentials = new Credentials(); //lObjCredentials.LicenseServer = ConfigurationManager.AppSettings["LicenseServer"].ToString(); lObjCredentials.UserName = ConfigurationManager.AppSettings["UsernameSAP"].ToString(); lObjCredentials.Password = ConfigurationManager.AppSettings["PasswordSAP"].ToString(); switch (ConfigurationManager.AppSettings["DBServer"].ToString()) { case "MSSQL2012": lObjCredentials.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012; break; case "MSSQL2014": lObjCredentials.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2014; break; case "MSSQL2016": lObjCredentials.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2016; break; default: break; } //lObjCredentials.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2012; lObjCredentials.SQLServer = ConfigurationManager.AppSettings["SQLServer"].ToString(); lObjCredentials.SQLUserName = ConfigurationManager.AppSettings["UsernameSQL"].ToString(); lObjCredentials.SQLPassword = ConfigurationManager.AppSettings["PasswordSQL"].ToString(); lObjCredentials.DataBaseName = ConfigurationManager.AppSettings["DBName"].ToString(); //lObjCredentials.Language = SAPbobsCOM.BoSuppLangs.ln_English; DIConnection lObjDIConnection = new DIConnection(); lObjDIConnection.ConnectToDI(lObjCredentials); if (lObjDIConnection.Company != null && lObjDIConnection.Company.Connected) { DIApplication.DIConnect(lObjDIConnection.Company); } //IList<string> list = new List<string>() { "raul", "martin", "anaya", "rojo" }; //Console.WriteLine(string.Join(",", list.ToArray())); //Console.ReadLine(); GPSFactoryServices lObjGPSFactoryServices = new GPSFactoryServices(); lObjGPSFactoryServices.GetSetupService().InitializeTables(); UGRS.Core.SDK.DI.Configuration.ConfigurationServicesFactory lObjConfigurationFactoryServices = new UGRS.Core.SDK.DI.Configuration.ConfigurationServicesFactory(); //ServiceBase[] ServicesToRun = new ServiceBase[] //{ // new SAP_ServiceGPS() //}; //ServiceBase.Run(ServicesToRun); string lStrPathKM = ConfigurationManager.AppSettings["PathKM"].ToString(); string lStrPathTime = ConfigurationManager.AppSettings["PathTime"].ToString(); if (!string.IsNullOrEmpty(lStrPathKM)) { //@"C:\Users\amartinez\Desktop\csv\KM"; List <string> lLstFilesKM = ImportFiles.FindFiles(lStrPathKM); ReadCsvKm.VerifyFilesKM(lLstFilesKM, lStrPathKM); } else { LogUtility.Write("Error al momento de consultar el directorio Kilometros recorridos"); } if (!string.IsNullOrEmpty(lStrPathTime)) { //@"C:\Users\amartinez\Desktop\csv\TIME"; List <string> lLstFilesTime = ImportFiles.FindFiles(lStrPathTime); // ReadCsvTime.VerifyFilesTime(lLstFilesTime, lStrPathTime); } else { LogUtility.Write("Error al momento de consultar el directorio de Horas de motor"); } //ReadCSV.ReadKilometers(@"C:\testkm.csv"); //ReadCSV.ReadTimeEngine(@"C:\test.csv"); }
/// <summary> Default constructor. </summary> /// <remarks> Ranaya, 24/05/2017. </remarks> public AuctionsServicesFactory() { DIApplication.DIConnect(); }
private static void ConnectDIApplication() { DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); }
static void Main(string[] args) { Console.WriteLine("Please wait..."); DIApplication.DIConnect(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("Connection successful"); SAPbobsCOM.Documents lObjDocument = null; lObjDocument = (SAPbobsCOM.Documents)DIApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices); var a = lObjDocument.GetByKey(185); var b = lObjDocument.GroupNumber; var c = lObjDocument.PaymentMethod; var d = lObjDocument.ExtraDays; var e = lObjDocument.PaymentGroupCode; ////SAPbobsCOM.JournalEntries lObjJournalEntries = null; //SAPbobsCOM.Documents lObjDocument = null; ////int lIntResult = -1; //try //{ // Console.WriteLine("Please wait..."); // DIApplication.DIConnect(); // Console.ForegroundColor = ConsoleColor.Yellow; // Console.WriteLine("Connection successful"); // lObjDocument = (SAPbobsCOM.Documents)DIApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit); // lObjDocument.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO; // lObjDocument.Series = 297; // lObjDocument.DocDate = DateTime.Now; // lObjDocument.DocDueDate = DateTime.Now; // lObjDocument.Comments = "Salida de mercancías"; // lObjDocument.JournalMemo = "Salida de mercancías"; // lObjDocument.Lines.ItemCode = "A00000468"; // lObjDocument.Lines.WarehouseCode = "SUHEG"; // lObjDocument.Lines.Quantity = 20; // lObjDocument.Lines.BatchNumbers.Quantity = 20; // lObjDocument.Lines.BatchNumbers.BatchNumber = "Prueba161017_2"; // lObjDocument.Lines.BatchNumbers.Add(); // lObjDocument.Lines.Add(); // if (lObjDocument.Add() != 0) // { // Console.ForegroundColor = ConsoleColor.Red; // Console.WriteLine(DIApplication.Company.GetLastErrorDescription()); // } // //lObjDocument = (SAPbobsCOM.Documents)DIApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders); // //lObjDocument.GetByKey(53); // //if (lObjDocument != null) // //{ // // for (int i = 0; i < lObjDocument.Lines.Count; i++) // // { // // lObjDocument.Lines.SetCurrentLine(i); // // var a = lObjDocument.Lines.CostingCode; // // var b = lObjDocument.Lines.CostingCode2; // // var c = lObjDocument.Lines.CostingCode3; // // var d = lObjDocument.Lines.CostingCode4; // // var f = lObjDocument.Lines.CostingCode5; // // } // //} // //lObjJournalEntries = (SAPbobsCOM.JournalEntries)DIApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries); // //lObjJournalEntries.DueDate = DateTime.Today; // //lObjJournalEntries.TaxDate = DateTime.Today; // //lObjJournalEntries.AutoVAT = SAPbobsCOM.BoYesNoEnum.tYES; // //lObjJournalEntries.Lines.AccountCode = "1070050001000"; // //lObjJournalEntries.Lines.ContraAccount = "2040010004000"; // //lObjJournalEntries.Lines.Credit = 0; // //lObjJournalEntries.Lines.Debit = 100; // //lObjJournalEntries.Lines.CostingCode = "SU_HERMO"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_GLO_Auxiliary").Value = "CL00000001"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_GLO_AuxType").Value = "1"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_SU_Folio").Value = "SU-HE-170001"; // //lObjJournalEntries.Lines.Add(); // //lObjJournalEntries.Lines.AccountCode = "2040010004000"; // //lObjJournalEntries.Lines.ContraAccount = "1070050001000"; // //lObjJournalEntries.Lines.Credit = 100; // //lObjJournalEntries.Lines.Debit = 0; // //lObjJournalEntries.Lines.CostingCode = "SU_HERMO"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_GLO_Auxiliary").Value = "CL00000002"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_GLO_AuxType").Value = "1"; // //lObjJournalEntries.Lines.UserFields.Fields.Item("U_SU_Folio").Value = "SU-HE-170001"; // //lObjJournalEntries.Lines.Add(); // //lIntResult = lObjJournalEntries.Add(); // //if (lIntResult != 0) // //{ // // Console.WriteLine(DIApplication.Company.GetLastErrorDescription()); // //} // //DIApplication.Company.StartTransaction(); // //CreateDocument("62"); // //CreateDocument("63"); // //DIApplication.Company.EndTransaction(BoWfTransOpt.wf_RollBack); //} //catch (Exception lObjException) //{ // Console.ForegroundColor = ConsoleColor.Red; // Console.WriteLine(lObjException.ToString()); //} //finally //{ // //MemoryUtility.ReleaseComObject(lObjJournalEntries); // MemoryUtility.ReleaseComObject(lObjDocument); //} Console.WriteLine("Please wait..."); EntityFrameworkTransactionTest mObjTest = new EntityFrameworkTransactionTest(); mObjTest.DoTest(); Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("Press ENTER to close"); Console.ReadLine(); }
public void AddMenuItems() { SAPbouiCOM.Menus oMenus = null; SAPbouiCOM.MenuItem oMenuItem = null; oMenus = Application.SBO_Application.Menus; SAPbouiCOM.MenuCreationParams oCreationPackage = null; oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(Application.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams))); oMenuItem = Application.SBO_Application.Menus.Item("43520"); // moudles' oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP; oCreationPackage.UniqueID = "UGRS.AddOn.Purchases"; oCreationPackage.String = "Compras"; oCreationPackage.Enabled = true; oCreationPackage.Position = -1; oMenus = oMenuItem.SubMenus; try { // If the manu already exists this code will fail oMenus.AddEx(oCreationPackage); } catch (Exception) { } try { // Get the menu collection of the newly added pop-up item oMenuItem = Application.SBO_Application.Menus.Item("UGRS.AddOn.Purchases"); oMenus = oMenuItem.SubMenus; //// Create s sub menu //oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; //oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.Form1"; //oCreationPackage.String = "Notas"; //oMenus.AddEx(oCreationPackage); //// Create s sub menu //oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; //oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.frmPurchaseXML"; //oCreationPackage.String = "XML"; //oMenus.AddEx(oCreationPackage); // Create s sub menu DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); string lStrCostCenter = mObjPurchasesServiceFactory.GetPurchaseInvoiceService().GetCostCenter(); /* if (mObjPurchasesServiceFactory.GetPurchasePermissionsService().GetPermissionType(lStrCostCenter, "U_GLO_Refund") != PermissionsEnum.Permission.None) * {*/ oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.frmReceipts"; oCreationPackage.String = "Captura de comprobantes"; oMenus.AddEx(oCreationPackage); // Create s sub menu oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.frmSearchRefunds"; oCreationPackage.String = "Búsqueda de reembolsos"; oMenus.AddEx(oCreationPackage); /* } * * * if (mObjPurchasesServiceFactory.GetPurchasePermissionsService().GetPermissionType(lStrCostCenter, "U_GLO_ExpeCheck") != PermissionsEnum.Permission.None) * {*/ // Create s sub menu oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.frmCheeckingCosts"; oCreationPackage.String = "Comprobación de gastos"; oMenus.AddEx(oCreationPackage); // } // Create s sub menu oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING; oCreationPackage.UniqueID = "UGRS.AddOn.Purchases.frmXML"; oCreationPackage.String = "Carga de xml"; oMenus.AddEx(oCreationPackage); } catch (Exception) { // Menu already exists Application.SBO_Application.SetStatusBarMessage("Menu Already Exists", SAPbouiCOM.BoMessageTime.bmt_Short, true); } }
public AuctionsServerObject() { DIApplication.DIConnect(); }
static void Main(string[] pArrStrArgs) { try { LogService.Filename("FoodProduction"); LogService.WriteInfo("Inicio del addon 1.2.56"); Application lObjApplication = null; if (pArrStrArgs.Length < 1) { lObjApplication = new Application(); } else { lObjApplication = new Application(pArrStrArgs[0]); } //Prepare menu MenuManager lObjMenuManager = new MenuManager(); lObjMenuManager.Initialize(); //Prepare filters EventManager lObjEventManager = new EventManager(); UIApplication.GetApplication().SetFilter(lObjEventManager.GetItemEventFiltersByMenu(lObjMenuManager.Menu)); UIApplication.ShowSuccess(string.Format("Menu manager")); //Add menu events lObjApplication.RegisterMenuEventHandler(lObjMenuManager.GetApplicationMenuEvent); LogService.WriteSuccess("Registro del menú"); UIApplication.ShowSuccess(string.Format("Registro del menu")); //Add application events UIApplication.GetApplication().AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(GetApplicationAppEvent); DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany()); UIApplication.ShowSuccess(string.Format("DI Connect")); //Bascula ConnectRemoteAccess(); //Initialize Tables UIApplication.ShowSuccess(string.Format("Inicializar las tablas")); SetupService mObjSetupService; mObjSetupService = new SetupService(); mObjSetupService.InitializeTables(); UIApplication.ShowSuccess(string.Format("Addon Iniciado correctamente")); LogService.WriteSuccess("[AddOn FoodProduction 1.2.55 STARTED]"); //Ticket instance = (Ticket)Activator.CreateInstance(typeof(Ticket)); //Init application lObjApplication.Run(); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); LogService.WriteError("[ERROR]" + ex.Message); } }
public void Test() { DIApplication.DIConnect((SAPbobsCOM.Company)SAPbouiCOM.Framework.Application.SBO_Application.Company.GetDICompany()); }
/// <summary> Default constructor. </summary> /// <remarks> Ranaya, 24/05/2017. </remarks> public PermissionsServicesFactory() { DIApplication.DIConnect(); }