Esempio n. 1
0
        private void ShowSpecificCourierRatings()
        {
            _ioHelper.PrintCouriers();

            int userChoice = _ioHelper.GetIntFromUser("Select courier id");

            var packingListsInfos = _packingListService.GetCourierPackingListInfos(userChoice);

            int i = 1;

            foreach (var packingListInfo in packingListsInfos)
            {
                Console.WriteLine("\n" + $"{i}. {packingListInfo.FileName} Courier rating: {packingListInfo.CourierRating}");
                i++;
            }
        }
Esempio n. 2
0
        public void ShowCourierRating(int loggedCourierId)
        {
            float courierRating = _packingListService.CalculateTotalCourierRating(loggedCourierId);

            if (courierRating == 0)
            {
                Console.WriteLine("There has been a connection issue or you have no packing lists to calculate average from");
                return;
            }

            Console.WriteLine($"Your average courier rating is: {courierRating}");

            var packingListInfos = _packingListService.GetCourierPackingListInfos(loggedCourierId);

            int i = 1;

            foreach (var packingListInfo in packingListInfos)
            {
                Console.WriteLine($"{i}. {packingListInfo.FileName}, Rating: {packingListInfo.CourierRating}");
                i++;
            }
        }
Esempio n. 3
0
        public List <PackingListInfo> GetPackingListInfos(int id)
        {
            var packingListInfos = _packingListService.GetCourierPackingListInfos(id);

            return(packingListInfos);
        }