コード例 #1
0
        private async Task <bool> CanSaveCategoryAsync()
        {
            if (Category == null)
            {
                return(false);
            }

            if (Category.CategoryName == "" || Category.CategoryName == null)
            {
                return(false);
            }

            if (States.Count == 0)
            {
                return(false);
            }

            if (States.FirstOrDefault(x => x.StateName == "") != null)
            {
                return(false);
            }
            if (!CanCreateState())
            {
                return(false);
            }

            return(await FirebaseService.IsCategoryNameAwailableAsync(Category));
        }
コード例 #2
0
        private async Task <bool> CanSetCategoryNameAsync()
        {
            if (Category.CategoryName == "" || Category.CategoryName == null)
            {
                return(false);
            }

            return(await FirebaseService.IsCategoryNameAwailableAsync(Category));
        }