public HostDeposit CreateHostDeposit(HostPaymentEntity hostPaymentEntity, Address address) { var hostPaymentFactory = new HostPaymentFactory(); var domainObjectToMapTo = new HostDeposit(); hostPaymentFactory.CreateHostDeposit(hostPaymentEntity, domainObjectToMapTo, address); domainObjectToMapTo.DepositApplicablityMode = (DepositType)hostPaymentEntity.DepositType; domainObjectToMapTo.DepositFullRefundDueDays = hostPaymentEntity.DepositFullRefundDays; return(domainObjectToMapTo); }
public bool UpdateHostPaymentStatusAndNotes(long hostPaymentId, decimal amount, int hostPaymentStatus) { var hostPayment = new HostPaymentEntity(hostPaymentId) { Status = hostPaymentStatus }; IRelationPredicateBucket relationPredicateBucket = new RelationPredicateBucket(HostPaymentFields.HostPaymentId == hostPaymentId); using (IDataAccessAdapter myAdapter = PersistenceLayer.GetDataAccessAdapter()) { return(myAdapter.UpdateEntitiesDirectly(hostPayment, relationPredicateBucket) > 0); } }
public void CreateHostDeposit(HostPaymentEntity hostPaymentEntity, HostPayment hostPayment, Address address) { hostPayment.Id = hostPaymentEntity.HostPaymentId; hostPayment.HostId = hostPaymentEntity.HostId; hostPayment.Amount = hostPaymentEntity.Amount; hostPayment.CreatedDate = hostPaymentEntity.DateCreated; hostPayment.DueDate = hostPaymentEntity.DueDate; hostPayment.EventId = hostPaymentEntity.EventId; hostPayment.MailingAttentionOf = hostPaymentEntity.MailingAttentionOf; hostPayment.MailingOrganizationName = hostPaymentEntity.MailingOrganizationName; hostPayment.PaymentMode = (HostPaymentType)hostPaymentEntity.PaymentMode; hostPayment.Status = (HostPaymentStatus)hostPaymentEntity.Status; hostPayment.PayableTo = hostPaymentEntity.PayableTo; hostPayment.PaymentMailingAddress = address; hostPayment.PaymentRecordedBy = hostPaymentEntity.CreatorOrganizationRoleUserId != null ? new OrganizationRoleUser(hostPaymentEntity.CreatorOrganizationRoleUserId.Value) : null; hostPayment.IsActive = hostPaymentEntity.IsActive; hostPayment.HostPaymentTransactions = _mapper.MapMultiple(hostPaymentEntity.HostPaymentTransaction).ToList(); }
public HostPayment CreateHostPayment(HostPaymentEntity hostPaymentEntity, Address address) { return(new HostPayment(hostPaymentEntity.HostPaymentId) { HostId = hostPaymentEntity.HostId, Amount = hostPaymentEntity.Amount, PaymentMode = (HostPaymentType)hostPaymentEntity.PaymentMode, PayableTo = hostPaymentEntity.PayableTo, MailingAttentionOf = hostPaymentEntity.MailingAttentionOf, MailingOrganizationName = hostPaymentEntity.MailingOrganizationName, DueDate = hostPaymentEntity.DueDate, Status = (HostPaymentStatus)hostPaymentEntity.Status, CreatedDate = hostPaymentEntity.DateCreated, EventId = hostPaymentEntity.EventId, PaymentMailingAddress = address, PaymentRecordedBy = hostPaymentEntity.CreatorOrganizationRoleUserId != null ? new OrganizationRoleUser(hostPaymentEntity.CreatorOrganizationRoleUserId.Value) : null, IsActive = hostPaymentEntity.IsActive, HostPaymentTransactions = _mapper.MapMultiple(hostPaymentEntity.HostPaymentTransaction).ToList() }); }