Ejemplo n.º 1
0
        private void Btn_logIn_Click(object sender, RoutedEventArgs e)
        {
            string uname      = txt_username.Text;
            string passwd     = txt_password.Password;
            bool   check_form = true;

            if (uname != "Admin")
            {
                lbl_name_error.Visibility = Visibility.Visible;
                check_form = false;
            }
            else
            {
                lbl_name_error.Visibility = Visibility.Hidden;
            }
            if (passwd != "Admin123")
            {
                lbl_pwd_error.Visibility = Visibility.Visible;
                check_form = false;
            }
            else
            {
                lbl_pwd_error.Visibility = Visibility.Hidden;
            }
            if (check_form)
            {
                MessageBox.Show("LogIn Successfull.");
                HairSaloon hair = new HairSaloon();
                hair.Show();
                this.Close();
            }
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            HairSaloon hairSaloon = new HairSaloon();

            hairSaloon.Show();
            this.Close();
        }