示例#1
0
        public void Execute()
        {
            /*DateTime lastExecution = (DateTime)context.Bag["LAST_EXECUTION"];
             * double intervall = (double)context.Bag["INTERVALL"];*/

            QuickBooksInvoiceAgent    agent    = new QuickBooksInvoiceAgent(context);
            List <ITransactionEntity> invoices = agent.Import();
        }
示例#2
0
        protected override void ImportQb()
        {
            DateTime dt = DateTime.MinValue;

            if (!DateTime.TryParse(extendedData[MessageDataExtensionKeys.BEGIN_DATE], out dt))
            {
                throw new Exception(string.Format("Invalid begin date criteria `{0}`", extendedData[MessageDataExtensionKeys.BEGIN_DATE]));
            }
            Context.Bag.Add(MessageDataExtensionKeys.BEGIN_DATE, dt);

            if (!DateTime.TryParse(extendedData[MessageDataExtensionKeys.END_DATE], out dt))
            {
                throw new Exception(string.Format("Invalid end date criteria `{0}`", extendedData[MessageDataExtensionKeys.END_DATE]));
            }


            Context.Bag.Add(MessageDataExtensionKeys.END_DATE, dt);

            using (qbAgent = new QuickBooksInvoiceAgent(Context))
            {
                qbAgent.Import();
            }
        }