Пример #1
0
        public ActionResult Editar(int id)
        {
            var venda = repository.ObterPeloId(id);

            if (venda == null)
            {
                return(RedirectToAction("Index"));
            }
            ViewBag.Venda = venda;
            return(View());
        }
 public JsonResult ObterPeloId(int id)
 {
     return(Json(repository.ObterPeloId(id), JsonRequestBehavior.AllowGet));
 }