Include PivotTable in ViewBag

0

I include the data of a table dynamically in AJAX, and it works perfectly to include in the table, what happens, is that I now need the table data in the controller, and by using .NET CORE, I can not get the data via JSON. How can I put the ViewBag to receive data from my table, and use it in the control? Here is the form I include in the table:

  if (data.resultado) {
                $("#tablepesquisaprodutos").append("<tr class='item'>"
                    + "<td>" + CodigoProduto + "</td>"
                    + "<td>" + DescricaoProduto + "</td>"
                    + "<td>" + Qtd + "</td>"
                    + "<td>" + PrecoCusto + "</td>"
                    + "<td>" + DescontoP + "</td>"
                    + "<td>" + DescontoV + "</td>"
                    + "<td>" + Total.toFixed(2).replace(".", ",") + "</td>"
                    + "<td>" + ICMS + "</td>"
                    + "<td>" + AliquotaICMS.replace(".", ",") + "</td>"
                    + "<td>" + vICMS.toFixed(2).replace(".", ",") + "</td>"
                    + "<td>" + ISS.replace(".", ",") + "</td>"
                    + "<td>" + vISS.toFixed(2).replace(".", ",") + "</td>"
                    + "<td>" + IPI.replace(".", ",") + "</td>"
                    + "<td>" + vIPI.toFixed(2).replace(".", ",") + "</td>"
                    + "<td align='right'>" +
                    "<a class='link-excluir' data-id=" + CodigoProduto + " href='#' title='Excluir'><i class='fa fa-trash-o fa-lg'></i></a>"
                    + "</td>"
                    + "<td><div style='visibility: hidden;'>" + QtdFalta + "</div></td>"
                    + "<td><div style='visibility: hidden;'>" + ProdutoID + "</div></td>"
                    + "</tr>")
                getTotal();
                $("#produtoid").val("");
                $("#idproduto").val("");
                $("#qtd").val("");
                $("#precocusto").val("");
                $("#descontov").val("");
                $("#descontop").val("");
                $("#icms").val("");
                $("#aliquotaicms").html("");
                $("#ipi").val("");
                $("#iss").val("");
                $("#dataentrega").val("");
                $("#descricaoproduto").html("");
            }
    
asked by anonymous 23.08.2018 / 17:23

0 answers