public async Task <IActionResult> Put([FromBody] MedicineQuantityInfo medicine)
        {
            var result = await this._dataManager.OperateAsync <int, object>("GetPharmacyMedicine", medicine.Id);

            if (result is null)
            {
                return(new NotFoundResult());
            }

            //getting result
            var updated = await this._dataManager.OperateAsync <MedicineQuantityInfo, object>("UpdateQuantity", medicine);

            //returning 200
            return(Ok());
        }
Пример #2
0
        public async Task <bool> UpdateMedicineQuantityAsync(MedicineQuantityInfo quantity)
        {
            var response = await this.UpdateAsync <MedicineQuantityInfo>("api/pharmmeds/quantity", quantity);

            return(response.IsSuccessStatusCode);
        }