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); } }
public ShowAds(Window window) { try { InitializeComponent(); this.window = window; BikeService.Open(); PopulateAdslistView(); } catch (Exception e) { MessageBox.Show(e.Message); } }
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); } }
public void TestServiceConnection() { client.Open(); }