Last change
on this file since 1454207 was 1454207, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago |
Change structure, Add repo, services & controllers
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | using FarmatikoData.FarmatikoRepoInterfaces;
|
---|
2 | using FarmatikoData.Models;
|
---|
3 | using FarmatikoServices.FarmatikoServiceInterfaces;
|
---|
4 | using System;
|
---|
5 | using System.Collections.Generic;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Threading.Tasks;
|
---|
9 |
|
---|
10 | namespace FarmatikoServices.Services
|
---|
11 | {
|
---|
12 | public class AdminService : IAdminService
|
---|
13 | {
|
---|
14 | private readonly IAdminRepo _adminRepo;
|
---|
15 | public AdminService(IAdminRepo adminRepo)
|
---|
16 | {
|
---|
17 | _adminRepo = adminRepo;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public async Task<IQueryable<RequestPharmacyHead>> GetCalimingRequests()
|
---|
21 | {
|
---|
22 | var req = await Task.Run(() => _adminRepo.GetClaimingRequests());
|
---|
23 | return req;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public async Task<IQueryable<PharmacyHead>> GetPharmacyHeads()
|
---|
27 | {
|
---|
28 | var PHeads = await Task.Run(() => _adminRepo.GetPharmacyHeads());
|
---|
29 | return PHeads;
|
---|
30 | }
|
---|
31 |
|
---|
32 | public async Task RejectRequest(RequestPharmacyHead req)
|
---|
33 | {
|
---|
34 | await _adminRepo.RemoveClaimRequest(req);
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.