C# Marathon Sprint13
Sprint 13. Tasks
All the views are based only on the Razor syntax.
- Change the title of tab;
- Add navy bar “Sprint Tasks” that redirect to page “Sprint Tasks”;
- ‘Our project’ is a link to your project on Git.
The page contains navigation bars that redirect the user to the appropriate view-pages.
- Messages are placed as variables;
- Use DateTime methods;
- Use branching to send the greeting (evening or morning).
- Create the class Product with properties: Name (string), Price (double)
- Use this class to create the list of products just within the view.
- Use loop to output the information on the page.
View page receives the list of supermarkets via ViewBag and output it with their quantity.
View page receives the model dictionary from controller. Dictionary contains name of product (key), quantity (value). View contains partial view ‘TimeToBuy’
- Partial view ‘TimeToBuy’ uses @inject. You have to:
- Create the folder Services;
- define interface ITimeService with method GetTimeForTomorrow();
- the class SimpleTimeService, that implement interface ITimeService. The method GetTimeForTomorrow() have to return the time for shopping just in a day;
- inject dependencies into view to output the time of shopping for tomorrow.
The page contains controls that you have to define using html-helpers:
- Input boxes;
- DropDown box that receives and contains the list of supermarkets;
- RadioButtons with values according to the today-date. User can choose date to ship order;
- ListBox that receives the keys of dictionary (use ShoppingList);
- ‘submit’ input. You should consider both (HttpPost and HttpGet) controller methods for this view. As the result of submit user might receive the message: