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()); }
public async Task <bool> UpdateMedicineQuantityAsync(MedicineQuantityInfo quantity) { var response = await this.UpdateAsync <MedicineQuantityInfo>("api/pharmmeds/quantity", quantity); return(response.IsSuccessStatusCode); }