private void updateMasterData(StockDataTransferObject record) { DBUpdater updater = new DBUpdater(); if (updater.updateMasterData(record) > 0) { MessageBox.Show( "Folgende Stammdaten wurden gespeichert: " + '\n' + "ISIN: " + record.isin + '\n' + "WKN: " + record.wkn + '\n' + "Symbol: " + record.symbol + '\n' + "Name: " + record.name + '\n' + "Sektor: " + record.sector + '\n' + "URL-Suffix: " + record.suffix_onvista ); } else { MessageBox.Show("Stammdaten für " + record.name + " konnten nicht gespeichert werden."); } }
private void findOrCreateWorker(String symbol, LiveConnectionSubscriber subscriber, LiveConnectors variant) { //search for worker which already loads the relevant data PushWorker worker = findWorker(symbol, variant); //create worker only in case of new symbol if (worker == null) { worker = new PushWorker(variant, symbol); DBUpdater dbUpdater = new DBUpdater(); //stash objects for later use listOfPushWorkers.Add(worker); listOfDBUpdaters.Add(dbUpdater); //subscribe dedicated mySQL-Connector to keep DB up-to-date worker.subscribe(dbUpdater); //initialize worker, tell him to load worker.startWork(); } //subscribe interested Object (e.g. table, chart, etc.) worker.subscribe(subscriber); }