private void CreateUser() { var user = new User(); user.Username = "******"; user.Password = _secure.EncryptData("test"); _conn.InsertUser(user); _id = _conn.GetUserByName(user.Username).UserId; }
async void createButton_Clicked(object sender, EventArgs e) { if (_nameCheck && _passCheck) { var user = new User(); var newPass = _secure.EncryptData(passEntry.Text); user.Username = nameEntry.Text; user.Password = newPass; _conn.InsertUser(user); await Navigation.PushAsync(new LoginPage(), true); } else { await DisplayAlert("Alert", "Please Enter a Valid Username and Password", "OK"); } }