Ejemplo n.º 1
0
        public async Task LoadList()
        {
            CategoriesList = new List <CategoryModel>();
            try
            {
                var list = await categoryDb.GetItemsAsync();

                CategoriesList = list;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                throw;
            }
        }
Ejemplo n.º 2
0
        async Task LoadCategoryList()
        {
            CategoriesList = new List <CategoryModel>();
            try
            {
                var list = await categoryDb.GetItemsAsync();

                CategoriesList   = list;
                CategorySelected = Product.CategoryId > 0 ? CategoriesList.Where(c => c.CategoryId == Product.CategoryId).FirstOrDefault() : null;
            }
            catch (System.Exception e)
            {
                Debug.WriteLine(e.Message);
                throw;
            }
        }