123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using InABox.Core;
- namespace Comal.Classes
- {
- [Caption("Issued Products")]
- public class EmployeeProduct : Entity, IRemotable, IPersistent, IOneToMany<Employee>, ILicense<ProductManagementLicense>
- {
- [NullEditor]
- public EmployeeLink Employee { get; set; }
- [EditorSequence(1)]
- private class ProductLookupGenerator : LookupDefinitionGenerator<Product, EmployeeProduct>
- {
- public override Filter<Product>? DefineFilter(EmployeeProduct[] items)
- => LookupFactory.DefineFilter<Product>().And(x => x.NonStock).IsEqualTo(false).And(x => x.DefaultLocation).LinkValid();
- }
- [LookupDefinition(typeof(ProductLookupGenerator))]
- public ProductLink Product { get; set; }
- [DoubleEditor]
- [EditorSequence(2)]
- public double Quantity { get; set; } = 1.0F;
- [TimestampEditor(Visible = Visible.Default)]
- [EditorSequence(3)]
- public DateTime Issued { get; set; }
- [NullEditor]
- [EntityRelationship(DeleteAction.SetNull)]
- public StockMovementLink IssuedMovement { get; set; }
- [TimestampEditor(Visible = Visible.Default)]
- [EditorSequence(4)]
- public DateTime Returned { get; set; }
- [NullEditor]
- [EntityRelationship(DeleteAction.Cascade)]
- public StockMovementLink ReturnedMovement { get; set; }
- [TimestampEditor(Visible = Visible.Default)]
- [EditorSequence(5)]
- public DateTime Disposed { get; set; }
- }
- }
|