public void TestInitialize()
 {
     _orderer = new ApplicationRepositoryOrderer();
 }
Beispiel #2
0
		public ApplicationRepository(IDbConnection connection)
		{
			_context = new AlicargoDataContext(connection);

			_orderer = new ApplicationRepositoryOrderer();

			_selector = x => new ApplicationData
			{
				AddressLoad = x.AddressLoad,
				Id = x.Id,
				FactoryName = x.FactoryName,
				Invoice = x.Invoice,
				MarkName = x.MarkName,
				Volume = x.Volume,
				Count = x.Count,
				AirWaybill = x.AirWaybill.Bill,
				Characteristic = x.Characteristic,
				ClientLegalEntity = x.Client.LegalEntity,
				ClientId = x.ClientId,
				ClientNic = x.Client.Nic,
				CountryId = x.CountryId,
				Class = (ClassType?)x.ClassId,
				CreationTimestamp = x.CreationTimestamp,
				DateInStock = x.DateInStock,
				DateOfCargoReceipt = x.DateOfCargoReceipt,
				FactoryContact = x.FactoryContact,
				FactoryEmail = x.FactoryEmail,
				FactoryPhone = x.FactoryPhone,
				StateChangeTimestamp = x.StateChangeTimestamp,
				StateId = x.StateId,
				TermsOfDelivery = x.TermsOfDelivery,
				TransitId = x.TransitId,
				TransitAddress = x.Transit.Address,
				CarrierName = x.Transit.Carrier.Name,
				CarrierContact = x.Transit.Carrier.Contact,
				CarrierAddress = x.Transit.Carrier.Address,
				CarrierPhone = x.Transit.Carrier.Phone,
				CarrierEmail = x.Transit.Carrier.Email,
				CarrierId = x.Transit.CarrierId,
				TransitCityId = x.Transit.CityId,
				TransitDeliveryType = (DeliveryType)x.Transit.DeliveryTypeId,
				TransitMethodOfTransit = (MethodOfTransit)x.Transit.MethodOfTransitId,
				TransitPhone = x.Transit.Phone,
				TransitRecipientName = x.Transit.RecipientName,
				TransitReference = x.TransitReference,
				TransitWarehouseWorkingTime = x.Transit.WarehouseWorkingTime,
				WarehouseWorkingTime = x.WarehouseWorkingTime,
				Weight = x.Weight,
				MethodOfDelivery = (MethodOfDelivery)x.MethodOfDeliveryId,
				IsPickup =  x.IsPickup,
				Value = x.Value,
				CurrencyId = (CurrencyType)x.CurrencyId,
				AirWaybillId = x.AirWaybillId,
				SenderId = x.SenderId,
				SenderContact = x.Sender.Contact,
				SenderPhone = x.Sender.Phone,
				SenderAddress = x.Sender.Address,
				SenderEmail = x.Sender.Email,
				AirWaybillDateOfArrival = x.AirWaybill.DateOfArrival,
				AirWaybillDateOfDeparture = x.AirWaybill.DateOfDeparture,
				AirWaybillGTD = x.AirWaybill.GTD,
				ClientEmails = x.Client.Emails,
				ClientUserId = x.Client.UserId,
				TariffPerKg = x.TariffPerKg,
				SenderRate = x.SenderRate,
				SenderName = x.Sender.Name,
				FactureCost = x.FactureCost,
				FactureCostEx = x.FactureCostEx,
				SenderScotchCost = x.Sender.TariffOfTapePerBox * x.Count,
				TransitCost = x.TransitCost,
				PickupCost = x.PickupCost,
				ForwarderName = x.Forwarder.Name,
				ForwarderId = x.ForwarderId,
				InsuranceRate = x.InsuranceRate,
				CalculationProfit = x.CalculationProfit,
				CalculationTotalTariffCost = x.CalculationTotalTariffCost,
				DisplayNumber = x.DisplayNumber,
				FactureCostEdited = x.FactureCostEdited,
				FactureCostExEdited = x.FactureCostExEdited,
				PickupCostEdited = x.PickupCostEdited,
				ScotchCostEdited = x.ScotchCostEdited,
				TransitCostEdited = x.TransitCostEdited,
				CountInInvoce = x.CountInInvoce,
				DocumentWeight = x.DocumentWeight,
				MRN = x.MRN,
                Comments = x.Comments
			};
		}
		public void TestInitialize()
		{
			_orderer = new ApplicationRepositoryOrderer();
		}
