| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | using System;using System.Collections.Generic;using System.Linq.Expressions;using InABox.Core;namespace Comal.Classes{    public class QuoteCostSheetExTax : CoreAggregate<QuoteCostSheet, QuoteCostSheetItem, double>    {        public override Expression<Func<QuoteCostSheetItem, double>> Aggregate => x => x.ExTax;        public override AggregateCalculation Calculation => AggregateCalculation.Sum;        public override Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>> Links =>            new Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>>()            {                { QuoteCostSheetItem => QuoteCostSheetItem.CostSheet.ID, QuoteCostSheet => QuoteCostSheet.ID }            };    }    public class QuoteCostSheetTax : CoreAggregate<QuoteCostSheet, QuoteCostSheetItem, double>    {        public override Expression<Func<QuoteCostSheetItem, double>> Aggregate => x => x.Tax;        public override AggregateCalculation Calculation => AggregateCalculation.Sum;        public override Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>> Links =>            new Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>>()            {                { QuoteCostSheetItem => QuoteCostSheetItem.CostSheet.ID, QuoteCostSheet => QuoteCostSheet.ID }            };    }    public class QuoteCostSheetIncTax : CoreAggregate<QuoteCostSheet, QuoteCostSheetItem, double>    {        public override Expression<Func<QuoteCostSheetItem, double>> Aggregate => x => x.IncTax;        public override AggregateCalculation Calculation => AggregateCalculation.Sum;        public override Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>> Links =>            new Dictionary<Expression<Func<QuoteCostSheetItem, object>>, Expression<Func<QuoteCostSheet, object>>>()            {                { QuoteCostSheetItem => QuoteCostSheetItem.CostSheet.ID, QuoteCostSheet => QuoteCostSheet.ID }            };    }    [UserTracking(typeof(Quote))]    public class QuoteCostSheet : Entity, IRemotable, IPersistent, IQuoteCostSheet, ILicense<QuotesManagementLicense>    {        [NullEditor]        [EntityRelationship(DeleteAction.Cascade)]        public QuoteLink Quote { get; set; }        [EntityRelationship(DeleteAction.SetNull)]        public CostSheetLink CostSheet { get; set; }        [CurrencyEditor(Visible = Visible.Default, Editable = Editable.Hidden, Summary = Summary.Sum)]        [Aggregate(typeof(QuoteCostSheetExTax))]        public double ExTax { get; set; }        [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden, Summary = Summary.Sum)]        [Aggregate(typeof(QuoteCostSheetTax))]        public double Tax { get; set; }        [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden, Summary = Summary.Sum)]        [Aggregate(typeof(QuoteCostSheetIncTax))]        public double IncTax { get; set; }        [TextBoxEditor(Visible = Visible.Default)]        public string Description { get; set; }        [NullEditor]        public long Sequence { get; set; }    }}
 |