private async void Create() { UserDialogs.Instance.ShowLoading("Welcome"); Nick = string.Empty; Password = string.Empty; MainViewModels.GetInstance().Create = new CreateViewModel(); await App.Current.MainPage.Navigation.PushAsync(new CreatePage(), true); UserDialogs.Instance.HideLoading(); }
private async void Next() { UserDialogs.Instance.ShowLoading("Espere"); var data = await ServiceWebApi.InsertUser(this.User); if (data == null) { UserDialogs.Instance.HideLoading(); await App.Current.MainPage.DisplayAlert("Error", "Tu registro no fue aceptado", "Aceptar"); this.User = null; } UserDialogs.Instance.HideLoading(); await App.Current.MainPage.DisplayAlert("Bienvenido", $"Es momento de ingresar {data.Name}", "Aceptar"); MainViewModels.GetInstance().Login = new LoginViewModel(); this.User = null; await App.Current.MainPage.Navigation.PopToRootAsync(); }
private async void Login() { UserDialogs.Instance.ShowLoading("Espere"); if (string.IsNullOrEmpty(Nick)) { Nick = string.Empty; Password = string.Empty; await App.Current.MainPage.DisplayAlert("Error", "Debes completar los campos", "Aceptar"); UserDialogs.Instance.HideLoading(); return; } if (string.IsNullOrEmpty(Password)) { Password = string.Empty; await App.Current.MainPage.DisplayAlert("Error", "Debes completar los campos", "Aceptar"); UserDialogs.Instance.HideLoading(); return; } App.User = await ServiceWebApi.GetUserByCredentials(Nick, Password); if (App.User != null) { Nick = string.Empty; Password = string.Empty; MainViewModels.GetInstance().Home = new HomeViewModel(); await App.Current.MainPage.Navigation.PushAsync(new HomePage(), true); UserDialogs.Instance.HideLoading(); } else { Nick = string.Empty; Password = string.Empty; UserDialogs.Instance.HideLoading(); await App.Current.MainPage.DisplayAlert("Error", "Credenciales no válidas", "Aceptar"); } }
private async void Back() { MainViewModels.GetInstance().Login = new LoginViewModel(); await App.Current.MainPage.Navigation.PopAsync(); }
private async void Next() { MainViewModels.GetInstance().Birth = new BirthdayViewModel(this.User); await App.Current.MainPage.Navigation.PushAsync(new BirthdayPage(), true); }
private async void Back() { MainViewModels.GetInstance().User = new UsuarioViewModel(this.User); await App.Current.MainPage.Navigation.PopAsync(); }
private async void Next() { this.User.Birthday = Birthday.ToString("yyyy-MM-dd"); MainViewModels.GetInstance().Movil = new MovilViewModel(this.User); await App.Current.MainPage.Navigation.PushAsync(new MovilPage(), true); }
private async void Next() { MainViewModels.GetInstance().User = new UsuarioViewModel(this.User); await App.Current.MainPage.Navigation.PushAsync(new UsuarioPage(), true); }
private async void Next() { MainViewModels.GetInstance().Pass = new PasswordViewModel(this.User); await App.Current.MainPage.Navigation.PushAsync(new PasswordPage(), true); }