示例#1
0
        public ActionResult Clientes()
        {
            ViewData["Opcoes"] = new SelectList(new[] { "", "Sim", "Nao" });

            Clientes Obj = new Clientes { Codigo=1, Nome="Teste", MalaDireta="Sim" };

            return View(Obj);
        }
示例#2
0
 public ActionResult Clientes2(Clientes Obj)
 {
     if (Obj.Nome == null)
     {
         return View();
     }
     else
     {
         return Redirect("ClienteInserido?Codigo=" + Obj.Codigo.ToString());
     }
 }