private void btnUpdate_Click(object sender, RoutedEventArgs e) { try { if (BikenBike.CurrentUser != null) { BikeService.Open(); BikeService.ModifyUser(Convert.ToInt16(BikenBike.CurrentUser.Id), txtEmail.Text, txtName.Text, txtPhone.Text, txtAddress.Text, txtZipcode.Text, txtAge.Text); BikeService.Close(); window.Content = new EditUserPage(window); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void btnRegister_Click(object sender, RoutedEventArgs e) { try { BikeService.Open(); BikeService.CreateUser(txtEmail.Text, txtPassword.Text, txtName.Text, txtPhone.Text, txtAddress.Text, txtZipcode.Text, txtAge.Text); BikeService.Close(); window.Content = new StartPage(window); } catch (Exception exception) { Console.WriteLine(exception); } }