Beispiel #1
0
        private async Task PreguntarFavorito()
        {
            await Task.Run(() =>
            {
                var Favorito = new UsuariosController();
                isFavorite   = Favorito.IsMiembroFavorito(KeyChainHelper.GetKey("Usuario_Id"), KeyChainHelper.GetKey("Usuario_Tipo"), Miembro.Usuario_Id, Miembro.Usuario_Tipo);
            });

            if (isFavorite.Value)
            {
                this.btnSeguir.SetTitle("-DEJAR DE SEGUIR", UIControlState.Normal);
            }
            else
            {
                this.btnSeguir.SetTitle("+SEGUIR", UIControlState.Normal);
            }
        }
Beispiel #2
0
        public async void UpdateCell(UsuarioModel Miembro)
        {
            Favorites              = new UsuariosController();
            this.lblNombre.Text    = Miembro.Usuario_Nombre + " " + Miembro.Usuario_Apellidos;
            this.lblProfesion.Text = Miembro.Usuario_Empresa_Nombre;
            var isFavorite = Favorites.IsMiembroFavorito(KeyChainHelper.GetKey("Usuario_Id"), KeyChainHelper.GetKey("Usuario_Tipo"), Miembro.Usuario_Id, Miembro.Usuario_Tipo);

            if (isFavorite.Value)
            {
                this.btnFavorito.Enabled = true;
                this.btnFavorito.Hidden  = false;
            }
            else
            {
                this.btnFavorito.Enabled = false;
                this.btnFavorito.Hidden  = true;
            }
            this.MiembroLocal = Miembro;
            await GetImagenesPost(Miembro);
        }
Beispiel #3
0
        public async void UpdateCell(UsuarioModel usuario)
        {
            this.Usuario_Id   = usuario.Usuario_Id;
            this.Usuario_Tipo = usuario.Usuario_Tipo;
            UsuariosController Favorites = new UsuariosController();

            this.lblNombre.Text    = usuario.Usuario_Nombre + " " + usuario.Usuario_Apellidos;
            this.lblOcupacion.Text = usuario.Usuario_Empresa_Nombre;
            isFavorite             = Favorites.IsMiembroFavorito(KeyChainHelper.GetKey("Usuario_Id"), KeyChainHelper.GetKey("Usuario_Tipo"), usuario.Usuario_Id, usuario.Usuario_Tipo);
            if (isFavorite.Value || (KeyChainHelper.GetKey("Usuario_Id") == usuario.Usuario_Id && KeyChainHelper.GetKey("Usuario_Tipo") == usuario.Usuario_Tipo))
            {
                btnSeguir.Hidden  = true;
                btnSeguir.Enabled = false;
            }
            else
            {
                btnSeguir.Hidden  = false;
                btnSeguir.Enabled = true;
            }
            await GetImagenesPost(usuario);
        }