Exemple #1
0
        private async Task SearchByInvoiceNumber()
        {
            // dgv columns:
            // TranCmnt
            // TranDate
            // CustID
            // CustName
            // CustPONo
            // TranAmt
            // TranID
            ClearError();
            ResultsDataGridView.DataSource = null;
            ResultsDataGridView.Rows.Clear();
            ResultsDataGridView.Columns.Clear();
            FindButton.Enabled = false;

            StartCountLoadingEffect();

            string userSearchText = FindTextBox.Text.TrimEnd();
            List<Invoice> results = await service.GetInvoicesByTranNoAsync(userSearchText, (int)LimitNumeric.Value);

            PopulateDataGridView(results);

            FindButton.Enabled = true;
        }
Exemple #2
0
        public void TestInvoiceToCustomerRelationship()
        {
            var service  = new ARResearchService();
            var invoices = service.GetInvoicesByTranNoAsync("0000010085").Result;

            Assert.IsTrue(invoices.Count > 0);
            Assert.IsNotNull(invoices[0].Customer);
        }
Exemple #3
0
        public void TestInvoiceRepositoryMethods()
        {
            var service        = new ARResearchService();
            var tranNoInvoices = service.GetInvoicesByTranNoAsync("0000010085").Result;
            var poNoInvoices   = service.GetInvoicesByPONumberAsync("DONALDS").Result;
            var amtInvoices    = service.GetInvoicesByTranAmtAsync(100).Result;

            Assert.IsTrue(tranNoInvoices.Count > 0);
            Assert.IsTrue(poNoInvoices.Count > 0);
            Assert.IsTrue(amtInvoices.Count > 0);
        }