From 16c1ae04a9721998a67975e72eaa17e508094264 Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 30 Dec 2025 12:44:55 +0330 Subject: [PATCH] remove some injections --- .../InstitutionContractApplication.cs | 13 +++---------- .../Controllers/institutionContractController.cs | 3 ++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CompanyManagment.Application/InstitutionContractApplication.cs b/CompanyManagment.Application/InstitutionContractApplication.cs index 82373502..fdd2e6a7 100644 --- a/CompanyManagment.Application/InstitutionContractApplication.cs +++ b/CompanyManagment.Application/InstitutionContractApplication.cs @@ -49,28 +49,23 @@ public class InstitutionContractApplication : IInstitutionContractApplication private readonly IFinancialStatmentApplication _financialStatmentApplication; private readonly IEmployerRepository _employerRepository; private readonly IWorkshopRepository _workshopRepository; - private readonly ILeftWorkRepository _leftWorkRepository; private readonly IWorkshopApplication _workshopApplication; - private readonly IContractingPartyTempRepository _contractingPartyTempRepository; private readonly IFinancialStatmentRepository _financialStatmentRepository; private readonly IContactInfoApplication _contactInfoApplication; private readonly IAccountApplication _accountApplication; private readonly ISmsService _smsService; - private readonly IUidService _uidService; private readonly IFinancialInvoiceRepository _financialInvoiceRepository; private readonly IPaymentGateway _paymentGateway; private readonly IPaymentTransactionRepository _paymentTransactionRepository; private readonly IRollCallServiceRepository _rollCallServiceRepository; - public InstitutionContractApplication(IInstitutionContractRepository institutionContractRepository, IPersonalContractingPartyRepository contractingPartyRepository, IRepresentativeRepository representativeRepository, IEmployerRepository employerRepository, - IWorkshopRepository workshopRepository, ILeftWorkRepository leftWorkRepository, + IWorkshopRepository workshopRepository, IFinancialStatmentApplication financialStatmentApplication, IWorkshopApplication workshopApplication, - IContractingPartyTempRepository contractingPartyTempRepository, IFinancialStatmentRepository financialStatmentRepository, IContactInfoApplication contactInfoApplication, - IAccountApplication accountApplication, ISmsService smsService, IUidService uidService, + IAccountApplication accountApplication, ISmsService smsService, IFinancialInvoiceRepository financialInvoiceRepository, IHttpClientFactory httpClientFactory, IPaymentTransactionRepository paymentTransactionRepository, IRollCallServiceRepository rollCallServiceRepository) { @@ -79,15 +74,12 @@ public class InstitutionContractApplication : IInstitutionContractApplication _representativeRepository = representativeRepository; _employerRepository = employerRepository; _workshopRepository = workshopRepository; - _leftWorkRepository = leftWorkRepository; _financialStatmentApplication = financialStatmentApplication; _workshopApplication = workshopApplication; - _contractingPartyTempRepository = contractingPartyTempRepository; _financialStatmentRepository = financialStatmentRepository; _contactInfoApplication = contactInfoApplication; _accountApplication = accountApplication; _smsService = smsService; - _uidService = uidService; _financialInvoiceRepository = financialInvoiceRepository; _paymentTransactionRepository = paymentTransactionRepository; _rollCallServiceRepository = rollCallServiceRepository; @@ -831,6 +823,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication { var res = _employerRepository.DeActiveAll(employer.Id); } + } return opration.Succcedded(); diff --git a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs index bbcf6af0..06bfab75 100644 --- a/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs +++ b/ServiceHost/Areas/Admin/Controllers/institutionContractController.cs @@ -235,7 +235,8 @@ public class institutionContractController : AdminBaseController if (balance == "0") { result = _institutionContractApplication.DeActive(id); - if (result.IsSuccedded) result = _institutionContractApplication.DeActiveAllConnections(id); + if (result.IsSuccedded) + result = _institutionContractApplication.DeActiveAllConnections(id); } else {