Example #1
0
 public TimelineProperty(TimelineType type, string text, params long[] accountIds)
 {
     Type = type;
     Text = text;
     if (accountIds.Length > 0)
     {
         AccountIds.AddRange(accountIds);
     }
 }
        protected void CreateAccountBalances()
        {
            var balances = DataContext.Balances.Where(balance => AccountIds.Contains(balance.EmployerAccountId)).ToList();

            foreach (var accountId in AccountIds)
            {
                var balance = balances.FirstOrDefault(b => b.EmployerAccountId == accountId) ?? DataContext.Balances.Add(new BalanceModel {
                    EmployerAccountId = accountId, Amount = 500000, BalancePeriod = DateTime.Now, ReceivedDate = DateTime.Now, RemainingTransferBalance = 50000, TransferAllowance = 50000, UnallocatedCompletionPayments = 0
                });
                balance.ReceivedDate = DateTime.Now;
            }
            DataContext.SaveChanges();
        }
Example #3
0
 public List <string> GetAccountsToDelete() => AccountIds.Except(FailedAccountIds.Keys).ToList();