private ApplicationListCollection GetGroupedResult(
			IEnumerable<Order> groups, ApplicationListItem[] applications,
			long total, long? clientId = null, long? senderId = null, long? forwarderId = null, long? carrierId = null)
		{
			var orderTypes = groups.Select(x => x.OrderType).ToArray();

			var applicationGroups = _grouper.Group(applications, orderTypes, clientId, senderId, forwarderId, carrierId);

			OrderBottomGroupByClient(applicationGroups);

			return new ApplicationListCollection
			{
				Total = total,
				Groups = applicationGroups,
			};
		}
Exemple #2
0
		public void UpdateDeliveryData(ApplicationListItem[] applicationItems, string language)
		{
			var clientTransitIds = _clients.GetAll()
				.ToDictionary(x => x.TransitId, x => x.ClientId);

			var transits = _transits.Get(clientTransitIds.Select(x => x.Key).ToArray())
				.ToDictionary(x => clientTransitIds[x.Id], x => x);

			var cities = _cities.All(language).ToDictionary(x => x.Id, x => x.Name);

			foreach(var item in applicationItems)
			{
				if(item.IsPickup)
				{
					var transit = transits[item.ClientId];

					item.TransitCity = cities[transit.CityId];
					item.CarrierContact = transit.RecipientName;
					item.CarrierAddress = transit.Address;
					item.CarrierPhone = transit.Phone;
				}
			}
		}
		public SenderApplicationExcelRow(ApplicationListItem application, string airWaybillDisplay)
		{
			_application = application;
			_airWaybillDisplay = airWaybillDisplay;
		}
	    public AdminApplicationExcelRow(ApplicationListItem application, string airWaybillDisplay)
		{
			_application = application;
			AirWaybillDisplay = airWaybillDisplay;
		}