Пример #1
0
 public PharmacyController(
     ILocationService locationService,
     IPharmacyService pharmacyService)
 {
     _locationService = locationService ?? throw new ArgumentNullException(nameof(locationService));
     _pharmacyService = pharmacyService ?? throw new ArgumentNullException(nameof(pharmacyService));
 }
        public PharmacyServiceTests()
        {
            sut = new Services.Services.PharmacyService(pharmacyRepositoryMock.Object);
            var pharmacies = PharmacyFactory.GetPharmacies();

            pharmacyRepositoryMock.Setup(x => x.GetAll()).Returns(pharmacies);
        }
 public UserProfilePageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
     isEdit           = false;
     Mode             = "Редактировать";
     Initial();
 }
Пример #4
0
 public SaleController(ISaleService saleService, IMapper mapper, IPharmacyService pharmacyService, IHttpClientFactory httpClientFactory)
 {
     _saleService       = saleService;
     _mapper            = mapper;
     _pharmacyService   = pharmacyService;
     _httpClientFactory = httpClientFactory;
 }
        private void OnConsumerReceived(object sender, BasicDeliverEventArgs e)
        {
            Byte[] body                  = null;
            string messageJson           = null;
            ActionBenefitMessage message = null;
            string exchangeName          = null;

            try
            {
                exchangeName = e.Exchange;
                body         = e.Body.ToArray();
                messageJson  = Encoding.UTF8.GetString(body);
                message      = JsonConvert.DeserializeObject <ActionBenefitMessage>(messageJson);
                HandleMessage(message, exchangeName);
                _channel.BasicAck(e.DeliveryTag, false);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                _channel.BasicReject(e.DeliveryTag, false);
                using (var scope = _service.CreateScope())
                {
                    IPharmacyService pharmacyService = scope.ServiceProvider.GetRequiredService <IPharmacyService>();
                    PharmacySystem   pharmacySystem  = pharmacyService.GetPharmacyByExchangeName(exchangeName);
                    if (pharmacySystem != null)
                    {
                        SendEmail(ex.Message, pharmacySystem.Email);
                    }
                }
            }
        }
 public PrescriptionController(IClinicianService clinicianService, UserManager <ApplicationUser> userManager, IProfileService profileService, IPrescriptionService prescriptionService, IEmailSender emailSender, IPharmacyService pharmacyService)
 {
     _clinicianService    = clinicianService;
     _userManager         = userManager;
     _profileService      = profileService;
     _prescriptionService = prescriptionService;
     _emailSender         = emailSender;
     _pharmacyService     = pharmacyService;
 }
        private void InitializeRabbitMqListener()
        {
            if (_channel == null)
            {
                return;
            }
            _channel.QueueDeclare(queue: _queueName,
                                  durable: true,
                                  exclusive: false,
                                  autoDelete: false,
                                  arguments: null);
            _channel.BasicConsume(queue: _queueName, autoAck: false, consumer: _consumer);
            using (var scope = _service.CreateScope())
            {
                IPharmacyService pharmacyService = scope.ServiceProvider.GetRequiredService <IPharmacyService>();

                foreach (PharmacySystem p in pharmacyService.GetPharmaciesBySubscribed(true))
                {
                    _channel.ExchangeDeclare(exchange: p.ActionsBenefitsExchangeName, type: ExchangeType.Fanout);
                    _channel.QueueBind(queue: _queueName, exchange: p.ActionsBenefitsExchangeName, routingKey: "");
                }
            }
        }
 public LoginPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
 }
 public RegisterPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
 }
Пример #10
0
 public PharmacyController(IPharmacyService pharmacyService, IMapper mapper)
 {
     _pharmacyService = pharmacyService;
     _mapper          = mapper;
 }
Пример #11
0
 public PharmacyServiceTests()
 {
     pharmacyService = new PharmacyService(pharmacyRepository);
 }
 public MedicineService(LekarnaDbContext data, IPharmacyService pharmacyService)
 {
     this.data            = data;
     this.pharmacyService = pharmacyService;
 }
Пример #13
0
 public RegisterPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
     Registration(user);
 }
Пример #14
0
 public PharmacyController(IPharmacyService service)
 {
     this._pharmacyService = service;
 }
Пример #15
0
 public ProcurementController(IUrgentMedicationProcurementService service, IMailService mailService, IPharmacyService pharmacyService)
 {
     _service         = service;
     _mailService     = mailService;
     _pharmacyService = pharmacyService;
 }
Пример #16
0
 public ProductPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
 }
Пример #17
0
 public PharmacyController(IPharmacyService pharmacyService)
 {
     this.pharmacyService = pharmacyService;
 }
Пример #18
0
 public PharmacyController(IApiValidationService validationService, IPharmacyService pharmacyService, ILogger <PharmacyController> logger)
 {
     _validationService = validationService;
     _pharmacyService   = pharmacyService;
     _logger            = logger;
 }
Пример #19
0
 public PharmacyController([FromServices] IPharmacyService pharmacyService)
 {
     this._pharmacyService = pharmacyService;
 }
Пример #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PharmacyController"/> class.
 /// </summary>
 /// <param name="svc">The injected pharmacy data service.</param>
 /// <param name="httpAccessor">The injected http context accessor provider.</param>
 public PharmacyController(IPharmacyService svc, IHttpContextAccessor httpAccessor)
 {
     this.service             = svc;
     this.httpContextAccessor = httpAccessor;
 }
Пример #21
0
 public ProductListPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
     Products         = new ObservableCollection <ProductPair>();
 }
Пример #22
0
 public PrescriptionController(IPrescriptionSearchService prescriptionSearchService, IMailService mailService, IPharmacyService pharmacyService)
 {
     this.prescriptionSearchService = prescriptionSearchService;
     this.mailService     = mailService;
     this.pharmacyService = pharmacyService;
 }
Пример #23
0
 public OrderController(IOrderService orderService, IMapper mapper, IPharmacyService pharmacyService)
 {
     _orderService    = orderService;
     _mapper          = mapper;
     _pharmacyService = pharmacyService;
 }
Пример #24
0
 public OrderPageModel(IPharmacyService pharmacyService)
 {
     _pharmacyService = pharmacyService;
     Init();
 }
 public PharmacySystemServiceController(IPharmacyService pharmacySystemService, IActionBenefitService actionBenefitService)
 {
     _pharmacySystemService = pharmacySystemService;
     _actionBenefitService  = actionBenefitService;
 }
 public MedicineController(IPharmacyService pharmacyService, IMedicineService medicineService)
 {
     this.pharmacyService = pharmacyService;
     this.medicineService = medicineService;
 }