Esempio n. 1
0
 public InvoiceEntity(Invoice Invoice, params object[] args) : base(Invoice)
 {
     foreach (object arg in args)
     {
         if (arg is Order Order)
         {
             OrderEntity = new OrderEntity(Order);
         }
         if (arg is ICollection <InvoiceLine> InvoiceLines)
         {
             InvoiceLineEntities = InvoiceLines.Select(model => new InvoiceLineEntity(model)).ToList();
         }
         if (arg is ICollection <IssueNote> IssueNotes)
         {
             IssueNoteEntities = IssueNotes.Select(model => new IssueNoteEntity(model, model.Customer, model.WareHouse)).ToList();
         }
     }
 }
Esempio n. 2
0
 public WareHouseEntity(WareHouse WareHouse, params object[] args) : base(WareHouse)
 {
     foreach (object arg in args)
     {
         if (arg is Employee Stockkeeper)
         {
             StockkeeperEntity = new EmployeeEntity(Stockkeeper);
         }
         if (arg is ICollection <Inventory> Inventories)
         {
             InventoryEntities = Inventories.Select(model => new InventoryEntity(model, model.Product)).ToList();
         }
         if (arg is ICollection <IssueNote> IssueNotes)
         {
             IssueNoteEntities = IssueNotes.Select(model => new IssueNoteEntity(model, model.Customer, model.Invoice)).ToList();
         }
         if (arg is ICollection <ReceiptNote> ReceiptNotes)
         {
             ReceiptNoteEntities = ReceiptNotes.Select(model => new ReceiptNoteEntity(model, model.Employee, model.Supplier)).ToList();
         }
     }
 }
Esempio n. 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();
         }
     }
 }