Ejemplo n.º 1
0
        public void AddDataCat(string FullKey, string CatName)
        {
            WebDataStruct ParentCat = WebDataStruct.FindCategoryFromFullKey(this.LocalData, FullKey);
            WebDataStruct NewCat    = new WebDataStruct();

            NewCat.CatName = CatName;
            ParentCat.ChildsCategories.Add(NewCat);
        }
Ejemplo n.º 2
0
        public static WebDataStruct FindDataFromFullKey(WebDataStruct ParentData, string FullKey)
        {
            string[]      KeyArgs  = FullKey.Split('.');
            WebDataStruct LocalCat = WebDataStruct.FindCategoryFromFullKey(ParentData, FullKey);

            foreach (WebDataStruct LocalData in LocalCat.ChildsData)
            {
                if (LocalData.Key == KeyArgs[KeyArgs.Length - 1])
                {
                    return(LocalData);
                }
            }
            throw new Exception("Data not found from FindDataFromFullKey");
        }