I have an ASP.NET MVC3 application in C# and Razor.
In the view MyView I have a search filter, where user might select through radio buttons (mutually exclusive) whether s/he wants to perform the search based on time period (for instance from 1/2/2012 to 8/3/2012) or by specifying exact date or day, month, year, etc…
Depending on the user’s choice I shall call a different set of methods in my service layer. For instance if the user select period I call FindProductsSoldPeriod, if the user selects a specific month I call FindProductsSoldMonth.
The check on which radio button has been selected has to be done in the the controller or in the service layer?
In the controller or the View. The service layer doesn’t even know what a radio button means.
Or to be a bit more precise: a properly designed service layer shouldn’t know what a radio button means.