Want to work in a happy and productive environment? You'll need to have the trust and confidence of your boss to make this a reality.

But what happens when you have broken that trust by failing to meet a big deadline, by delivering subpar work or by doing or saying something really stupid? We've all been there at some point in our life. Here are some of the best ways I've found to build back the confidence of your manager.

Realize that relationships change

The relationship between you and your boss will change over time. When you just started out, your boss was a mentor who took you under his wing. But as a seasoned employee, you should be able to handle tasks on your own. If you are settled in and still must constantly be reminded about your regular assignments, how can this boss trust you moving forward?

Keep commitments

When you say that you'll have a report on your boss' desk by the end of the day, make sure that you have it there. This also means standing up and taking the heat on the spot, if the job really can't be there until tomorrow. If your boss is angry or yelling about the project, stick with, “I'm sorry, it will really have to be handed in tomorrow.” If you always do what you say, the boss can relax.

Accept challenges

Don't hide in the dark and let someone else make your boss look like a rock star. Yes, it is often up to you to make your boss look good. Step up to the plate and knock it out of the park for the win. We all remember the people who won the World Series and not the guy who struck out.

Delay self-gratification

“Repeatedly demonstrate an ability to delay selfish gratification for small temptations,” suggests David DeSteno, author of “The Truth About Trust.” “For example, work through lunch or take on onerous or tedious tasks that need to get done but no one else wants to do.”

Just do it

“If you're asked to do something by your boss, it's likely an issue that matters to them,” says Darlene Price, president of Well Said Inc., and author of “Well Said! Presentations and Conversations That Get Results.” Simply saying you'll do it “grows your boss' trust, increases the chances of advancement and cultivates your reputation as a trustworthy, dependable person.”

Be consistent

Everyday there are hurdles to overcome. You may be sick. Your boss is grumpy. Your mind is preoccupied with the fight that you had last night with your spouse. And, while these can definitely impact your performance, you have to do your best and deliver consistent work on a daily basis.

Keep your boss in the loop

Your boss expects you to keep him or her informed when a deadline or the scope of work changes. If not, how can he or she trust you again? Always keep your boss informed on the progress of a project, along with any changes that have been made.

Hold yourself accountable

When you make a mistake, admit it and fix it. Don't blame others. Don't get defensive. Your boss likely understands that we're all human and mistakes happen. You don't want to be known as the employee who is either incompetent or someone who makes excuses.

Arrive early and stay late

Getting to work before everyone else, even your boss, shows that you're reliable and dependable. Additionally, rushing out of the office before your boss doesn't put you in the best light. Take this additional time to prepare for the next day or do some housekeeping, like returning emails.

Don't be “that” person

We've all worked with “that” person. The one who gossips or constantly complains. He or she creates a toxic workplace environment, and you can bet that your boss wants none of that. If you're frustrated, vent outside of work and never to co-workers.

Pick your battles wisely

Sometimes you do have to stand up for yourself and confront your boss. But this shouldn't be an everyday occurrence. Know which battles are worth fighting for and which ones are better left alone.

Make room to change

One of the most powerful ways to rebuild trust is to make a change on your end. For example, if you lost your boss' confidence because you made an awkward presentation, then acknowledge the failing and work to fix it by signing up for a public speaking course.