예제 #1
0
        public LoadableSection(string fileName, AccountSection accountSection)
        {
            FileName = fileName;

            AccountSection = accountSection;
            //LoadedSections.Add(this);
        }
예제 #2
0
        public static AccountSection Create(AccountWP account)
        {
            AccountSection section = new AccountSection(account.LocalId);

            section.Value = account;
            _initializedSchools[account.LocalId] = section;
            return(section);
        }
예제 #3
0
        public void AssignToSection(BaseItemWP item, BaseItemWP parent)
        {
            item.Parent         = parent;
            item.AccountSection = parent.AccountSection;
            item.Section        = this;

            AccountSection.AddLoadedItem(item);
        }
예제 #4
0
        public SemesterSection(AccountSection accountSection, Guid localAccountId, SemesterWP semester)
            : this(accountSection, Files.SEMESTER_FILE(localAccountId, semester.Identifier), semester.Identifier)
        {
            Year = (YearWP)semester.Parent;

            //automatically calls loaded
            Value = semester;
        }
예제 #5
0
        /// <summary>
        /// Will always returned initialized section, unless . Ensures there's only one section per each account.
        /// </summary>
        /// <param name="localAccountId"></param>
        /// <returns></returns>
        public static AccountSection Get(Guid localAccountId)
        {
            if (localAccountId == Guid.Empty)
            {
                throw new ArgumentException("localAccountId cannot be an empty GUID.");
            }

            AccountSection school;

            if (_initializedSchools.TryGetValue(localAccountId, out school))
            {
                return(school);
            }

            school = new AccountSection(localAccountId);
            _initializedSchools[localAccountId] = school;
            return(school);
        }
예제 #6
0
 public GradesSection(AccountSection accountSection, string fileName, ClassWP c)
     : base(fileName, accountSection)
 {
     _accountSection = accountSection;
     _class          = c;
 }
예제 #7
0
 public SemesterSection(AccountSection accountSection, string fileName, Guid semesterIdentifier)
     : base(fileName, accountSection)
 {
     _accountSection    = accountSection;
     SemesterIdentifier = semesterIdentifier;
 }