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

            MedicineDescriptionService.Create(new MedicineDescriptionDto(medicine, response, 1));
            return(Ok(response));
        }
Example #2
0
 public Boolean SendOrderGrpc(UrgentMedicineOrder order)
 {
     try
     {
         string response = new ClientScheduledService().SendMessage(CreateOrder(order)).Result;
         return(true);
     }
     catch (Exception e) { return(false); }
 }
Example #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));
        }
Example #4
0
 public GrpcController()
 {
     service = new ClientScheduledService();
 }
Example #5
0
 public UrgentProcurementController([FromServices] IMedicationsService medicationsService)
 {
     this._medicationsService = medicationsService;
     service = new ClientScheduledService();
 }