Exemple #1
0
 public async Task DeleteCreditCardCompanyUnit(IdInput<long> input)
 {
     DeleteAddressUnitInput dto = new DeleteAddressUnitInput
     {
         TypeofObjectId = TypeofObject.BankAccountUnit,
         ObjectId = input.Id
     };
    // await _addressAppService.DeleteAddressUnit(dto);
     await _bankAccountUnitManager.DeleteAsync(input);
 }
Exemple #2
0
        public async Task DeleteCustomerUnit(IdInput input)
        {
            DeleteAddressUnitInput dto = new DeleteAddressUnitInput
            {
                TypeofObjectId = TypeofObject.CustomerUnit,
                ObjectId       = input.Id
            };
            await _addressUnitAppService.DeleteAddressUnitByEntity(dto);

            await _customerUnitManager.DeleteAsync(input.Id);
        }
Exemple #3
0
        public async Task DeleteEmployeeUnit(IdInput input)
        {
            await _employeeUnitManager.DeleteAsync(input.Id);

            DeleteAddressUnitInput dto = new DeleteAddressUnitInput
            {
                TypeofObjectId = TypeofObject.EmployeeUnit,
                ObjectId       = input.Id
            };
            await _addressAppService.DeleteAddressUnitByEntity(dto);
        }
Exemple #4
0
        public async Task DeleteVendorUnit(IdInput input)
        {
            DeleteAddressUnitInput dto = new DeleteAddressUnitInput
            {
                TypeofObjectId = TypeofObject.VendorUnit,
                ObjectId       = input.Id
            };
            await _addressAppService.DeleteAddressUnitByEntity(dto);

            await _vendorAliasUnitManager.DeleteAsync(Convert.ToInt32(dto.ObjectId));

            await _vendorUnitManager.DeleteAsync(input.Id);
        }
Exemple #5
0
        public async Task DeleteBankAccountUnit(IdInput <long> input)
        {
            await _bankAccountPaymentRangeRepository.DeleteAsync(p => p.BankAccountId == input.Id);

            DeleteAddressUnitInput dto = new DeleteAddressUnitInput
            {
                TypeofObjectId = TypeofObject.BankAccountUnit,
                ObjectId       = input.Id
            };
            await _addressAppService.DeleteAddressUnitByEntity(dto);

            await _bankAccountUnitManager.DeleteAsync(input);
        }
Exemple #6
0
 /// <summary>
 /// Deleting the addresses by ObjectId and TypeofObject
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public async Task DeleteAddressUnitByEntity(DeleteAddressUnitInput input)
 {
     await _addressUnitRepository.DeleteAsync(p => p.TypeofObjectId == input.TypeofObjectId && p.ObjectId == input.ObjectId);
 }