Ejemplo n.º 1
0
        public async Task <MatchingOrdersResult> GetMatchingBillingOrderAsync(string SessionKey, int CompanyId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var result = (await collationSettingProcessor.GetMatchingBillingOrderAsync(CompanyId, token)).ToList();

                return new MatchingOrdersResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    MatchingOrders = result,
                };
            }, logger));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <IEnumerable <Billing> > > SearchBillingData(MatchingBillingSearch option, CancellationToken token)
        {
            List <Billing> result = null;

            option.Orders = (await collationSettingProcessor
                             .GetMatchingBillingOrderAsync(option.CompanyId, token))
                            .Where(x => (x.Available == 1)).ToArray();


            if (!option.MatchingHeaderId.HasValue)
            {
                result = (await matchingProcessor.SearchBillingDataAsync(option, token)).ToList();
            }
            else
            {
                result = (await matchingProcessor.GetMatchedBillingsAsync(option, token)).ToList();
            }
            return(result);
        }
Ejemplo n.º 3
0
        public async Task<BillingsResult> SearchBillingDataAsync(string SessionKey, MatchingBillingSearch MatchingBillingSearch)
        {
            return await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                List<Billing> result = null;
                MatchingBillingSearch.Orders = (await collationSettingProcessor
                    .GetMatchingBillingOrderAsync(MatchingBillingSearch.CompanyId, token))
                    .Where(x => (x.Available == 1)).ToArray();

                if (!MatchingBillingSearch.MatchingHeaderId.HasValue)
                {
                    result = (await matchingProcessor.SearchBillingDataAsync(MatchingBillingSearch, token)).ToList();
                }
                else
                {
                    result = (await matchingProcessor.GetMatchedBillingsAsync(MatchingBillingSearch, token)).ToList();
                }
                return new BillingsResult
                {
                    ProcessResult = new ProcessResult { Result = true },
                    Billings = result,
                };
            }, logger);
        }
Ejemplo n.º 4
0
 public async Task <IEnumerable <MatchingOrder> > GetMatchingBillingOrder(CollationSetting setting, CancellationToken token)
 => (await collationSettingProcessor.GetMatchingBillingOrderAsync(setting.CompanyId)).ToArray();