Ejemplo n.º 1
0
		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,
			};
		}
Ejemplo n.º 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;
				}
			}
		}
Ejemplo n.º 3
0
		public SenderApplicationExcelRow(ApplicationListItem application, string airWaybillDisplay)
		{
			_application = application;
			_airWaybillDisplay = airWaybillDisplay;
		}
Ejemplo n.º 4
0
	    public AdminApplicationExcelRow(ApplicationListItem application, string airWaybillDisplay)
		{
			_application = application;
			AirWaybillDisplay = airWaybillDisplay;
		}