Changeset 1db5673 for FarmatikoServices/Services/Service.cs
- Timestamp:
- 11/14/20 12:27:30 (4 years ago)
- Branches:
- master
- Children:
- 68454c6
- Parents:
- ad60966
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/Services/Service.cs
rad60966 r1db5673 44 44 public async Task<IEnumerable<Medicine>> GetMedicines() 45 45 { 46 var Medicines = await _repository.GetMedicines ();46 var Medicines = await _repository.GetMedicinesAsync(); 47 47 return Medicines; 48 48 } … … 126 126 else throw new Exception("Pharmacy is null"); 127 127 } 128 128 129 // Ovaa kontrola ja ima samo admin 129 130 public async Task AddPharmacyHead(PharmacyHead pharmacyHead) … … 131 132 if (pharmacyHead != null) 132 133 { 133 var Medicines = await _repository.GetMedicines ();134 var Medicines = await _repository.GetMedicinesAsync(); 134 135 foreach (var med in Medicines) 135 136 { 136 MedicineList medicine = new MedicineList() 137 { 138 Medicine = med, 139 HasMedicine = false 140 }; 141 pharmacyHead.MedicineLists.Add(medicine); 137 pharmacyHead.MedicineList.Add(med); 142 138 } 139 143 140 await _repository.AddPharmacyHead(pharmacyHead); 144 141 } 145 throw new Exception("PharmacyHead is null");142 else throw new Exception("PharmacyHead is null"); 146 143 } 147 144 //za json(Sys updater)
Note:
See TracChangeset
for help on using the changeset viewer.