Пример #1
0
 public CityEntity(City City, params object[] args) : base(City)
 {
     foreach (object arg in args)
     {
         if (arg is Country Country)
         {
             CountryEntity = new CountryEntity(Country);
         }
         if (arg is ICollection <ShipmentDetail> ShipmentDetails)
         {
             ShipmentDetailEntities = ShipmentDetails.Select(model => new ShipmentDetailEntity(model, model.Country, model.Customer)).ToList();
         }
     }
 }
Пример #2
0
 public CountryEntity(Country Country, params object[] args) : base(Country)
 {
     foreach (object arg in args)
     {
         if (arg is ICollection <City> Cities)
         {
             CityEntities = Cities.Select(model => new CityEntity(model)).ToList();
         }
         if (arg is ICollection <ShipmentDetail> ShipmentDetails)
         {
             ShipmentDetailEntities = ShipmentDetails.Select(model => new ShipmentDetailEntity(model, model.City, model.Customer)).ToList();
         }
         if (arg is ICollection <Tax> Taxes)
         {
             TaxEntities = Taxes.Select(model => new TaxEntity(model, model.Category)).ToList();
         }
     }
 }
Пример #3
0
 public CustomerEntity(Customer Customer, params object[] args) : base(Customer)
 {
     foreach (object arg in args)
     {
         if (arg is CustomerGroup CustomerGroup)
         {
             CustomerGroupEntity = new CustomerGroupEntity(CustomerGroup);
         }
         if (arg is ICollection <IssueNote> IssueNotes)
         {
             IssueNoteEntities = IssueNotes.Select(model => new IssueNoteEntity(model, model.Invoice, model.WareHouse)).ToList();
         }
         if (arg is ICollection <Order> Orders)
         {
             OrderEntities = Orders.Select(model => new OrderEntity(model, model.ShipmentDetail)).ToList();
         }
         if (arg is ICollection <ShipmentDetail> ShipmentDetails)
         {
             ShipmentDetailEntities = ShipmentDetails.Select(model => new ShipmentDetailEntity(model, model.City, model.Country)).ToList();
         }
     }
 }