public OptionTrade(HugoDataSet.ConfirmationCorrectionsRow row) { tradeType = ConvertTradeTypeName(row.TradeTypeName, ""); tradeVolume = Convert.ToDouble(row.TradeVolume); tradePrice = Convert.ToDouble(row.TradePrice); totalCost = Convert.ToDouble(row.TotalCost); subAcctName = row.SubAcctName; underlyingSymbol = row.UnderlyingSymbol; optionSymbol = row.OptionSymbol; expirationDate = row.ExpirationDate; strikePrice = row.StrikePrice; optionType = row.OptionType; exchangeName = row.ExchangeName.StartsWith("?") ? null : row.ExchangeName; tradeDate = ConvertExt.ToValidDateTime(row.TradeDate); if (row.RecordType == "Correction") { tradeNote = "Changed to: " + row.GetDifferenceMsg(false /* use Hugo account and underlying symbols */); } else { tradeNote = "(" + row.RecordType + ")"; } }
private static void SendEmailToTraders(string outputLine, HugoDataSet.ConfirmationCorrectionsRow row) { // we have to send e-mails by account not subaccount - get the account first int account = Utilities.GetAccountIdFromSubaccountName(row.SubAcctName); // get the corresponding stringbuilder StringBuilder accountMail = null; if (!_tradersMail.TryGetValue(account, out accountMail)) { accountMail = new StringBuilder(); accountMail.AppendLine(s_header); _tradersMail.Add(account, accountMail); } accountMail.AppendLine(outputLine); }
private static string BuildStockConfirmationCorrectionLine(HugoDataSet.ConfirmationCorrectionsRow row) { string outputLine; outputLine = String.Format("\"{0}\",{1:d},{2:d},\"{3}\",\"{4}\",\"{5}\",,,,, \"{6}\",{7},{8},\"{9}\",\"{10}\",{11:d},\"{12}\"", row.RecordType ?? String.Empty, row.ImportDate, row.TradeDate, row.TradeReferenceNumber ?? String.Empty, row.AccountNumber ?? String.Empty, row.UnderlyingSymbol ?? String.Empty, row.TradeTypeName ?? String.Empty, row.TradeVolume, row.TradePrice, row.ExecutingBroker ?? String.Empty, row.ExchangeName ?? String.Empty, row.TradeDate, row.GetDifferenceMsg(true) ?? String.Empty); return(outputLine); }