Exemplo n.º 1
0
        public ActionResult Sales(ContactForm contactForm)
        {
            ViewBag.Message = "Contact us using the form below!";

            if (ModelState.IsValid)
            {
                // yay, send a sales guy an email
                return RedirectToAction("Thanks");
            }
            else
            {
                return View("Contact");
            }
        }
Exemplo n.º 2
0
 public ActionResult Sales(ContactForm contactForm)
 {
     ViewBag.Message = "Contact us using the form below!";
     if (ModelState.IsValid)
     {
         // yay, send a sales guy an email
         return RedirectToAction("Thanks");
     }
     else if (contactForm.PurchaseTimeFrameInMonths > 12 && contactForm.Income < 10000)
     {
         return RedirectToAction("NoBusiness");
     }
     else
     {
         return View("Contact");
     }
 }