I'm not going to fix your program. You need to track down what's causing the problem, not me...
Do it exactly like the Customer Controller. Or use the Customer Controller.
If you pin down a specific problem other than "it's not working", that would help a great deal.