private List <Record> GetRecordList(string groupName)
        {
            RecordList = new List <Record>();
            var            flightRecordQuery = _flightSpannersData.GetFlightRecordByGroupName(groupName);
            Approval       approval;
            FlightData     flightData;
            AircraftType   aircraftType;
            ApprovalDetail approvalDetail;
            Spanner        spanner;
            bool           ApprovalNotNull = false;

            foreach (var flightRecord in flightRecordQuery)
            {
                flightData      = _flightSpannersData.GetFlightDataByFlightDataId(flightRecord.FlightDataId);
                aircraftType    = _flightSpannersData.GetAircraftTypeByAircraftTypeId(flightRecord.AircraftTypeId);
                ApprovalNotNull = flightRecord.ApprovalId.HasValue;
                if (ApprovalNotNull)
                {
                    approval       = _flightSpannersData.GetApprovalByApprovalId(flightRecord.ApprovalId.Value);
                    approvalDetail = _flightSpannersData.GetApprovalDetailByApprovalDetailId(approval.ApprovalDetailId);
                    spanner        = _flightSpannersData.GetSpannerByCode(approval.SpannerCode);

                    RecordList.Add(new Record
                    {
                        RecordId             = flightRecord.FlightRecordId,
                        RecordDate           = flightRecord.RecordDate,
                        RecordTime           = flightRecord.RecordTime,
                        FlightDate           = flightRecord.FlightDate,
                        FlightTime           = flightRecord.FlightTime,
                        IsRecordSetteled     = flightRecord.IsRecordSettled,
                        IsRecordAutoSelected = flightRecord.IsRecordAutoSelected,
                        AirportOrigin        = flightData.AirportOrigin,
                        AirportDestination   = flightData.AirportDestination,
                        DefaultSectorTime    = flightData.DefaultSectorTime,
                        FlightDataConstant   = flightData.FlightDataConstant,
                        IsFlightLocal        = flightData.IsFlightLocal,
                        IsFlightCargo        = flightData.IsFlightCargo,
                        FlightBonusCard      = flightData.FlightBonusCard,
                        AircraftModel        = aircraftType.AircraftModel,
                        EngineModel          = aircraftType.EngineModel,
                        AircraftTypeConstant = aircraftType.AircraftTypeConstant,
                        //SpannerCode = ApprovalNotNull ? spanner.SpannerCode : null,
                        SpannerCode         = spanner.SpannerCode,
                        SpannerName         = spanner.SpannerFName + " " + spanner.SpannerM1Name,
                        ApprovalRating      = approvalDetail.ApprovalRating,
                        ApprovalCategory    = approvalDetail.ApprovalCategory,
                        ApprovalConstant    = approvalDetail.ApprovalConstant,
                        GroupName           = groupName,
                        FlightCompanyName   = flightRecord.FlightCompanyName,
                        OriginTypeName      = flightRecord.OriginTypeName,
                        EligibilityTypeName = flightRecord.EligibilityTypeName,
                        DestinationTypeName = flightRecord.DestinationTypeName
                    });
                }
                else
                {
                    RecordList.Add(new Record
                    {
                        RecordId             = flightRecord.FlightRecordId,
                        RecordDate           = flightRecord.RecordDate,
                        RecordTime           = flightRecord.RecordTime,
                        FlightDate           = flightRecord.FlightDate,
                        FlightTime           = flightRecord.FlightTime,
                        IsRecordSetteled     = flightRecord.IsRecordSettled,
                        IsRecordAutoSelected = flightRecord.IsRecordAutoSelected,
                        AirportOrigin        = flightData.AirportOrigin,
                        AirportDestination   = flightData.AirportDestination,
                        DefaultSectorTime    = flightData.DefaultSectorTime,
                        FlightDataConstant   = flightData.FlightDataConstant,
                        IsFlightLocal        = flightData.IsFlightLocal,
                        IsFlightCargo        = flightData.IsFlightCargo,
                        FlightBonusCard      = flightData.FlightBonusCard,
                        AircraftModel        = aircraftType.AircraftModel,
                        EngineModel          = aircraftType.EngineModel,
                        AircraftTypeConstant = aircraftType.AircraftTypeConstant,
                        GroupName            = groupName,
                        FlightCompanyName    = flightRecord.FlightCompanyName,
                        OriginTypeName       = flightRecord.OriginTypeName,
                        EligibilityTypeName  = flightRecord.EligibilityTypeName,
                        DestinationTypeName  = flightRecord.DestinationTypeName
                    });
                }
            }
            return(RecordList);
        }