Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window meneger = new maneger();

            meneger.Show();
            //	this.Close();
        }
Exemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.passwordTextBox.Text == "" || this.userTextBox.Text == "")
                {
                    throw new Exception("!הינך חייב להכניס שם משתמש וסיסמה");
                }

                int a = 0;
                this.passworde.User     = this.userTextBox.Text;
                this.passworde.Password = this.passwordTextBox.Text;
                foreach (var item in bl.GetPasswordList())
                {
                    if (item.User == passworde.User && item.Password == passworde.Password)
                    {
                        a = 1;

                        Window maneger = new maneger();
                        maneger.Show();
                        this.Close();
                    }
                }
                if (passworde.Password != "" && passworde.User != "" && a == 0)
                {
                    MessageBox.Show("!משתמש או סיסמה אינם נכונים");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                passworde        = new BE.Passworde();
                this.DataContext = passworde;
            }
        }