Ejemplo n.º 1
0
        private async void LoadData()
        {
            DepartmentCollection.Clear();
            CategoryCollection.Clear();
            var dCollection = await DbHandler.Instance.GetAllData <BbDepartment>();

            DepartmentCollection.AddRange(dCollection);
            var cCollection = await DbHandler.Instance.GetAllData <BbCategory>();

            CategoryCollection.AddRange(cCollection);
        }
        public override async void OnLoad()
        {
            base.OnLoad();
            List <BbDepartment> deptCollection = await DbHandler.Instance.GetAllData <BbDepartment>();

            List <BbCategory> categoryCollection = await DbHandler.Instance.GetAllData <BbCategory>();

            DeptCollection.Clear();
            CategoryCollection.Clear();
            DeptCollection.AddRange(deptCollection);
            CategoryCollection.AddRange(categoryCollection);
        }