Json_Ajax Fiş ve Satır Gönderimi
<blockquote> <p> $("#hesapla").click(function () {<br /> alert("Kayıt Eklendi");<br /> var anakayit = {<br /> Id: $("#stficheid").text(),<br /> Tarih: $(".date_").html(),<br /> Ficheno: $("#txtFisno").val(),<br /> Trcode: $("#Turu option:selected").val(),<br /> Trcurr: $("#DovTuru option:selected").val(),<br /> Total: Number($("tfoot tr td label.bruttoplam").text()),<br /> TotalVat: Number($("tfoot tr td label.kdv").text()),<br /> NetTotal: Number($("tfoot tr td label.geneltoplam").text()),<br /> CariHesapId: Number($("#lblcariid").text()),</p> <p><br /> }</p> <p> ambtransfer = [];<br /> $('.siparistable tbody tr').each(function () {<br /> dene = {<br /> Id: $(this).find("#stlineid").text(),<br /> searchurun: $(this).find('td').eq(0).children().val(),<br /> urunaciklama: $(this).find('td input#urunaciklama').val(),<br /> Amount: $(this).find('td input#miktarsiparis').val(),<br /> Vat: $(this).find('td input#kdv').val(),<br /> Price: $(this).find('td input#miktarbirimfiyat').val(),<br /> UnitId: Number($("#txtBirim option").val())<br /> }<br /> //diziye veri ekleme<br /> ambtransfer.push(dene);<br /> });</p> <p> var ambtransfer = JSON.stringify({ 'ambtransfer': ambtransfer, 'anakayit': anakayit });<br /> $.ajax({<br /> type: "POST",<br /> url: "/Stline/StlficheEkle",<br /> dataType: "json",<br /> contentType: "application/json; charset=utf-8",<br /> //data: { 'myArray': data }, //JSON.stringify(data),<br /> data: ambtransfer,<br /> success: function (response) {</p> <p><br /> }<br /> });<br /> })</p> </blockquote>
0 Yorum