예제 #1
0
        public async Task ShouldFindBillByInvoiceNumberWithoutIncludesForRolloutTeamSuccess(string invoiceNumbers)
        {
            var result = await _sut.FindBillByInvoiceNumberWithoutIncludesForRolloutTeam(invoiceNumbers);

            Assert.NotNull(result);
            Assert.IsType <BillInfo>(result);
        }
예제 #2
0
        public async Task <bool> SetBillPaidForRolloutTeam(BillViewModel postedModel)
        {
            var bill = await _billQueries.FindBillByInvoiceNumberWithoutIncludesForRolloutTeam(postedModel.BillInvoiceNumber);

            try
            {
                if (bill != null)
                {
                    bill.UpdateBillStatusForRollOutTeam();
                    await _billCommands.UpdateBillAsync(bill);

                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                _logger.LogError("ex", ex.Message.ToString());
                return(false);
            }
        }