Пример #1
0
        public ITRDatum Build(uint spotValueID)
        {
            DataAccessPath dataPath = AppContext.AccessPath;

            var datum = new TRDatum();

            datum.SpotValue      = dataPath.GetKeyIndexer(InternalTablesID.TR_SPOT_VALUE).Get(spotValueID) as SpotValue;
            datum.TRLabel        = dataPath.GetKeyIndexer(InternalTablesID.TR_LABEL).Get(datum.SpotValue.LabelID) as TRLabel;
            datum.ProductMapping = dataPath.GetKeyIndexer(InternalTablesID.TR_PRODUCT_MAPPING).Get(datum.SpotValue.ProductMappingID) as ProductMapping;
            datum.Product        = dataPath.GetKeyIndexer(TablesID.PRODUCT).Get(datum.ProductMapping.ProductID) as Product;
            datum.ValueContext   = dataPath.GetKeyIndexer(TablesID.VALUE_CONTEXT).Get(datum.ProductMapping.ContextID) as ValueContext;
            datum.Country        = dataPath.GetKeyIndexer(TablesID.COUNTRY).Get(datum.ValueContext.OriginID) as Country;
            datum.Currency       = dataPath.GetKeyIndexer(TablesID.CURRENCY).Get(datum.ValueContext.CurrencyID) as Currency;
            datum.Unit           = dataPath.GetKeyIndexer(TablesID.UNIT).Get(datum.ValueContext.UnitID) as Unit;
            datum.Place          = dataPath.GetKeyIndexer(TablesID.PLACE).Get(datum.ValueContext.PlaceID) as Place;
            datum.Incoterm       = dataPath.GetKeyIndexer(TablesID.INCOTERM).Get(datum.ValueContext.IncotermID) as Incoterm;

            return(datum);
        }
Пример #2
0
 public IDBKeyIndexer GetKeyIndexer(uint idTable)
 {
     lock (m_lock)
         return(m_accessPath.GetKeyIndexer(idTable));
 }