Exemplo n.º 1
0
        public void TestTasks2()
        {
            TasksRunner tasksRunner = new TasksRunner(this.WSAccessKey, this.FileUid);
            IInsertTask insertTask = null;
            IUpdateTask updateTask = null;

            this.MrsSmith.PostalAddress.Street = "11/111 ABC Av";
            this.MrsSmith.PostalAddress.City = "Sydney";
            this.MrsSmith.PostalAddress.State = "NSW";
            this.MrsSmith.MobilePhone = "0666 666 666";

            updateTask = new UpdateContactTask();
            updateTask.EntityToUpdate = this.MrsSmith;
            tasksRunner.Tasks.Add(updateTask);

            SaleTests saleTests = new SaleTests();
            saleTests.TestFixtureSetUp();

            insertTask = new InsertInvoiceTask();
            InvoiceDto invoiceDto = saleTests.GetServiceSale();
            invoiceDto.ContactUid = 99999;
            insertTask.EntityToInsert = invoiceDto;
            tasksRunner.Tasks.Add(insertTask);

            insertTask = new InsertInvoiceTask();
            insertTask.EntityToInsert = saleTests.GetUnpaidItemSale();
            tasksRunner.Tasks.Add(insertTask);

            TasksResponse response = tasksRunner.Execute();
        }
Exemplo n.º 2
0
        public void BulkInsertInvoice()
        {
            TasksRunner tasksRunner = new TasksRunner(this.WSAccessKey, this.FileUid);

            InsertInvoiceTask insertInvoiceTask = null;

            insertInvoiceTask = new InsertInvoiceTask();
            insertInvoiceTask.EntityToInsert = this.GetServiceSale();
            tasksRunner.Tasks.Add(insertInvoiceTask);

            insertInvoiceTask = new InsertInvoiceTask();
            insertInvoiceTask.EntityToInsert = this.GetItemSale();
            tasksRunner.Tasks.Add(insertInvoiceTask);

            TasksResponse tasksResponse = tasksRunner.Execute();
        }