Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
        public JsonResult Listar()
        {
            var json = _serializationColecaoStatusServices.Serialize(_statusPedidoAppService.ObterTodos());

            return(Json(new { statusPedido = json }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 7
0
        public ActionResult Listar()
        {
            var json = _entitySerializationServices.Serialize(_transportadoraAppService.ObterTodos());

            return(Json(new { transportadora = json }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 8
0
        public JsonResult Listar()
        {
            var json = _colecaoSerializationUsuariosService.Serialize(_usuarioAppService.ObterTodos());

            return(Json(new { usuario = json }, JsonRequestBehavior.AllowGet));
        }