Exemplo n.º 1
0
        private void To_Buy(object sender, RoutedEventArgs e)
        {
            Buy BuyWindow = new Buy();

            BuyWindow.Show();

            this.Close();
        }
        private void Login_Button_Click(object sender, RoutedEventArgs e)
        {
            CustomerServiceClient CustomerServiceClient = new CustomerServiceClient();
            Customer newCustomer = CustomerServiceClient.LoginCustomer(username.Text, password.Text);

            if (newCustomer != null)
            {
                Application.Current.Resources["CUSTOMER_ID"] = newCustomer.Id;

                Buy BuyWindow = new Buy();
                this.Close();
                BuyWindow.Show();
            }
            else
            {
                MessageBox.Show("Foute login");
            }
        }