Esempio n. 1
0
        public async Task <bool> AlreadySent(int positionAssignid, string direction, string destination, DateTime startDate, DateTime endDate, string typeOfFlight)
        {
            var fligtRequestHistory = await _flightRequestHistoryRepo.GetGroupedFlightRequestHistory();

            return(fligtRequestHistory.Any(frh =>
                                           frh.PositionAssignId == positionAssignid && frh.Direction == direction &&
                                           frh.Destination == destination &&
                                           frh.StartDate.Date == startDate.Date &&
                                           frh.EndDate.Date == endDate.Date &&
                                           frh.TypeOfFlight == typeOfFlight));
        }
        public async Task <IActionResult> GetFlightRequestHistory()
        {
            var flightRequestHistory = await _flightRequestHistoryRepo.GetGroupedFlightRequestHistory();

            return(Ok(flightRequestHistory));
        }