コード例 #1
0
        private List <Summary> GetSummaryList(string groupName)
        {
            SummaryList = new List <Summary>();
            var spannerQuery = _flightSpannersData.GetSpannersByGroupName(groupName);

            foreach (var spanner in spannerQuery)
            {
                SummaryList.Add(new Summary {
                    SpannerCode         = spanner.SpannerCode,
                    SpannerName         = spanner.SpannerFName + " " + spanner.SpannerM1Name,
                    DeservedFlights     = _flightSpannersData.GetSpannerDeservedFlights(spanner.SpannerCode),
                    AllFlights          = _flightSpannersData.GetFlightsAll(spanner.SpannerCode),
                    SpannerLicenseNo    = spanner.SpannerLicenseNo,
                    ShortFlights        = _flightSpannersData.GetFlightsShort(spanner.SpannerCode),
                    LongFlights         = _flightSpannersData.GetFlightsLong(spanner.SpannerCode),
                    ExtraFlights        = _flightSpannersData.GetFlightsExtra(spanner.SpannerCode),
                    MultipleFlights     = _flightSpannersData.GetFlightsMultiple(spanner.SpannerCode),
                    ApologyFlights      = _flightSpannersData.GetFlightsApology(spanner.SpannerCode),
                    BonusFlights        = _flightSpannersData.GetFlightsBonus(spanner.SpannerCode),
                    HolidayFlights      = _flightSpannersData.GetFlightsHoliday(spanner.SpannerCode),
                    CurrentMonthFlights = _flightSpannersData.GetFlightsCurrentMonth(spanner.SpannerCode),
                    IsCurrentlyInActive = _flightSpannersData.IsCurrentlyInActive(spanner.SpannerCode),
                    Balance             = _flightSpannersData.GetSpannerBalance(spanner.SpannerCode)
                });
            }
            return(SummaryList);
        }
コード例 #2
0
        public void SetFlightSummaryDetailViewModelProperties(string spannerCode)
        {
            GroupName = _httpContext.HttpContext.User.FindFirst(ClaimTypes.GroupSid).Value;
            //string spannerCode = _httpContext.HttpContext.Request.Query["SpannerCode"];
            Spanner spanner = _flightSpannersData.GetSpannerByCode(spannerCode);

            SpannerCode         = spannerCode;
            SpannerName         = spanner.SpannerFName + " " + spanner.SpannerM1Name;
            DeservedFlights     = _flightSpannersData.GetSpannerDeservedFlights(spannerCode);
            AllFlights          = _flightSpannersData.GetFlightsAll(spannerCode);
            SpannerLicenseNo    = spanner.SpannerLicenseNo;
            ShortFlights        = _flightSpannersData.GetFlightsShort(spannerCode);
            LongFlights         = _flightSpannersData.GetFlightsLong(spannerCode);
            ExtraFlights        = _flightSpannersData.GetFlightsExtra(spannerCode);
            MultipleFlights     = _flightSpannersData.GetFlightsMultiple(spannerCode);
            ApologyFlights      = _flightSpannersData.GetFlightsApology(spannerCode);
            BonusFlights        = _flightSpannersData.GetFlightsBonus(spannerCode);
            HolidayFlights      = _flightSpannersData.GetFlightsHoliday(spannerCode);
            CurrentMonthFlights = _flightSpannersData.GetFlightsCurrentMonth(spannerCode);
            IsCurrentlyInActive = _flightSpannersData.IsCurrentlyInActive(spannerCode);
            Balance             = _flightSpannersData.GetSpannerBalance(spannerCode);
        }