Beispiel #1
0
        public bool CanActFor(IUserOrg organisation)
        {
            //TODO: Make more efficient by searching on links
            string typeCode = PolymorphicNavigator.GetType(organisation);
            int    orgId    = organisation.Id;

            return(OrganisationLinks.SingleOrDefault(x => x.AssociatedRoleObjectId == orgId && x.AssociatedRoleObjectType == typeCode) != null);
        }
Beispiel #2
0
 //Called automatically by framework if the user modifies the value.
 public void ModifyContent(IExternalDocument value)
 {
     _Content = value;
     if (Container.IsPersistent(this))
     {
         ContentLink = PolymorphicNavigator.UpdateAddOrDeleteLink(_Content, ContentLink, this);
     }
 }
Beispiel #3
0
        public override void Persisting()
        {
            base.Persisting();
            AccountHolderLink = PolymorphicNavigator.NewTransientLink <CustomerAccountAccountHolderLink, ICustomerAccountHolder, CustomerAccount>(_AccountHolder, this);
            string number = AccountNumberCreator.GetAccountNumberForNewAccount(this);

            Code = number;
        }
Beispiel #4
0
 public void Persisting()
 {
     TargetObjectLink = PolymorphicNavigator.NewTransientLink <ObjectAuditedEventTargetObjectLink, IDomainInterface, ObjectAuditedEvent>(_TargetObject, this);
 }
 private IQueryable <CustomerAccount> AllAccountsForHolder(ICustomerAccountHolder forHolder)
 {
     return(PolymorphicNavigator.FindOwners <CustomerAccountAccountHolderLink, ICustomerAccountHolder, CustomerAccount>(forHolder));
 }
Beispiel #6
0
 public void RemoveOrganisation(IUserOrg organisation)
 {
     PolymorphicNavigator.RemoveLink <UserOrganisationLink, IUserOrg, UserDetails>(organisation, this);
 }
Beispiel #7
0
 public void RemoveContext(ITaskContext value)
 {
     PolymorphicNavigator.RemoveLink <TaskContextLink, ITaskContext, Task>(value, this);
 }
Beispiel #8
0
 public void AddContext(ITaskContext value)
 {
     PolymorphicNavigator.AddLink <TaskContextLink, ITaskContext, Task>(value, this);
 }
 public void RemovePayableItem(IPayableItem value)
 {
     PolymorphicNavigator.RemoveLink <PolymorphicPaymentPayableItemLink, IPayableItem, PolymorphicPayment>(value, this);
 }
 public void AddPayableItem(IPayableItem value)
 {
     PolymorphicNavigator.AddLink <PolymorphicPaymentPayableItemLink, IPayableItem, PolymorphicPayment>(value, this);
 }
 //TODO:  Move this method into LifeCycle Methods region, or add code into existing Persisting method
 public void Persisting()
 {
     PayeeLink = PolymorphicNavigator.NewTransientLink <PolymorphicPaymentPayeeLink, IPayee, PolymorphicPayment>(_Payee, this);
 }
 public IQueryable <PolymorphicPayment> PaymentsContainingThis()
 {
     return(PolymorphicNavigator.FindOwners <PolymorphicPaymentPayableItemLink, IPayableItem, PolymorphicPayment>(this));
 }
 public IQueryable <PolymorphicPayment> PaymentsToThisPayee()
 {
     return(PolymorphicNavigator.FindOwners <PolymorphicPaymentPayeeLink, IPayee, PolymorphicPayment>(this));
 }
Beispiel #14
0
 public override void Persisting()
 {
     base.Persisting();
     ContentLink = PolymorphicNavigator.NewTransientLink <ExternalDocumentContentLink, IExternalDocument, ExternalDocument>(_Content, this);
 }
 public void RemoveHolder(IDocumentHolder value)
 {
     PolymorphicNavigator.RemoveLink <DocumentHolderLink, IDocumentHolder, Document>(value, this);
 }
 public void AddHolder(IDocumentHolder value)
 {
     PolymorphicNavigator.AddLink <DocumentHolderLink, IDocumentHolder, Document>(value, this);
 }