示例#1
0
        private async Task SearchByPONumber()
        {
            // 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.GetInvoicesByPONumberAsync(userSearchText, (int)LimitNumeric.Value);

            PopulateDataGridView(results);

            FindButton.Enabled = true;
        }
示例#2
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);
        }