public IActionResult AddSuggestion(RestaurantSuggestion newSuggestion)
 {
     if (ModelState.IsValid)
     {
         TempStorage.AddSuggestion(newSuggestion);
         return(View("Confirmation", newSuggestion));
     }
     else
     {
         return(View());
     }
 }
示例#2
0
 public IActionResult Entry(RestaurantSuggestion restaurantSuggestion)
 {
     //if the model has everything entered correctly then show the suggestions view, and add the data, otherwise show the error
     if (ModelState.IsValid)
     {
         RestaurantSuggestion.AddRestaurantSuggestion(restaurantSuggestion);
         return(RedirectToAction("sug"));
     }
     else
     {
         return(View());
     }
 }
示例#3
0
 public IActionResult SubmitSuggestions(RestaurantSuggestion restaurantLists)
 {
     TempStorage.AddApplication(restaurantLists);
     //Debug.WriteLine("Name: " + appResponse.Name);
     return(View("Confirmation", restaurantLists)); //"Confirmation", appResponse
 }