public ActionResult Listar(string mes, string ano) { int mesInteiro = Convert.ToInt32(mes); int anoInteiro = Convert.ToInt32(ano); var json = _entitySerializationServices.Serialize(_pedidoAppService.ObterComissoes(mesInteiro, anoInteiro)); return(Json(new { comissoes = json }, JsonRequestBehavior.AllowGet)); }
public JsonResult Novo(string descricao) { StatusPedidoViewModel statusPedido = new StatusPedidoViewModel(); statusPedido.Descricao = descricao; var statusRetorno = _statusPedidoAppService.Adicionar(statusPedido); var json = _serializationStatusService.Serialize(statusRetorno); return(Json(new { statusPedido = json }, JsonRequestBehavior.AllowGet)); }
public JsonResult Novo(string descricao) { SegmentoViewModel segmento = new SegmentoViewModel(); segmento.Descricao = descricao; var segmentoRetorno = _segmentoAppService.Adicionar(segmento); var json = _serializationSegmentosService.Serialize(segmentoRetorno); return(Json(new { segmento = json }, JsonRequestBehavior.AllowGet)); }
public JsonResult PesquisarProdutoPorParametro(Guid representadaId, string parametro, string busca, string ordemAlfabetica, string ordemPreco) { var json = ""; if (representadaId != null) { if (parametro == "") { var produto = Ordenar(_produtoAppService.ObterTodos(representadaId), ordemAlfabetica, ordemPreco); json = _serializationProdutoservice.Serialize(produto); } else if (parametro == "nome") { var produto = Ordenar(_produtoAppService.ObterPorNome(busca, representadaId), ordemAlfabetica, ordemPreco); json = _serializationProdutoservice.Serialize(produto); } } return(Json(new { produtos = json }, JsonRequestBehavior.AllowGet)); }
public JsonResult DetalhesRepresentada(Guid representadaId) { if (representadaId != null) { var representada = _representadaAppService.ObterPorId(representadaId); var json = _serializationRepresentadaService.Serialize(representada); return(Json(new { representada = json }, JsonRequestBehavior.AllowGet)); } return(Json(new { representada = "" }, JsonRequestBehavior.AllowGet)); }
public JsonResult Listar() { var json = _serializationColecaoStatusServices.Serialize(_statusPedidoAppService.ObterTodos()); return(Json(new { statusPedido = json }, JsonRequestBehavior.AllowGet)); }
public ActionResult Listar() { var json = _entitySerializationServices.Serialize(_transportadoraAppService.ObterTodos()); return(Json(new { transportadora = json }, JsonRequestBehavior.AllowGet)); }
public JsonResult Listar() { var json = _colecaoSerializationUsuariosService.Serialize(_usuarioAppService.ObterTodos()); return(Json(new { usuario = json }, JsonRequestBehavior.AllowGet)); }