public void ConfirmCommandMethod(object o) { ManageAccount manage = new ManageAccount(); PasswordBox pb = (PasswordBox)o; string username = Username; string password = pb.Password; bool valid = manage.AddAccount(username, password); if (valid) { this.caller.GoBackMethod(); } }