示例#1
0
 private void EnsureAccountLegalEntityHasBeenAdded(AccountLegalEntity accountLegalEntity)
 {
     if (_accountLegalEntities.All(ale => ale.Id != accountLegalEntity.Id))
     {
         throw new InvalidOperationException("Requires account legal entity has been added");
     }
 }
示例#2
0
 public virtual Cohort CreateCohort(long providerId,
                                    AccountLegalEntity accountLegalEntity,
                                    Account transferSender,
                                    DraftApprenticeshipDetails draftApprenticeshipDetails,
                                    UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, transferSender?.Id, draftApprenticeshipDetails, Party.Provider, userInfo));
 }
示例#3
0
        public AccountLegalEntity AddAccountLegalEntity(long accountLegalEntityId, long maLegalEntityId, string legalEntityId,
                                                        string accountLegalEntityPublicHashedId, string name, OrganisationType organisationType, string address,
                                                        DateTime added)
        {
            EnsureAccountLegalEntityHasNotAlreadyBeenAdded(accountLegalEntityId);

            var accountLegalEntity = new AccountLegalEntity(this, accountLegalEntityId, maLegalEntityId, legalEntityId,
                                                            accountLegalEntityPublicHashedId, name, organisationType, address, added);

            _accountLegalEntities.Add(accountLegalEntity);

            return(accountLegalEntity);
        }
示例#4
0
 public Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     throw new NotImplementedException();
 }
示例#5
0
 public virtual Cohort CreateCohortWithOtherParty(long providerId, AccountLegalEntity accountLegalEntity, Account transferSender, string message, UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, transferSender?.Id, Party.Employer, message, userInfo));
 }
示例#6
0
 public virtual Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, Party.Provider, userInfo));
 }
示例#7
0
        public void RemoveAccountLegalEntity(AccountLegalEntity accountLegalEntity, DateTime removed)
        {
            EnsureAccountLegalEntityHasBeenAdded(accountLegalEntity);

            accountLegalEntity.Delete(removed);
        }