Beispiel #1
0
        public async Task <bool> FinalizeRequestAsync(string id)
        {
            var finalizedRequest = ScheduleMaintenanceServices.FinalizeRequest(id);

            if (finalizedRequest != null)
            {
                return(await UpdateUserWithNewRequestStatusAsync(finalizedRequest));
            }

            return(false);
        }
Beispiel #2
0
        public async Task <string> AddRequestAsync()
        {
            var request = await Request.Content.ReadAsAsync <BookingRequest>();

            if (ScheduleMaintenanceServices.AddNewRequestPendingApproval(request))
            {
                return(request.Id);
            }
            else
            {
                return(string.Empty);
            }
        }
Beispiel #3
0
 public BookingRequest GetRequestWithId(string id)
 {
     return(ScheduleMaintenanceServices.GetRequestWithId(id));
 }
Beispiel #4
0
 public IEnumerable <BookingRequest> GetUserRequests(string userId)
 {
     return(ScheduleMaintenanceServices.GetRequestWithUserId(userId));
 }
Beispiel #5
0
 public IEnumerable <BookingRequest> GetAllDeliveredRequests()
 {
     return(ScheduleMaintenanceServices.GetAllDeliveredRequests());
 }
Beispiel #6
0
 public IEnumerable <BookingRequest> GetAllPendingApprovalRequests()
 {
     return(ScheduleMaintenanceServices.GetAllPendingApprovalRequests());
 }