Esempio n. 1
0
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            DBFactoryEnums db      = (DBFactoryEnums)cboDbOption.SelectedIndex + 1;
            LibraryProxy   library = LibraryProxy.GetInstance(db);

            if (!library.Login(txtUsername.Text.Trim(), txtPassword.Text))
            {
                MessageBox.Show("Please Insert Username and Password");
            }
            if (library.account.AccountLevel >= AccountLevelEnums.Patron)
            {
                MessageBox.Show("Login success.");
                GoToMain();
            }
        }