public void UpdateCustomerPayment(CustomerPaymentDTO customerPaymentDTO) { CustomerPaymentTransaction customerPaymentTransaction = null; CustomerPaymentConvertor.ConvertToCustomerPaymentEntity(ref customerPaymentTransaction, customerPaymentDTO, true); unitOfWork.CustomerPaymentRepository.Update(customerPaymentTransaction); unitOfWork.SaveChanges(); }
public void AddCustomerPayment(CustomerPaymentDTO customerPaymentDTO) { CustomerPaymentTransaction customerPaymentTransaction = new CustomerPaymentTransaction(); customerPaymentTransaction.CustomerPaymentId = unitOfWork.DashboardRepository.NextNumberGenerator("CustomerPaymentTransaction"); CustomerPaymentConvertor.ConvertToCustomerPaymentEntity(ref customerPaymentTransaction, customerPaymentDTO, false); unitOfWork.CustomerPaymentRepository.Add(customerPaymentTransaction); this.UpdateCustomerWallet(customerPaymentDTO); unitOfWork.SaveChanges(); }