Ejemplo n.º 1
0
        private async Task GetCategoryAsync(string categoryID)
        {
            if (!IsNewCategory)
            {
                await DialogService.DisplayPopupAsync();

                Category = await FirebaseService.GetCategoryAsync(categoryID);

                States = new ObservableCollection <StateModel>(await FirebaseService.GetStatesAsync(categoryID));
                await DialogService.PopAsync();
            }
        }
Ejemplo n.º 2
0
        private async Task SetSelectableStatesAsync()
        {
            States = new ObservableCollection <StateModel>
            {
                new StateModel
                {
                    StateName  = "All",
                    NamedColor = NamedColor.Transparent
                }
            };

            var states = await FirebaseService.GetStatesAsync(Category.CategoryID);

            SelectableStates = new ObservableCollection <StateModel>(states);

            foreach (var state in states)
            {
                States.Add(state);
            }

            VisibleState = States[0];
        }