Exemplo n.º 1
0
 public ActionResult RsvpForm(GuestRespone response)
 {
     if (response.willAttend == null)
     {
         ViewBag.messageresult = "You need to fulfill table".ToUpper();
         //@Html.ActionLink("Go Back to Complete it", "RsvpForm")
         return(View("RsvpForm"));
     }
     else if ((bool)response.willAttend)
     {
         if (response.Name == null || response.Phone == null || response.Email == null)
         {
             ViewBag.messageresult = "Please input your full info".ToUpper();
             //@Html.ActionLink("Go Back To Input", "RsvpForm")
             return(View("RsvpForm"));
         }
         else
         {
             ViewBag.messageresult = "Welcome " + response.Name.ToUpper();
             return(View("Thanks"));
         }
     }
     else
     {
         ViewBag.messageresult = "Sorry Buddy!!!".ToUpper();
     }
     return(View("RsvpForm"));
 }
Exemplo n.º 2
0
 public ActionResult RsvpForm(GuestRespone guestRespone)
 {
     if (ModelState.IsValid)
     {
         //string name = guestRespone.Name;
         //string phone = guestRespone.Phone;
         //string email = guestRespone.Email;
         //bool? willattend = guestRespone.WillAttend;
         return(View("Thanks", guestRespone));
     }
     else
     {
         return(View());
     }
 }