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