Changeset d23bf72 for FarmatikoServices/Services/Service.cs
- Timestamp:
- 11/05/20 06:57:35 (3 years ago)
- Branches:
- master
- Children:
- afc9a9a
- Parents:
- 1f4846d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/Services/Service.cs
r1f4846d rd23bf72 103 103 if (healthFacilities != null) 104 104 await _repository.AddFacility(healthFacilities); 105 throw new Exception("Facility is null");105 else throw new Exception("Facility is null"); 106 106 } 107 107 //za json(Sys updateer) … … 110 110 if (medicine != null) 111 111 await _repository.AddMedicines(medicine); 112 throw new Exception("Medicine is null");112 else throw new Exception("Medicine is null"); 113 113 } 114 114 //za json(Sys updateer) … … 117 117 if (pandemic != null) 118 118 await _repository.AddPandemic(pandemic); 119 throw new Exception("Pandemic is null");119 else throw new Exception("Pandemic is null"); 120 120 } 121 121 // Samo PharmacyHead i Admin imaat pristap … … 124 124 if (pharmacy != null) 125 125 await _repository.AddPharmacy(pharmacy); 126 throw new Exception("Pharmacy is null");126 else throw new Exception("Pharmacy is null"); 127 127 } 128 128 // Ovaa kontrola ja ima samo admin … … 150 150 if (worker != null) 151 151 await _repository.AddWorker(worker); 152 throw new Exception("Worker is null");152 else throw new Exception("Worker is null"); 153 153 } 154 154 … … 158 158 if (healthFacilities != null) 159 159 await _repository.UpdateFacility(healthFacilities); 160 throw new Exception("Facility is null");160 else throw new Exception("Facility is null"); 161 161 } 162 162 //PharmacyHead … … 165 165 if (medicine != null) 166 166 await _repository.RemoveMedicine(medicine); 167 throw new Exception("Medicine is null");167 else throw new Exception("Medicine is null"); 168 168 } 169 169 //PharmacyHead … … 172 172 if (medicine != null) 173 173 await _repository.UpdateMedicine(medicine); 174 throw new Exception("Medicine is null");174 else throw new Exception("Medicine is null"); 175 175 } 176 176 //za json(Sys updateer) … … 179 179 if (pandemic != null) 180 180 await _repository.UpdatePandemic(pandemic); 181 throw new Exception("Pandemic is null");181 else throw new Exception("Pandemic is null"); 182 182 } 183 183 //PharmacyHead … … 186 186 if (pharmacy != null) 187 187 await _repository.RemovePharmacy(pharmacy); 188 throw new Exception("Pharmacy is null");188 else throw new Exception("Pharmacy is null"); 189 189 } 190 190 //PharamcyHead … … 193 193 if (pharmacy != null) 194 194 await _repository.UpadatePharmacy(pharmacy); 195 throw new Exception("Pharmacy is null");195 else throw new Exception("Pharmacy is null"); 196 196 } 197 197 //za json(Sys updateer) … … 200 200 if (worker != null) 201 201 await _repository.UpdateWorker(worker); 202 throw new Exception("Worker is null");202 else throw new Exception("Worker is null"); 203 203 } 204 204 … … 209 209 await _repository.RemovePharmacyHead(Id); 210 210 } 211 throw new Exception("Index out of bounds.");212 } 213 214 public async Task<HealthFacility>GetFacilityJSON(string healthFacility)211 else throw new Exception("Index out of bounds."); 212 } 213 214 public HealthFacility GetFacilityJSON(string healthFacility) 215 215 { 216 216 if (healthFacility != null) 217 return await_repository.GetFacilityJSON(healthFacility);217 return _repository.GetFacilityJSON(healthFacility); 218 218 return null; 219 219 }
Note:
See TracChangeset
for help on using the changeset viewer.