Giving a small pieces of chocolate to your dog can spoil their habit and make them crave for more.
You can give chocolate or sweet candy when he behave well but you  should aware that there are some types of chocolate that can be  poisonous for your dog and lethal in some case.
Why is chocolate poisonous or lethal ?
Cocoa beans that were used in the chocolate production contains  theobromine which can be toxic for your dog. Metabolise of theobromine  in dog is very slow so it can stay in the bloodsteam for many hours  which can affects and interferes with the central nervous system causing  heart and kidneys problems.
Dog chocolate symptoms
The symptoms of theobromine poisoning can be clearly seen within 4 -  24 hours after chocolate has been consumed by your dog. The early signs  of chocolate symptoms that can be seen from external are excessive  thirst for water, vomiting, urination increased, diarrhea and restless.
As time passed, more theobromine will be absorb into the blood stream  which will now affects the central nervous system causing heart rate to  increase, serious muscle twitching, raise in blood pressure and  hyperactivity. For worst case dog may have heart arrhythmia, seizures,  abnormally high body temperature or hyperthermia and death.
Even if the small pieces of chocolate is consumed dog may vomit and  having diarrhea due to high sugar and fat contained in the chocolate.
Treatments
You will have to do anythings to make your dog vomit the eaten  chocolate out from his stomach. This will clearly reduce or decrease the  amount of theobromine that can be absorb into your dog body. Call your  local veterinarian and describe everythings that you know such as  behaviour, symptoms, amount of chocolate consumed by your dog, previous  record of allergy etc.
Many dogs  usually recovered from dog chocolate symptoms and poisoning effects  within 1 - 3 days after taken effective treatments from veterinarian.