예제 #1
0
        public List <Int32> GetLowerAccountIDs()
        {
            //AuxVariables
            List <object> objects;
            List <Int32>  result;

            //Run Method
            result  = new List <int>();
            objects = Read(Controllers.ClassType.account);
            foreach (object obj in objects)
            {
                Models.Account temp = (Models.Account)obj;
                if (temp.GetUpperAccountID() == primary_key)
                {
                    result.Add(temp.GetID());
                }
            }
            return(result);
        }
예제 #2
0
        public List <Int32> GetPossibleUpperAccountIDs()
        {
            //AuxVariables
            List <object> objects;
            List <Int32>  result;

            //Run Method
            result  = new List <int>();
            objects = Read(Controllers.ClassType.account);
            foreach (object obj in objects)
            {
                Models.Account temp = (Models.Account)obj;
                if (temp.GetAccessible() &
                    temp.GetAsset() == asset &
                    temp.GetConsisted() == consisted &
                    temp.GetUpperAccountID() == 0 &
                    temp.GetAccountingRecordIDs().Count == 0)
                {
                    result.Add(temp.GetID());
                }
            }
            return(result);
        }