Пример #1
0
        public ActionResult Create(Cliente cliente)
        {
            var domainCliente = new DomainCliente();

            if (ModelState.IsValid)
            {
                domainCliente.AddCliente(cliente);
                ViewBag.Message = "success";
            }
            else
            {
                ViewBag.Message = "failure";
            }

            return(View(cliente));
        }
Пример #2
0
        // GET: Cliente
        public ActionResult Index()
        {
            var domainCliente = new DomainCliente();

            return(View(domainCliente.RetornarClientes()));
        }