Пример #1
0
 public void LoadRelationships(CFAPContext ctx)
 {
     LoadUserGroupsFromDatabase(ctx);
     if (this.IsAccountable == true || this.AccountableId != null)
     {
         ctx.Configuration.ProxyCreationEnabled = false;
         this.Accountable = (from a in ctx.Accountables where a.Id == this.AccountableId select a).Single();
     }
 }
Пример #2
0
        public void SetRelationships(CFAPContext ctx)
        {
            LoadUserGroupsFromObject(ctx);

            if (this.IsAccountable == false || this.Accountable == null)
            {
                this.AccountableId = null;
                this.Accountable   = null;
            }
            else
            {
                ctx.Accountables.Attach(this.Accountable);
                this.AccountableId = this.Accountable.Id;
            }
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            bool result = false;

            Accountable otherProject = obj as Accountable;

            if (otherProject == null)
            {
                return(false);
            }

            result = this.Id == otherProject.Id;

            return(result);
        }