예제 #1
0
 public JsonResult Listagem()
 {
     var listagem = new BaseService<regional>().ObterTodos();
     return Json(listagem.ToList().Select(ent => new
     {
         ent.descricao,
         datainclusao = ent.datainclusao.Value.DateTimeToStr(),
         dataalteracao = ent.dataalteracao.Value.DateTimeToStr(),
         botoes = GerarBotoes(ent.regionalid, this.ControllerContext.RouteData.Values["controller"].ToString())
     }), JsonRequestBehavior.AllowGet);
 }
예제 #2
0
 public JsonResult Listagem()
 {
     var listagem = new BaseService<adepto>().ObterTodos();
     return Json(listagem.ToList().Select(ent => new
     {
         ent.nome,
         datanascimento = ent.datanascimento.HasValue ? ent.datanascimento.Value.ToShortDateString() : "",
         ent.email,
         telefonecelular = ent.telefonecelular.FormataTelefone(),
         botoes = GerarBotoes(ent.adeptoid, this.ControllerContext.RouteData.Values["controller"].ToString())
     }), JsonRequestBehavior.AllowGet);
 }