private bool Validate_txt_Username(AccountDBFunctions con)
        {
            if (txt_Username.Text.Trim() == "")
            {
                MessageBox.Show("Username must not be empty!", RBACManagerModel.GetApplicationTitle());
                return false;
            }

            if (con.UsernameExists(txt_Username.Text.Trim()))
            {
                MessageBox.Show("A user with the name already exists!", RBACManagerModel.GetApplicationTitle());
                return false;
            }

            return true;
        }
 public CreateAccountDialog(AccountDBFunctions accountDBFunctions)
 {
     accountFunctions = accountDBFunctions;
     InitializeComponent();
 }
Пример #3
0
 public AccountModel(Mysql mysqlConnection)
 {
     this.accountFunctions = new AccountDBFunctions(mysqlConnection);
     LoadAccountList();
 }