예제 #1
0
        private IActionResult GetMedicineDescriptionFromIsaGrpc(string medicine)
        {
            string response = new ClientScheduledService().SendMessage(medicine).Result;

            MedicineDescriptionService.Create(new MedicineDescriptionDto(medicine, response, 1));
            return(Ok(response));
        }
예제 #2
0
 public Boolean SendOrderGrpc(UrgentMedicineOrder order)
 {
     try
     {
         string response = new ClientScheduledService().SendMessage(CreateOrder(order)).Result;
         return(true);
     }
     catch (Exception e) { return(false); }
 }
예제 #3
0
        public IActionResult GetMedicineDescriptionGrpc(string medicine)
        {
            String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine);

            if (medicineDescription.Equals(""))
            {
                return(GetMedicineDescriptionFromIsa(medicine));
            }
            string response = new ClientScheduledService().SendMessage(medicine).Result;

            MedicineDescriptionService.Create(new MedicineDescriptionDto(medicine, response, 1));
            return(Ok(response));
        }
예제 #4
0
 public GrpcController()
 {
     service = new ClientScheduledService();
 }
예제 #5
0
 public UrgentProcurementController([FromServices] IMedicationsService medicationsService)
 {
     this._medicationsService = medicationsService;
     service = new ClientScheduledService();
 }