public void StartExportNews() { // Загрузить новости var data = _tableNews.GetLocalDbData(); DoInSysCulture(() => ProcessNews.SafeInvoke(data)); _tableNews.ReRegisterTable(); }
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); } }