Exemplo n.º 1
0
        public void LookupSecurities(long transactionId)
        {
            const string where = "at_code in (A,P,FC,FD,I,OCM,OPM) and place_code in (MICEX_SHR_T,FORTS,RTS_STANDARD,INDEX,INDEX2)";

            // загрузить инструменты
            DoInSysCulture(() => ProcessSecurities.SafeInvoke(transactionId, _tableSecurities.GetLocalDbData(where)));

            _tableSecurities.ReRegisterTable();
        }
Exemplo n.º 2
0
        private void OnTableChanged(string tableName, string tableParams, object data, object fieldTypes)
        {
            try
            {
                if (data == null)
                {
                    return;
                }

                _adapter.AddDebugLog("OnTableChanged: TN={0} WR={1} DT={2} FT={3}", tableName, tableParams, data, fieldTypes);

                DoInSysCulture(() =>
                {
                    var rows = ((string)data).ToRows();

                    if (tableName == _tableDepth.Name)
                    {
                        ProcessQuotes.SafeInvoke(tableParams, rows);
                    }
                    else if (tableName == _tableTrades.Name)
                    {
                        ProcessTrades.SafeInvoke(rows);
                    }
                    else if (tableName == _tableSecurities.Name)
                    {
                        ProcessSecurities.SafeInvoke(0, rows);
                    }
                    else if (tableName == _tableLevel1.Name)
                    {
                        ProcessLevel1.SafeInvoke(rows);
                    }
                    else if (tableName == _tablePositions.Name)
                    {
                        ProcessPositions.SafeInvoke(0, rows);
                    }
                    else if (tableName == _tableOrders.Name)
                    {
                        ProcessOrder.SafeInvoke(rows);
                    }
                    else if (tableName == _tableMyTrades.Name)
                    {
                        ProcessMyTrades.SafeInvoke(rows);
                    }
                    else if (tableName == _tableNews.Name)
                    {
                        ProcessNews.SafeInvoke(rows);
                    }
                });
            }
            catch (Exception e)
            {
                _adapter.AddErrorLog(LocalizedStrings.Str2271Params, e);
                Error.SafeInvoke(e);
            }
        }