Changeset 8e74e2f for FarmatikoServices/Services/Service.cs
- Timestamp:
- 11/16/20 03:55:10 (4 years ago)
- Branches:
- master
- Children:
- db484c9
- Parents:
- 8b13eb2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/Services/Service.cs
r8b13eb2 r8e74e2f 128 128 129 129 // Ovaa kontrola ja ima samo admin 130 public User MakeUser(PharmacyHead head) 131 { 132 var users = _repository.GetUsers(); 133 134 User user = new User() 135 { 136 Name = head.Name, 137 Password = head.Password, 138 Email = head.Email, 139 UserRole = User.Role.PharmacyHead 140 }; 141 return user; 142 } 130 143 public async Task AddPharmacyHead(PharmacyHead pharmacyHead) 131 144 { 132 145 if (pharmacyHead != null) 133 146 { 134 /*var Medicines = await _repository.GetMedicinesAsync(); 135 foreach (var med in Medicines) 136 { 137 pharmacyHead.MedicineList.Add(med); 138 }*/ 139 147 var user = MakeUser(pharmacyHead); 148 await _repository.AddUser(user); 140 149 await _repository.AddPharmacyHead(pharmacyHead); 141 150 }
Note:
See TracChangeset
for help on using the changeset viewer.