Esempio n. 1
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            UserApiService userService = new UserApiService();

            try
            {
                lblName.Foreground     = Brushes.White;
                lblEmail.Foreground    = Brushes.White;
                lblPassword.Foreground = Brushes.White;
                lblName.Content        = "";
                lblPassword.Content    = "";
                lblEmail.Content       = "";
                string req = await userService.RegisterAsync(new UserRegisterVM { Name = txtName.Text, Email = txtEmail.Text, Password = txtPassword.Text });

                MessageBox.Show("Працівник успішно доданий.");
                this.Close();
            }
            catch (WebException wex)
            {
                ShowException(wex);
            }
        }