Beispiel #1
0
        public static FuncModel GetModelById(int childId)
        {
            FuncModel      funcModel      = null;
            FuncModelCache funcModelCache = (FuncModelCache) new FuncModelCache().GetData();
            int            index          = funcModelCache.dvFuncModelBy_ChildId.Find(childId);
            bool           flag           = index >= 0;

            if (flag)
            {
                FuncModel funcModel2 = new FuncModel();
                funcModel = FuncModelUtils.GetObject(funcModelCache.dvFuncModelBy_ChildId[index].Row);
            }
            return(funcModel);
        }
Beispiel #2
0
        public static List <FuncModel> GetModelByFatherId(int fatherId)
        {
            List <FuncModel> list = new List <FuncModel>();

            DataRowView[] array = ((FuncModelCache) new FuncModelCache().GetData()).dvFuncModelBy_FatherId.FindRows(fatherId);
            for (int i = 0; i < array.Length; i++)
            {
                DataRowView dataRowView = array[i];
                FuncModel   funcModel   = new FuncModel();
                FuncModel   @object     = FuncModelUtils.GetObject(dataRowView.Row);
                list.Add(@object);
            }
            return(list);
        }