Example #1
0
 private void btnCloseCompany_Click(object sender, EventArgs e)
 {
     if (!APIEngine.APIInitialized)
     {
         MessageBox.Show("API is not initialized", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         APIEngine.Terminate();
     }
 }
Example #2
0
 private void btnCloseAPI_Click(object sender, RoutedEventArgs e)
 {
     try {
         this.Cursor = Cursors.Wait;
         APIEngine.Terminate();
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message, Application.Current.MainWindow.Title, MessageBoxButton.OK, MessageBoxImage.Error);
     }
     finally {
         this.Cursor = Cursors.Arrow;
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            //Config. Connect to Database
            string ProductCode = "CRTL";
            string CompanyID   = "EMPRESA";
            bool   Isdebug     = true;

            try {
                //Inicialize API
                APIEngine.Initialize(ProductCode, CompanyID, Isdebug);
            }
            catch (Exception ex) {
                Console.Error.Write(ex.Message);
            }

            if (APIEngine.APIInitialized)
            {
                //1º  stock entry
                //ES : 10 7UPs | 10 TARAS
                //StockTransactionSave();

                //2º Purchase
                //FS: 20 7UPs | 20 TARAS
                //ItemTransactionSavePurchase();

                //3º Sale
                //FS: 5 7UPs | 5 TARAS
                ItemTransactionSaveSale();

                //4º Sale sale with returnable return
                //FS: 5 7UPs | 5 TARAS
                //ItemTransactionSaveSaleWithReturnOfReturnable();
            }

            //Terminate API
            APIEngine.Terminate();
        }
Example #4
0
 private void frmDocumentos_FormClosed(object sender, FormClosedEventArgs e)
 {
     APIEngine.Terminate();
     Application.Exit();
 }