示例#1
0
        // GET: Clientes/Delete/5
        public ActionResult Delete(int id)
        {
            var cliente      = _clienteApp.GetById(id);
            var clienteModel = new ClienteTransformation().TransformarClienteEmClienteModel(cliente);

            return(View(clienteModel));
        }
示例#2
0
        public ActionResult Edit(ClienteModel clienteModel)
        {
            if (ModelState.IsValid)
            {
                var cliente = new ClienteTransformation().TransformarClienteModelEmCliente(clienteModel);
                _clienteApp.Update(cliente);

                return(RedirectToAction("Index"));
            }

            return(View(clienteModel));
        }
示例#3
0
        public ActionResult Especiais()
        {
            var clientesModel = new ClienteTransformation().TransformarClienteEmClienteModel(_clienteApp.ObterClientesEspecias());

            return(View(clientesModel));
        }
示例#4
0
        // GET: Clientes
        public ActionResult Index()
        {
            var clientesModel = new ClienteTransformation().TransformarClienteEmClienteModel(_clienteApp.GetAll());

            return(View(clientesModel));
        }