static void Main(string[] args) { using (Screen screen = new Screen()) { //Specify the connection parameters screen.CookieContainer = new System.Net.CookieContainer(); screen.Url = Properties.Settings. Default.MyBIIntegrationSBAPI_MyBIIntegration_Screen; //Sign in to Acumatica ERP screen.Login ( Properties.Settings.Default.Username, Properties.Settings.Default.Password ); try { //Retrieving the list of customers with contacts //InitialDataRetrieval.ExportCustomers(screen); //Retrieving the quantities of stock items //InitialDataRetrievalGI.ExportItemQuantities(screen); //Retrieving the list of stock items modified within the past day RetrievalOfDelta.ExportStockItems(screen); } catch (Exception e) { Console.WriteLine(e); Console.WriteLine(); Console.WriteLine("Press any key to continue"); Console.ReadLine(); } finally { //Sign out from Acumatica ERP screen.Logout(); } } }
static void Main(string[] args) { //Using the Default/18.200.001 endpoint using (Default.DefaultSoapClient soapClient = new Default.DefaultSoapClient()) { //Sign in to Acumatica ERP soapClient.Login ( Properties.Settings.Default.Username, Properties.Settings.Default.Password, Properties.Settings.Default.Tenant, Properties.Settings.Default.Company, null ); try { //Retrieving the list of customers with contacts //InitialDataRetrieval.RetrieveListOfCustomers(soapClient); //Retrieving the list of stock items modified within the past day RetrievalOfDelta.ExportStockItems(soapClient); } catch (Exception e) { Console.WriteLine(e); Console.WriteLine(); Console.WriteLine("Press any key to continue"); Console.ReadLine(); } finally { //Sign out from Acumatica ERP soapClient.Logout(); } } /* * //Using ItemAvailabilityData/0001 endpoint * using (ItemAvailabilityData.DefaultSoapClient soapClient = new ItemAvailabilityData.DefaultSoapClient()) * { * //Sign in to Acumatica ERP * soapClient.Login * ( * Properties.Settings.Default.Username, * Properties.Settings.Default.Password, * Properties.Settings.Default.Tenant, * Properties.Settings.Default.Company, * null * ); * * try * { * //Retrieving the quantities of stock items * //InitialDataRetrievalGI.RetrieveItemQuantities(soapClient); * } * catch (Exception e) * { * Console.WriteLine(e); * Console.WriteLine(); * Console.WriteLine("Press any key to continue"); * Console.ReadLine(); * } * finally * { * //Sign out from Acumatica ERP * soapClient.Logout(); * } * } */ }