Exemple #1
0
        async Task <bool> EstadoBath()
        {
            var getEstado = await data.GetEstadoBath();

            var luz = getEstado.Where(x => x.Luz == 0 || x.Luz == 1).Select(y => y.Luz).FirstOrDefault();

            if (getEstado.Count == 0)
            {
                await data.AgregarEstadoBath();

                return(false);
            }
            else
            {
                if (luz == 1)
                {
                    btnBath.IsVisible = true;
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }