Changeset 6f203af for FarmatikoServices/Services/AdminService.cs
- Timestamp:
- 10/28/20 22:06:48 (3 years ago)
- Branches:
- master
- Children:
- 993189e
- Parents:
- 1454207
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/Services/AdminService.cs
r1454207 r6f203af 5 5 using System.Collections.Generic; 6 6 using System.Linq; 7 using System.Text;8 7 using System.Threading.Tasks; 9 8 … … 18 17 } 19 18 20 public async Task<I Queryable<RequestPharmacyHead>> GetCalimingRequests()19 public async Task<IEnumerable<RequestPharmacyHead>> GetClaimingRequests() 21 20 { 22 var req = await Task.Run(() => _adminRepo.GetClaimingRequests()); 23 return req; 21 var req = await _adminRepo.GetClaimingRequests(); 22 if (req != null) 23 return req; 24 throw new Exception("No data is found."); 24 25 } 25 26 26 public async Task<I Queryable<PharmacyHead>> GetPharmacyHeads()27 public async Task<IEnumerable<PharmacyHead>> GetPharmacyHeads() 27 28 { 28 var PHeads = await Task.Run(() => _adminRepo.GetPharmacyHeads()); 29 return PHeads; 29 var PHeads = await _adminRepo.GetPharmacyHeads(); 30 var list = PHeads.Select(x => x.DeletedOn == null); 31 if (list != null) 32 { 33 return PHeads; 34 } 35 throw new Exception("No data is found."); 30 36 } 31 37 32 public async TaskRejectRequest(RequestPharmacyHead req)38 public bool RejectRequest(RequestPharmacyHead req) 33 39 { 34 await _adminRepo.RemoveClaimRequest(req); 40 if (req != null) 41 { 42 _adminRepo.RemoveClaimRequest(req); 43 return true; 44 } 45 return false; 35 46 } 36 47 }
Note:
See TracChangeset
for help on using the changeset viewer.