Esempio n. 1
0
 public ReservasViewModel()
 {
     this.repo = new RepositoryHoteles();
     Task.Run(async() => {
         MessagingCenter.Subscribe <ReservasViewModel>(this, "RESERVAS", async(sender) =>
         {
             MiPerfil view = new MiPerfil();
             await Application.Current.MainPage.Navigation.PushAsync(view);
             await this.CargarReservas();
         });
         await this.CargarReservas();
     });
 }
Esempio n. 2
0
        public UsuarioViewModel()
        {
            this.repo = new RepositoryHoteles();
            if (Usuario == null)
            {
                Usuario = new Usuario();
            }

            if (App.Locator.SessionService.Sesion.usuario != null)
            {
                this.Usuario = App.Locator.SessionService.Sesion.usuario;
            }

            MessagingCenter.Subscribe <UsuarioViewModel>(this, "MODIFICADO", async(sender) =>
            {
                MiPerfil view = new MiPerfil();
                await Application.Current.MainPage.Navigation.PushAsync(view);
                await this.CargarPerfil();
            });
        }