public List <Delivery> GetDashboardDeliveries()
        {
            List <Delivery> deliveryList = new List <Delivery>();

            try
            {
                deliveryRepository.GetDashboardDeliveries(userService.GetLoggdInUser().CompanyId).OrderByDescending(d => d.DeliveryId).Take(3).ToList().ForEach(f =>
                {
                    var deliveryData = MapperConfig.Mapper.Map <Delivery>(f);
                    if (deliveryData.DeliveryStatus > 0)
                    {
                        deliveryData.DeliveryStatusDesc = ResourceService.Resource.GetCaption(((DeliveryStatus)deliveryData.DeliveryStatus).ToString());
                    }
                    if (deliveryData.RouteId != null)
                    {
                        deliveryData.RouteName = masterRepository.GetRoute(deliveryData.RouteId.Value).RouteName;
                    }
                });
            }
            catch (Exception ex)
            {
                logger.LogError(ex, ex.Message);
            }

            return(deliveryList);
        }