예제 #1
0
        public JsonResult Cadastrar(FeicaoObjeto feicao)
        {
            FeicaoBusiness busGeo  = new FeicaoBusiness();
            Retorno        retorno = null;

            if (feicao != null)
            {
                LayerFeicaoBusiness.LimparCacheLayers(feicao.IdProjeto);
                ProjetoBusiness.InvalidarProcessamento(feicao.IdProjeto);
                retorno = busGeo.Cadastrar(feicao);
            }
            if (retorno == null)
            {
                retorno = new Retorno();
            }

            return(Json(retorno, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult CadastrarGeometrias(List <FeicaoObjeto> feicoes)
        {
            FeicaoBusiness busGeo = new FeicaoBusiness();

            List <Retorno> resposta = new List <Retorno>();
            Retorno        retorno;

            if (feicoes != null && feicoes.Count > 0)
            {
                LayerFeicaoBusiness.LimparCacheLayers(feicoes[0].IdProjeto);
                ProjetoBusiness.InvalidarProcessamento(feicoes[0].IdProjeto);
                for (int n = 0; n < feicoes.Count; n++)
                {
                    retorno = new Retorno();
                    retorno = busGeo.Cadastrar(feicoes[n]);
                    resposta.Add(retorno);
                }
            }

            return(Json(resposta, JsonRequestBehavior.AllowGet));
        }