Ejemplo n.º 1
0
 public AccountTransactionHistoryModel ToAccountTransactionHistoryModel(AccountTransactionHistory accountTransactionHistory)
 {
     //  if (accountTransactionHistory == null)
     return(new AccountTransactionHistoryModel());
     //return new AccountTransactionHistoryModel
     //{
     //    AccountTransactionHistoryId = accountTransactionHistory.AccountTransactionHistoryId.Encrypt(),
     //    TicketId = accountTransactionHistory.TicketId,
     //    AccountId = accountTransactionHistory.AccountId,
     //    TransactionType = accountTransactionHistory.TransactionType,
     //    TransactionReason = accountTransactionHistory.TransactionReason,
     //    TakeProfit = accountTransactionHistory.TakeProfit,
     //    StopLoss = accountTransactionHistory.StopLoss,
     //    TrailingStop = accountTransactionHistory.TrailingStop,
     //    UpperBound = accountTransactionHistory.UpperBound,
     //    LowerBound = accountTransactionHistory.LowerBound,
     //    Side = accountTransactionHistory.Side,
     //    Instrument = accountTransactionHistory.Instrument,
     //    Volume = accountTransactionHistory.Volume,
     //    OpenPrice = accountTransactionHistory.OpenPrice,
     //    ClosePrice = accountTransactionHistory.ClosePrice,
     //    TransactionCreatedOn = Convert.ToDateTime(accountTransactionHistory.TransactionCreatedOn),
     //    TransactionClosedOn = Convert.ToDateTime(accountTransactionHistory.TransactionClosedOn),
     //    ProfitLoss = accountTransactionHistory.ProfitLoss,
     //    Amount = accountTransactionHistory.Amount,
     //    Interest = accountTransactionHistory.Interest,
     //    Expiry = Convert.ToDateTime(accountTransactionHistory.Expiry),
     //    CreatedBy = accountTransactionHistory.CreatedBy,
     //    CreatedOn = Convert.ToDateTime(accountTransactionHistory.CreatedOn),
     //    UpdatedBy = accountTransactionHistory.UpdatedBy,
     //    UpdatedOn = Convert.ToDateTime(accountTransactionHistory.UpdatedOn),
     //    Status = accountTransactionHistory.Status
     //};
 }
Ejemplo n.º 2
0
        public List <AccountTransactionHistory> AddAccountTransactionHistoryStats()
        {
            var list = new List <int> {
                1, 2, 3, 4, 5, 6
            }.ToList();

            var AccountStatsList = new List <AccountTransactionHistory>();

            int count = 11;

            foreach (var item in list)
            {
                AccountTransactionHistory accountStats = new AccountTransactionHistory();

                accountStats.AccountId       = "1";
                accountStats.Amount          = 20000 + count;
                accountStats.ClosePrice      = count;
                accountStats.CreatedBy       = "Rohit";
                accountStats.Expiry          = "1:50";
                accountStats.CreatedOn       = "12/8/2016  7:10:05 PM";
                accountStats.Instrument      = "Small";
                accountStats.Interest        = 11111 + count;
                accountStats.LowerBound      = "SS";
                accountStats.OpenPrice       = 4444 + count;
                accountStats.Status          = true;
                accountStats.ProfitLoss      = 777 + count;
                accountStats.Side            = "Side";
                accountStats.UpdatedBy       = 11 + count;
                accountStats.UpdatedOn       = "12/8/2016  7:10:05 PM";
                accountStats.StopLoss        = "Near";
                accountStats.TakeProfit      = 5555 + count;
                accountStats.TicketId        = 11;
                accountStats.TrailingStop    = "EUR";
                accountStats.Volume          = 5555 + count;
                accountStats.UpperBound      = "UpperBound";
                accountStats.UpdatedOn       = "12/8/2016  7:10:05 PM";
                accountStats.UpdatedBy       = "Mohit";
                accountStats.TransactionType = "Full";

                //_unitOfWork.AccountStatsRepository.Add(accountStats);
                AccountStatsList.Add(accountStats);

                ++count;
            }

            return(AccountStatsList);
        }