mirror of
https://github.com/rudollee/LearningMVC.git
synced 2026-08-11 16:32:55 +00:00
Primitive Commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using PartyInvites.Models;
|
||||
|
||||
namespace PartyInvites.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
// GET: Home
|
||||
public ActionResult Index()
|
||||
{
|
||||
int hour = DateTime.Now.Hour;
|
||||
//ViewBag.Greeting = hour < 12 ? "Good Morning" : "Good Afternoon";
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ViewResult RsvpForm()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ViewResult RsvpForm(GuestResponse guestResponse)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
return View("Thanks", guestResponse);
|
||||
}
|
||||
else
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user