Пример #1
0
        private void CreateUser()
        {
            var user = new User();

            user.Username = "******";
            user.Password = _secure.EncryptData("test");
            _conn.InsertUser(user);
            _id = _conn.GetUserByName(user.Username).UserId;
        }
Пример #2
0
 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");
     }
 }