예제 #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            String username = this.textBoxUsername.Text;
            String password = this.textBoxPassword.Text;

            Account newAccount = AccountMgr.Create(new Account()
            {
                Username = username, PasswordSHA1 = Account.getSHA1Password(username, password)
            });

            VeterinairesMgr.Create(new Veterinaires()
            {
                AccountId = newAccount.Id, Archive = false, NomVeto = this.textBoxName.Text
            });
            this.Close();
        }