Example #1
0
        public bool FranchiseeTenantUpdatePayment(FranchiseeTenantUpdatePaymentDto franchiseeTenantUpdatePaymentDto)
        {
            var franchisee =
                _franchiseeTenantRepository.FirstOrDefault(
                    o => o.Name == franchiseeTenantUpdatePaymentDto.FranchiseeName &&
                    o.LicenseKey == franchiseeTenantUpdatePaymentDto.LicenseKey);

            using (var scope = new TransactionScope())
            {
                franchisee.RemainingAmount = franchiseeTenantUpdatePaymentDto.Amount;
                franchiseeTenantUpdatePaymentDto.NextBillingDate = franchiseeTenantUpdatePaymentDto.NextBillingDate;

                _franchiseeTenantRepository.Update(franchisee);
                _franchiseeTenantRepository.Commit();
                scope.Complete();
                return(true);
            }
        }
Example #2
0
 public IHttpActionResult FranchiseeTenantUpdatePayment(FranchiseeTenantUpdatePaymentDto franchiseeTenantUpdatePaymentDto)
 {
     return(Ok(_franchiseeTenantService.FranchiseeTenantUpdatePayment(franchiseeTenantUpdatePaymentDto)));
 }