Beispiel #4
0
        public ApplicationRepository(IDbConnection connection)
        {
            _context = new TrackerDataContext(connection);

            _orderer = new ApplicationRepositoryOrderer();

            _selector = x => new ApplicationData
            {
                AddressLoad                 = x.AddressLoad,
                Id                          = x.Id,
                FactoryName                 = x.FactoryName,
                Invoice                     = x.Invoice,
                MarkName                    = x.MarkName,
                Volume                      = x.Volume,
                Count                       = x.Count,
                AirWaybill                  = x.AirWaybill.Bill,
                Characteristic              = x.Characteristic,
                ClientLegalEntity           = x.Client.LegalEntity,
                ClientId                    = x.ClientId,
                ClientNic                   = x.Client.Nic,
                CountryId                   = x.CountryId,
                Class                       = (ClassType?)x.ClassId,
                CreationTimestamp           = x.CreationTimestamp,
                DateInStock                 = x.DateInStock,
                DateOfCargoReceipt          = x.DateOfCargoReceipt,
                FactoryContact              = x.FactoryContact,
                FactoryEmail                = x.FactoryEmail,
                FactoryPhone                = x.FactoryPhone,
                StateChangeTimestamp        = x.StateChangeTimestamp,
                StateId                     = x.StateId,
                TermsOfDelivery             = x.TermsOfDelivery,
                TransitId                   = x.TransitId,
                TransitAddress              = x.Transit.Address,
                CarrierName                 = x.Transit.Carrier.Name,
                CarrierContact              = x.Transit.Carrier.Contact,
                CarrierAddress              = x.Transit.Carrier.Address,
                CarrierPhone                = x.Transit.Carrier.Phone,
                CarrierEmail                = x.Transit.Carrier.Email,
                CarrierId                   = x.Transit.CarrierId,
                TransitCityId               = x.Transit.CityId,
                TransitDeliveryType         = (DeliveryType)x.Transit.DeliveryTypeId,
                TransitMethodOfTransit      = (MethodOfTransit)x.Transit.MethodOfTransitId,
                TransitPhone                = x.Transit.Phone,
                TransitRecipientName        = x.Transit.RecipientName,
                TransitReference            = x.TransitReference,
                TransitWarehouseWorkingTime = x.Transit.WarehouseWorkingTime,
                WarehouseWorkingTime        = x.WarehouseWorkingTime,
                Weight                      = x.Weight,
                MethodOfDelivery            = (MethodOfDelivery)x.MethodOfDeliveryId,
                IsPickup                    = x.IsPickup,
                Value                       = x.Value,
                CurrencyId                  = (CurrencyType)x.CurrencyId,
                AirWaybillId                = x.AirWaybillId,
                SenderId                    = x.SenderId,
                SenderContact               = x.Sender.Contact,
                SenderPhone                 = x.Sender.Phone,
                SenderAddress               = x.Sender.Address,
                SenderEmail                 = x.Sender.Email,
                AirWaybillDateOfArrival     = x.AirWaybill.DateOfArrival,
                AirWaybillDateOfDeparture   = x.AirWaybill.DateOfDeparture,
                AirWaybillGTD               = x.AirWaybill.GTD,
                ClientEmails                = x.Client.Emails,
                ClientUserId                = x.Client.UserId,
                TariffPerKg                 = x.TariffPerKg,
                SenderRate                  = x.SenderRate,
                SenderName                  = x.Sender.Name,
                FactureCost                 = x.FactureCost,
                FactureCostEx               = x.FactureCostEx,
                SenderScotchCost            = x.Sender.TariffOfTapePerBox * x.Count,
                TransitCost                 = x.TransitCost,
                PickupCost                  = x.PickupCost,
                ForwarderName               = x.Forwarder.Name,
                ForwarderId                 = x.ForwarderId,
                InsuranceRate               = x.InsuranceRate,
                CalculationProfit           = x.CalculationProfit,
                CalculationTotalTariffCost  = x.CalculationTotalTariffCost,
                DisplayNumber               = x.DisplayNumber,
                FactureCostEdited           = x.FactureCostEdited,
                FactureCostExEdited         = x.FactureCostExEdited,
                PickupCostEdited            = x.PickupCostEdited,
                ScotchCostEdited            = x.ScotchCostEdited,
                TransitCostEdited           = x.TransitCostEdited,
                CountInInvoce               = x.CountInInvoce,
                DocumentWeight              = x.DocumentWeight,
                MRN                         = x.MRN,
                Comments                    = x.Comments
            };
        }