Exemplo n.º 1
0
        private async Task RemoveEndingServices()
        {
            InProgress = true;
            try
            {
                using (var scope = _serviceScopeFactory.CreateScope())
                {
                    IBaseRepository <Servicio> _servicioRepository = scope.ServiceProvider.GetRequiredService <IBaseRepository <Servicio> >();
                    var servicios = await _servicioRepository.ListBy(s => s.Active == true &&
                                                                     s.FechaFin <= DateTime.Now);

                    IServicioService _servicioService = scope.ServiceProvider.GetRequiredService <IServicioService>();
                    foreach (var servicio in servicios)
                    {
                        await _servicioService.RemoveAsEnding(servicio.Id);
                    }
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                InProgress = false;
            }
        }
Exemplo n.º 2
0
 public SeguimientoService(IEntityBaseRepository <Seguimiento> SeguimientoRepositorio, IUnitOfWork unitOfWork,
                           IEstadoService estadoService, IServicioService servicioServiceExt)
 {
     _SeguimientoRepositorio = SeguimientoRepositorio;
     _estadoService          = estadoService;
     _servicioServiceExt     = servicioServiceExt;
     _unitOfWork             = unitOfWork;
 }
Exemplo n.º 3
0
 public ServiciosController(IServicioService servicioService)
 {
     this._ServicioService = servicioService;
 }
Exemplo n.º 4
0
 public SeguimientosController(ICommonInterface <Seguimiento> seguimientoService, ISeguimientoService seguimientoServiceExtend, IServicioService servicioServiceExt)
 {
     _seguimientoService       = seguimientoService;
     _seguimientoServiceExtend = seguimientoServiceExtend;
     _servicioServiceExt       = servicioServiceExt;
 }
Exemplo n.º 5
0
 public ServicioController(IServicioService servicioService)
 {
     _servicioService = servicioService;
 }
Exemplo n.º 6
0
 public SuppliersController(ISupplierService supplierService, IServicioService servicioService)
 {
     this.supplierService = supplierService;
     this.servicioService = servicioService;
 }
Exemplo n.º 7
0
 public ServicioController(ICommonInterface<Servicio> servicioService, ICommonInterface<Seguimiento> seguimientoService, IServicioService servicioServiceExt)
 {
     _servicioService = servicioService;
     _servicioServiceExt = servicioServiceExt;
     _seguimientoService = seguimientoService;
 }
 public ServicioController(IServicioService servicioService, IMapper mapper)
 {
     this._servicioService = servicioService;
     this._mapper          = mapper;
 }
 public ServiciosController(IServicioService _servicioService)
 {
     this.servicioService = _servicioService;
 }
 public ServiciosController(IServicioService servicioService, IMotivoBajaServicioService motivoBajaServicioService)
 {
     _servicioService           = servicioService;
     _motivoBajaServicioService = motivoBajaServicioService;
 }
Exemplo n.º 11
0
 public ServiciosController(IServicioService servicioService, IMapper mapper)
 {
     _servicioService = servicioService;
     _mapper          = mapper;
 }