Beispiel #1
0
 private void RemoveActive()
 {
     using (_context = new HairSpaContext())
     {
         _context.Accounts.ToList().ForEach(ac => ac.IsActive = false);
         _context.SaveChanges();
     }
 }
Beispiel #2
0
        private void login_Button_Click(object sender, EventArgs e)
        {
            using (_context = new HairSpaContext())
            {
                if (ActiveUser.AreCredentialsValid(_context, username_TextBox.Text, password_TextBox.Text))
                {
                    var main_Form = new Main_Form();
                    main_Form.LogoutClicked += new EventHandler(main_Form_LogoutClicked);
                    main_Form.Show();

                    username_TextBox.Text = "";
                    password_TextBox.Text = "";
                    this.Hide();
                }
            }
        }