コード例 #1
0
        private void searchbtn_Click(object sender, RoutedEventArgs e)  // Button for  Admin Forgot Password
        {
            bool searchresult = false;

            try
            {
                Admin admin = new Admin();
                admin.UserName = txtValue.Text;

                AdminBL Passvalidate = new AdminBL();
                searchresult = Passvalidate.AdminForget(admin.UserName);
                if (searchresult == true)
                {
                    MessageBox.Show("Username Found!");
                    this.Close();
                    AdminChangePassword pass = new AdminChangePassword();
                    pass.Show();
                }
                else
                {
                    MessageBox.Show("Username Not Found!");
                }
            }
            catch (RecipeIngredientSystemExceptions ex)
            {
                System.Windows.MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
        private void changepassbtn_Click(object sender, RoutedEventArgs e)  // Button for  Admin  ChangePassword
        {
            this.Close();
            AdminChangePassword changepasswordpage = new AdminChangePassword();

            changepasswordpage.Show();
        }