I'm a nanny for a 2.5 year old, and he while he whines constantly at his father, he very rarely does with me.
The reason he doesn't whine at me is because he knows it doesn't work. When he does whine at me, I just remind him it doesn't work. When he makes any sort of whine, I just say "That doesn't work on me remember, I don't respond to it". He quickly remembers it is futile and stops doing it. If he does keep doing it (which was maybe once after I hadn't seen him for an entire week) I send him to time out for whining.
The reason your toddler is whining and crying is because it works on YOU. I don't care how bad a day our 2.5 year old has, I never accept whining as a form of communication.