public void Add(AccountTransaction transaction) { int count; for (count = this.transactions.Count; count > 0; --count) { AccountTransaction accountTransaction = this[count-1]; if (transaction.DateTime >= accountTransaction.DateTime) break; } this.transactions.Insert(count, transaction); }
public void Add(AccountTransaction transaction) { AccountPosition position = this.positions[transaction.Currency]; if (position == null) { position = new AccountPosition(transaction.Currency); this.positions.Add(position); } this.transactions.Add(transaction); this.EmitTransactionAdded(transaction); position.Value += transaction.Value; this.EmitAccountChanged(); }
public void Add(AccountTransaction transaction) { int count; for (count = this.transactions.Count; count > 0; --count) { AccountTransaction accountTransaction = this[count - 1]; if (transaction.DateTime >= accountTransaction.DateTime) { break; } } this.transactions.Insert(count, transaction); }
public void Add(Portfolio portfolio, AccountTransaction transaction) { IDbCommand command1 = this.connection.CreateCommand(); // command1.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7600); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7862), DbType.Int32, (object) portfolio.Id); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7884), DbType.DateTime, (object) transaction.DateTime); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7906), DbType.String, (object) transaction.Currency.Code); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7928), DbType.Double, (object) transaction.Value); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7944), DbType.String, (object) transaction.Text); // command1.ExecuteNonQuery(); // command1.Dispose(); IDbCommand command2 = this.connection.CreateCommand(); // command2.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7958); transaction.G7YBAhR7LA(Convert.ToInt32(command2.ExecuteScalar())); command2.Dispose(); }
public void Add(Portfolio portfolio, AccountTransaction transaction) { }
private void DdBEZNiZyZ(Portfolio obj0) { obj0.LwTsbC870d(true); IDbCommand command1 = this.connection.CreateCommand(); // command1.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7996); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(8138), DbType.Int32, (object) obj0.Id); IDataReader dataReader1 = command1.ExecuteReader(); while (dataReader1.Read()) { int int32_1 = dataReader1.GetInt32(0); dataReader1.GetInt32(1); string string1 = dataReader1.GetString(2); int int32_2 = dataReader1.GetInt32(3); DateTime dateTime = dataReader1.GetDateTime(4); int int32_3 = dataReader1.GetInt32(5); string string2 = dataReader1.GetString(6); double double1 = dataReader1.GetDouble(7); double double2 = dataReader1.GetDouble(8); string string3 = dataReader1.GetString(9); string string4 = dataReader1.GetString(10); string string5 = dataReader1.GetString(11); double double3 = dataReader1.GetDouble(12); string string6 = dataReader1.GetString(13); Transaction transaction = new Transaction(); transaction.nx8WA03O1L(int32_1); transaction.ClOrdID = string1; transaction.ReportId = int32_2; transaction.DateTime = dateTime; transaction.Instrument = InstrumentManager.Instruments.GetById(int32_3); transaction.Side = FIXSide.FromFIX(string2[0]); transaction.Price = double1; transaction.Qty = double2; transaction.Text = string3; TransactionCost transactionCost = (TransactionCost)Activator.CreateInstance(Type.GetType(string.Format("s", (object)string5, (object)string4)), true); transactionCost.CommType = FIXCommType.FromFIX(string6[0]); transactionCost.Commission = double3; transaction.TransactionCost = transactionCost; if (transaction.Instrument == null) { transaction.Instrument = this.xKIEA4RkYI(int32_3); } obj0.Add(transaction); } dataReader1.Close(); command1.Dispose(); IDbCommand command2 = this.connection.CreateCommand(); // command2.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(8180); FIXDbServer.SetCommandParameter(command2, "sss", DbType.Int32, (object)obj0.Id); IDataReader dataReader2 = command2.ExecuteReader(); while (dataReader2.Read()) { int int32 = dataReader2.GetInt32(0); dataReader2.GetInt32(1); DateTime dateTime = dataReader2.GetDateTime(2); string @string = dataReader2.GetString(3); double @double = dataReader2.GetDouble(4); string str = dataReader2.IsDBNull(5) ? "" : dataReader2.GetString(5); AccountTransaction transaction = new AccountTransaction(); transaction.G7YBAhR7LA(int32); transaction.DateTime = dateTime; transaction.Currency = CurrencyManager.Currencies[@string]; transaction.Value = @double; transaction.Text = str; obj0.Account.Add(transaction); } dataReader2.Close(); command2.Dispose(); obj0.LwTsbC870d(false); }
public AccountTransactionEventArgs(AccountTransaction transaction) : base() { this.Transaction = transaction; }
internal static void vwIs2WhnRQ(Portfolio position, AccountTransaction transaction) { PortfolioManager.server.Add(position, transaction); }
private void EmitTransactionAdded(AccountTransaction transaction) { if (this.TransactionAdded != null) this.TransactionAdded(this, new AccountTransactionEventArgs(transaction)); }
private void DdBEZNiZyZ(Portfolio obj0) { obj0.LwTsbC870d(true); IDbCommand command1 = this.connection.CreateCommand(); // command1.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(7996); // FIXDbServer.SetCommandParameter(command1, gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(8138), DbType.Int32, (object) obj0.Id); IDataReader dataReader1 = command1.ExecuteReader(); while (dataReader1.Read()) { int int32_1 = dataReader1.GetInt32(0); dataReader1.GetInt32(1); string string1 = dataReader1.GetString(2); int int32_2 = dataReader1.GetInt32(3); DateTime dateTime = dataReader1.GetDateTime(4); int int32_3 = dataReader1.GetInt32(5); string string2 = dataReader1.GetString(6); double double1 = dataReader1.GetDouble(7); double double2 = dataReader1.GetDouble(8); string string3 = dataReader1.GetString(9); string string4 = dataReader1.GetString(10); string string5 = dataReader1.GetString(11); double double3 = dataReader1.GetDouble(12); string string6 = dataReader1.GetString(13); Transaction transaction = new Transaction(); transaction.nx8WA03O1L(int32_1); transaction.ClOrdID = string1; transaction.ReportId = int32_2; transaction.DateTime = dateTime; transaction.Instrument = InstrumentManager.Instruments.GetById(int32_3); transaction.Side = FIXSide.FromFIX(string2[0]); transaction.Price = double1; transaction.Qty = double2; transaction.Text = string3; TransactionCost transactionCost = (TransactionCost)Activator.CreateInstance(Type.GetType(string.Format("s", (object)string5, (object)string4)), true); transactionCost.CommType = FIXCommType.FromFIX(string6[0]); transactionCost.Commission = double3; transaction.TransactionCost = transactionCost; if (transaction.Instrument == null) transaction.Instrument = this.xKIEA4RkYI(int32_3); obj0.Add(transaction); } dataReader1.Close(); command1.Dispose(); IDbCommand command2 = this.connection.CreateCommand(); // command2.CommandText = gUqQbWj9pYGI8tO6Z8.iW3dklQ6Dr(8180); FIXDbServer.SetCommandParameter(command2, "sss", DbType.Int32, (object)obj0.Id); IDataReader dataReader2 = command2.ExecuteReader(); while (dataReader2.Read()) { int int32 = dataReader2.GetInt32(0); dataReader2.GetInt32(1); DateTime dateTime = dataReader2.GetDateTime(2); string @string = dataReader2.GetString(3); double @double = dataReader2.GetDouble(4); string str = dataReader2.IsDBNull(5) ? "" : dataReader2.GetString(5); AccountTransaction transaction = new AccountTransaction(); transaction.G7YBAhR7LA(int32); transaction.DateTime = dateTime; transaction.Currency = CurrencyManager.Currencies[@string]; transaction.Value = @double; transaction.Text = str; obj0.Account.Add(transaction); } dataReader2.Close(); command2.Dispose(); obj0.LwTsbC870d(false); }