Beispiel #1
0
        public void Perform()
        {
            // narrow the timespam from which we retrieve the transactions
            AB.AB_JobGetTransactions_SetFromTime(AqJobHandle, AqHelper.convertToGwenTime(FromTime));
            AB.AB_JobGetTransactions_SetToTime(AqJobHandle, AqHelper.convertToGwenTime(ToTime));

            // create a new aqbanking job for transaction retrieving
            SWIGTYPE_p_AB_JOB_LIST2 list = AB.AB_Job_List2_new();

            AB.AB_Job_List2_PushBack(list, this.AqJobHandle);


            var ctx = AB.AB_ImExporterContext_new();
            int rv  = AB.AB_Banking_ExecuteJobs(abHandle, list, ctx);

            if (rv < 0)
            {
                throw new Exception("Aqbanking ExecuteJobs() failed with return code: " + rv);
            }

            var accinfo = AB.AB_ImExporterContext_GetAccountInfo(ctx, Account.BankIdentifier, Account.AccountIdentifier);

            // fill our transactions list from aqbanking
            var trans = AB.AB_ImExporterAccountInfo_GetFirstTransaction(accinfo);

            while (trans != null)
            {
                AqTransaction transaction = new AqTransaction(trans);
                this.Transactions.Add((ITransaction)transaction);
                trans = AB.AB_ImExporterAccountInfo_GetNextTransaction(accinfo);
            }
        }
Beispiel #2
0
        public void Perform()
        {
            // narrow the timespam from which we retrieve the transactions
            AB.AB_JobGetTransactions_SetFromTime (AqJobHandle, AqHelper.convertToGwenTime (FromTime));
            AB.AB_JobGetTransactions_SetToTime (AqJobHandle, AqHelper.convertToGwenTime (ToTime));

            // create a new aqbanking job for transaction retrieving
            SWIGTYPE_p_AB_JOB_LIST2 list = AB.AB_Job_List2_new ();
            AB.AB_Job_List2_PushBack (list, this.AqJobHandle);

            var ctx = AB.AB_ImExporterContext_new ();
            int rv = AB.AB_Banking_ExecuteJobs (abHandle, list, ctx);
            if (rv < 0)
                throw new Exception ("Aqbanking ExecuteJobs() failed with return code: " + rv);

            var accinfo = AB.AB_ImExporterContext_GetAccountInfo (ctx, Account.BankIdentifier, Account.AccountIdentifier);

            // fill our transactions list from aqbanking
            var trans = AB.AB_ImExporterAccountInfo_GetFirstTransaction (accinfo);
            while (trans != null) {
                AqTransaction transaction = new AqTransaction (trans);
                this.Transactions.Add ((ITransaction)transaction);
                trans = AB.AB_ImExporterAccountInfo_GetNextTransaction (accinfo);
            }
        }