private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window back = new privetArea();

            back.Show();
            this.Close();
        }
示例#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 privet = new privetArea();
                        privet.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;
            }
        }
        private void privetArea_Click(object sender, RoutedEventArgs e)
        {
            Window privetArea = new privetArea();

            privetArea.Show();
        }