Exemplo n.º 1
0
        Uniconta.API.DebtorCreditor.FindPrices SetPriceLookup(ProductionOrderLineClient rec)
        {
            var OrderNumber = rec.OrderRowId;

            if (OrderNumber != 0)
            {
                if (dictPriceLookup.ContainsKey(OrderNumber))
                {
                    return(dictPriceLookup[OrderNumber]);
                }

                var order = (ProductionOrder)productionOrders.Get(OrderNumber);
                if (order != null)
                {
                    var priceLookup = new Uniconta.API.DebtorCreditor.FindPrices(order, api);
                    dictPriceLookup.Add(OrderNumber, priceLookup);
                    return(priceLookup);
                }
            }
            return(null);
        }
Exemplo n.º 2
0
        Uniconta.API.DebtorCreditor.FindPrices SetPriceLookup(DebtorOrderProjectLineLocal rec)
        {
            var proj = (Uniconta.DataModel.Project)ProjectCache.Get(rec._Project);

            if (proj != null)
            {
                if (dictPriceLookup.ContainsKey(proj._DCAccount))
                {
                    return(dictPriceLookup[proj._DCAccount]);
                }

                var order = new DebtorOrder()
                {
                    _DCAccount = proj._DCAccount
                };
                var priceLookup = new Uniconta.API.DebtorCreditor.FindPrices(order, api);
                dictPriceLookup.Add(proj._DCAccount, priceLookup);
                return(priceLookup);
            }
            return(null);
        }