|
@@ -8,6 +8,36 @@ using TextFieldParserStandard;
|
|
|
|
|
|
namespace InABox.Core
|
|
|
{
|
|
|
+ // public abstract class DigitalFormsCount : CoreAggregate<DigitalForm, DigitalFormLayout, Guid>
|
|
|
+ // {
|
|
|
+ // public override Expression<Func<DigitalFormLayout, Guid>> Aggregate => x => x.ID;
|
|
|
+ //
|
|
|
+ // public override Filter<DigitalFormLayout> Filter =>
|
|
|
+ // new Filter<DigitalFormLayout>(x => x.Type).IsEqualTo(DFLayoutType.Mobile)
|
|
|
+ // .And(x=>x.Active).IsEqualTo(true);
|
|
|
+ //
|
|
|
+ // public override Dictionary<Expression<Func<DigitalFormLayout, object>>, Expression<Func<DigitalForm, object>>> Links =>
|
|
|
+ // new Dictionary<Expression<Func<DigitalFormLayout, object>>, Expression<Func<DigitalForm, object>>>()
|
|
|
+ // {
|
|
|
+ // { DigitalFormLayout => DigitalFormLayout.Form.ID, DigitalForm => DigitalForm.ID }
|
|
|
+ // };
|
|
|
+ //
|
|
|
+ // public override AggregateCalculation Calculation => AggregateCalculation.Count;
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // public class ActiveMobileFormsCount : DigitalFormsCount
|
|
|
+ // {
|
|
|
+ // public override Filter<DigitalFormLayout> Filter =>
|
|
|
+ // new Filter<DigitalFormLayout>(x => x.Type).IsEqualTo(DFLayoutType.Mobile)
|
|
|
+ // .And(x=>x.Active).IsEqualTo(true);
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // public class ActiveFormsCount : DigitalFormsCount
|
|
|
+ // {
|
|
|
+ // public override Filter<DigitalFormLayout> Filter =>
|
|
|
+ // new Filter<DigitalFormLayout>(x=>x.Active).IsEqualTo(true);
|
|
|
+ // }
|
|
|
+
|
|
|
[UserTracking("Digital Forms")]
|
|
|
public class DigitalForm : Entity, IRemotable, IPersistent, ILicense<DigitalFormsLicense>//, IDuplicatable
|
|
|
{
|
|
@@ -47,6 +77,14 @@ namespace InABox.Core
|
|
|
|
|
|
[NullEditor]
|
|
|
public string Report { get; set; }
|
|
|
+
|
|
|
+ // [NullEditor]
|
|
|
+ // [Aggregate(typeof(ActiveFormsCount))]
|
|
|
+ // public int ActiveForms { get; set; }
|
|
|
+ //
|
|
|
+ // [NullEditor]
|
|
|
+ // [Aggregate(typeof(ActiveMobileFormsCount))]
|
|
|
+ // public int ActiveMobileForms { get; set; }
|
|
|
|
|
|
public IEntityDuplicator GetDuplicator()
|
|
|
{
|