Пример #1
0
        public void CheckUpdatesData()
        {
            cityList     = db.selectTableCities();
            titleCreator = new TitleCreator();
            var parentObject = new List <IParentObject>();

            AddDataAfterUpdate(parentObject);

            mAdapter = new MyAdapter(this, parentObject);
            mRecyclerView.SetAdapter(mAdapter);
        }
Пример #2
0
        private void LoadData(bool After)
        {
            if (After == true || IsDelete == true)
            {
                titleCreator = new TitleCreator();
                parentObject = new List <IParentObject>();
                IsDelete     = false;
            }
            cityList = db.selectTableCities();
            var child = db.selectTablePlace();

            for (var x = 0; x < cityList.Count; x++)
            {
                titleCreator.Add(cityList[x].Name);
            }

            var titles = titleCreator.GetAll;


            foreach (var title in titles)
            {
                var childList = new List <object>();
                var titleName = db.selectTablePlaceWhere(title);
                foreach (var childrenPlace in titleName)
                {
                    childList.Add(new TitleChild(childrenPlace.Name));
                    title.ChildObjectList = childList;
                }

                parentObject.Add(title);
            }


            mAdapter = new MyAdapter(this, parentObject);
            mRecyclerView.SetAdapter(mAdapter);
        }